Mux/Demux combinator
Posted: Thu Apr 09, 2020 4:24 pm
TL:DR:
There is a type of combinator missing, which I am going to call the Mux/Demux combinator. It is essetially the "Pointer Logic" combinator.
What?:
The "MUX" Combinator would use a selector-signal to select which logic signal to route to a defined output signal
The "DEMUX" combinator would use a selector-signal to select which output signal to fill with its input signal
Examples: Assume the Logic network has:
{ iron-ore: 5,
copper-ore: 100,
A: 1,
B: 25
}
Also assume that "iron-ore" has an internal integer ID value of 1, and "copper-ore" has an internal ID value of 2 (I am assuming that every logic signal has a unique internal integer ID)
MUX( Selector: A, output-signal C) --> Outputs the value of 5 (the current value of iron-ore) onto signal C
MUX( Selector: 2, output-signal C) --> Outputs the value of 100 (the current value of copper-ore) onto signal C
DEMUX( Selector: A, input-signal B) --> Outputs the value of 25 (the value of signal B) onto signal iron-ore
DEMUX( selector: 2, input-signal B) --> Outputs the value oy 25 (the current value of signal B) onto signal copper-ore
There is a type of combinator missing, which I am going to call the Mux/Demux combinator. It is essetially the "Pointer Logic" combinator.
What?:
The "MUX" Combinator would use a selector-signal to select which logic signal to route to a defined output signal
The "DEMUX" combinator would use a selector-signal to select which output signal to fill with its input signal
Examples: Assume the Logic network has:
{ iron-ore: 5,
copper-ore: 100,
A: 1,
B: 25
}
Also assume that "iron-ore" has an internal integer ID value of 1, and "copper-ore" has an internal ID value of 2 (I am assuming that every logic signal has a unique internal integer ID)
MUX( Selector: A, output-signal C) --> Outputs the value of 5 (the current value of iron-ore) onto signal C
MUX( Selector: 2, output-signal C) --> Outputs the value of 100 (the current value of copper-ore) onto signal C
DEMUX( Selector: A, input-signal B) --> Outputs the value of 25 (the value of signal B) onto signal iron-ore
DEMUX( selector: 2, input-signal B) --> Outputs the value oy 25 (the current value of signal B) onto signal copper-ore