()
| 59 | } |
| 60 | |
| 61 | func NewDecoder3x8() *Decoder3x8 { |
| 62 | d := new(Decoder3x8) |
| 63 | |
| 64 | for i, _ := range d.notGates { |
| 65 | d.notGates[i] = *circuit.NewNOTGate() |
| 66 | } |
| 67 | |
| 68 | for i, _ := range d.andGates { |
| 69 | d.andGates[i] = *NewANDGate3() |
| 70 | } |
| 71 | |
| 72 | return d |
| 73 | } |
| 74 | |
| 75 | func (d *Decoder3x8) GetOutputWire(index int) bool { |
| 76 | return d.outputs[index].Get() |