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

Function NewANDGate4

components/big_gates.go:221–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219}
220
221func NewANDGate4() *ANDGate4 {
222 a := new(ANDGate4)
223
224 a.inputA = *circuit.NewWire("a", false)
225 a.inputB = *circuit.NewWire("b", false)
226 a.inputC = *circuit.NewWire("c", false)
227 a.inputD = *circuit.NewWire("d", false)
228 a.output = *circuit.NewWire("o", false)
229
230 a.andA = *circuit.NewANDGate()
231 a.andB = *circuit.NewANDGate()
232 a.andC = *circuit.NewANDGate()
233
234 return a
235}
236
237func (g *ANDGate4) Output() bool {
238 return g.output.Get()

Callers 2

TestANDGate4Function · 0.85
NewDecoder4x16Function · 0.85

Calls 2

NewWireFunction · 0.92
NewANDGateFunction · 0.92

Tested by 1

TestANDGate4Function · 0.68