()
| 11 | } |
| 12 | |
| 13 | func NewBit() *Bit { |
| 14 | wireO := *circuit.NewWire("O", false) |
| 15 | |
| 16 | gates := [4]circuit.NANDGate{ |
| 17 | *circuit.NewNANDGate(), |
| 18 | *circuit.NewNANDGate(), |
| 19 | *circuit.NewNANDGate(), |
| 20 | *circuit.NewNANDGate(), |
| 21 | } |
| 22 | |
| 23 | return &Bit{ |
| 24 | wireO: wireO, |
| 25 | gates: gates, |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | func (m *Bit) Get() bool { |
| 30 | return m.wireO.Get() |