MCPcopy Create free account
hub / github.com/djhworld/simple-computer / NewDecoder2x4

Function NewDecoder2x4

components/decoders.go:16–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16func NewDecoder2x4() *Decoder2x4 {
17 d := new(Decoder2x4)
18
19 for i, _ := range d.notGates {
20 d.notGates[i] = *circuit.NewNOTGate()
21 }
22
23 for i, _ := range d.andGates {
24 d.andGates[i] = *circuit.NewANDGate()
25 }
26
27 return d
28}
29
30func (d *Decoder2x4) GetOutputWire(index int) bool {
31 return d.outputs[index].Get()

Callers 2

NewCPUFunction · 0.92
Test2x4DecoderFunction · 0.85

Calls 2

NewNOTGateFunction · 0.92
NewANDGateFunction · 0.92

Tested by 1

Test2x4DecoderFunction · 0.68