|
The 1-bit ALU operates on (pair of) input bits a and b according to the function sel code:
We now design the 1-bit ALU component:
Form all possible results: result 1: a + b (with carry in and carry out)
Form all possible results: result 2: NOT(a)
Form all possible results: result 3: a AND b
Form all possible results: result 4: a OR b
Use a 4 way multiplexor controlled by the function selection signal to select the desired result:
Connect the "sum" output to the first input (sel=00) of the multiplexor:
Connect the "NOT" output to the 2nd input (sel=01) of the multiplexor:
Connect the "AND" output to the 3rd input (sel=10) of the multiplexor:
Finall: connect the "OR" output to the 3rd input (sel=11) of the multiplexor:
The demo circuit of the 1-bit ALU has a different orientation (due to EDiSim's displaying convention):
|