8-Bit Magnitude Comparator
Wide datapath operations in ALUs and memory controllers require comparing large binary vectors. A modular approach constructs wide comparators by chaining smaller, standardized comparison blocks.
Compare two 8-bit unsigned integers, A and B, to evaluate their relative magnitude. Produce three mutually exclusive outputs: A_gt_B, A_eq_B, and A_lt_B.
| Condition | A_gt_B | A_eq_B | A_lt_B | |-----------|----------|----------|----------| | A > B | 1 | 0 | 0 | | A = B | 0 | 1 | 0 | | A < B | 0 | 0 | 1 |
The evaluation must split the 8-bit inputs into lower bits (3 down to 0) and upper bits (7 down to 4) to be processed by discrete 4-bit stages.
Constraints
- Use exactly two 4-bit magnitude comparator blocks.
- Route the magnitude outputs of the lower 4-bit block to the cascade inputs of the upper 4-bit block.
- Drive the cascade inputs of the least significant block with constant values that assert an initial equality state.
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.