Class: Circuits::Component::SrNand
- Defined in:
- lib/circuits/component/sr_nand.rb
Overview
SR NAND Latch
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ SrNand
constructor
A new instance of SrNand.
Methods inherited from Base
Constructor Details
#initialize ⇒ SrNand
Returns a new instance of SrNand.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/circuits/component/sr_nand.rb', line 8 def initialize nand_s = Nand.new nand_r = Nand.new super(inputs: [:not_s, :not_r], outputs: [:q, :not_q], sub_components: [nand_s, nand_r], ticks: 2) link nand_s, nand_r reset end |