MCPcopy Index your code
hub / github.com/djhworld/simple-computer / Update

Method Update

components/storage.go:33–41  ·  view source on GitHub ↗
(wireI bool, wireS bool)

Source from the content-addressed store, hash-verified

31}
32
33func (m *Bit) Update(wireI bool, wireS bool) {
34 for i := 0; i < 2; i++ {
35 m.gates[0].Update(wireI, wireS)
36 m.gates[1].Update(m.gates[0].Output(), wireS)
37 m.gates[2].Update(m.gates[0].Output(), m.gates[3].Output())
38 m.gates[3].Update(m.gates[2].Output(), m.gates[1].Output())
39 m.wireO.Update(m.gates[2].Output())
40 }
41}
42
43type Word struct {
44 inputs [arch.BUS_WIDTH]circuit.Wire

Callers 1

TestBitFunction · 0.95

Calls 2

UpdateMethod · 0.65
OutputMethod · 0.45

Tested by 1

TestBitFunction · 0.76