ALU (8-bit)
Use DigiSim's combinational 8-bit ALU for ADD, SUB, AND, OR, XOR, NOT A, SHL A, and logical SHR A, with active-HIGH OE and four status outputs.
Overview
The 8-Bit Arithmetic Logic Unit is a fixed combinational datapath with eight operations, twelve tri-state outputs, and an active-HIGH output enable.
DigiSim Interface
| Direction | Pins | Behavior |
|---|---|---|
| Input | A0–A7, B0–B7 | Operands; bit 0 is least significant. |
| Input | Op0–Op2 | Operation code; Op0 is least significant. |
| Input | OE | Active-HIGH enable for all result and flag outputs. |
| Output | R0–R7 | Eight-bit result. |
| Output | Z, C, N, V | Zero, Carry/borrow, Negative, and Overflow. |
Operation Table
Z is HIGH for an all-zero result; N copies R7. NOT and both shifts ignore B. The component has no clock, register, or carry-in.
Output Enable and Four-State Behavior
OE LOW, including released Z under the LOW sampling convention, releases all 12 outputs to Z.
A driven-unknown OE makes all outputs driven X. With OE HIGH, relevant driven unknowns are
evaluated by binary completion and may affect only a subset of result or flag bits.
Simulation Boundary
The component does not expose an internal adder or shifter architecture and does not represent a specific ALU IC, propagation path, voltage, current, power, or thermal limit.
Learning Path
Prerequisites
Next Steps
Frequently Asked Questions
What is an 8-bit ALU?
DigiSim's 8-bit ALU decodes Op2–Op0 using the same 000–111 operation order as the 4-bit ALU. ADD, SUB, AND, OR, and XOR use A and B; NOT and both shifts use A. It produces R0–R7 and four flags without storing the result.
What are ALU status flags?
In DigiSim, Zero reports an all-zero result and Negative copies the result MSB. Carry reports addition carry-out, subtraction borrow, or the shifted-out bit; Overflow reports signed ADD/SUB overflow and a sign change on SHL.
How does output enable work on the 8-bit ALU?
OE is active HIGH. When OE=1, the result and all four flags are driven; when OE=0, all 12 outputs are high impedance so another device can use a shared bus.