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

Function NewBit

components/storage.go:13–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13func NewBit() *Bit {
14 wireO := *circuit.NewWire("O", false)
15
16 gates := [4]circuit.NANDGate{
17 *circuit.NewNANDGate(),
18 *circuit.NewNANDGate(),
19 *circuit.NewNANDGate(),
20 *circuit.NewNANDGate(),
21 }
22
23 return &Bit{
24 wireO: wireO,
25 gates: gates,
26 }
27}
28
29func (m *Bit) Get() bool {
30 return m.wireO.Get()

Callers 6

NewCPUFunction · 0.92
ConnectMethod · 0.92
ConnectMethod · 0.92
NewWordFunction · 0.85
TestBitFunction · 0.85
NewStepperFunction · 0.85

Calls 2

NewWireFunction · 0.92
NewNANDGateFunction · 0.92

Tested by 1

TestBitFunction · 0.68