1-Bit ALU Slice
Classic microprocessor execution units rely on modular arithmetic logic slices to process instructions bit-by-bit. This 1-bit ALU core combines essential bitwise operations and full addition into a single selectable cell.
The circuit computes four distinct operations based on the 2-bit control signal formed by Op1 and Op0. The Result output routes the selected operation. The Cout output must continuously compute the carry out of A + B + Cin to allow chaining, regardless of the selected operation.
| Op1 | Op0 | Selected Operation | Result Behavior | |-------|-------|--------------------|-------------------| | 0 | 0 | Bitwise AND | A AND B | | 0 | 1 | Bitwise OR | A OR B | | 1 | 0 | Bitwise XOR | A XOR B | | 1 | 1 | Full Addition | Sum of A, B, Cin |
Constraints
- Combinational logic only.
- Output
Resultmust be driven by a single 4-to-1 multiplexer. - Calculate
Coutcontinuously regardless of the operation selected.
Topics
Solve this problem
Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.
This problem is part of Codiode Pro. The statement above is free to read.
The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.