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

Function NewCompare2

components/components.go:379–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377}
378
379func NewCompare2() *Compare2 {
380 c := new(Compare2)
381
382 c.inputA = *circuit.NewWire("a", false)
383 c.inputB = *circuit.NewWire("b", false)
384 c.equalIn = *circuit.NewWire("eqin", false)
385 c.equalOut = *circuit.NewWire("eqin", false)
386 c.isLargerIn = *circuit.NewWire("largerin", false)
387 c.isLargerOut = *circuit.NewWire("largerin", false)
388 c.out = *circuit.NewWire("out", false)
389
390 c.xor1 = *circuit.NewXORGate()
391 c.not1 = *circuit.NewNOTGate()
392 c.and1 = *circuit.NewANDGate()
393 c.andgate3 = *NewANDGate3()
394 c.or1 = *circuit.NewORGate()
395
396 return c
397}
398
399func (g *Compare2) Equal() bool {
400 return g.equalOut.Get()

Callers 2

NewComparatorFunction · 0.85
TestCompare2Function · 0.85

Calls 6

NewWireFunction · 0.92
NewXORGateFunction · 0.92
NewNOTGateFunction · 0.92
NewANDGateFunction · 0.92
NewORGateFunction · 0.92
NewANDGate3Function · 0.85

Tested by 1

TestCompare2Function · 0.68