EveryCircuit
Powering up...
Circuit
Public
Private
Unlisted
Save

1 bit universal ALU

@AndiB73
1 year ago
https://everycircuit.com/circuit/6617251264069632
One Bit ALU supporting: =========================== • AND / NAND (1000000 / 0100011) • OR / NOR (0100000 / 1000011) • XOR / XNOR (0010000 / 0010010 or 0010001) • A+B / A-B (0001000 / 0000100) Inputs (counted top to bottom): ======================== 1-7 = OP-Code (see in brackets above or description below) 8 = A 9 = B 10 = Ci (Carry IN / Sign IN) Outputs (LEDs on the right side): ========================= Green LED (upper) = R (Result) Yellow LED (lower) = Co (Carry OUT / Sign) ---------------------------------------------------- The 5 logic gates in the upper right corner along with the 7-segment display don't belong to the ALU, they just decode positive and negative carry / sign bits. The decimal dot shows that the result is a negative number. OP-Code 0000000 means NOP (No Operation), valid OP-Codes see above, all other bit combinations are not defined. The OP-Code bits 1-7 mean: ====================== 1 = AND 2 = OR 3 = XOR 4 = ADD 5 = SUBTRACT B from A 6 = Negate A 7 = Negate B Hence: ====== NAND = NotA OR NotB NOR = NotA AND NotB XNOR = NotA XOR B --or-- A XOR NotB
Comments
Post