(b Component, input int)
| 401 | } |
| 402 | |
| 403 | func setWireOnComponent16(b Component, input int) { |
| 404 | var x uint16 = 0 |
| 405 | for i := 15; i >= 0; i-- { |
| 406 | r := (input & (1 << x)) |
| 407 | if r != 0 { |
| 408 | b.SetInputWire(i, true) |
| 409 | } else { |
| 410 | b.SetInputWire(i, false) |
| 411 | } |
| 412 | x++ |
| 413 | } |
| 414 | } |
| 415 | |
| 416 | func getValueOfOutput(b Component, outputBits int) int { |
| 417 | var x int = 0 |
no test coverage detected