| 377 | } |
| 378 | |
| 379 | func 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 | |
| 399 | func (g *Compare2) Equal() bool { |
| 400 | return g.equalOut.Get() |