VIN Technologies › Labs › Digital Systems Lab
2-bit magnitude comparator
Digital Systems Lab · free online experiment, runs in your browser with no install or sign-up.
Open this experiment in the circuit simulator
Objective
Compare two 2-bit numbers with gates and read A>B, A=B and A<B.
Procedure
- Run through all 16 input pairs and watch the three outputs.
Theory
A=B when both bit pairs are equal (XNOR · XNOR). A>B when A1·B1' or (A1 ≡ B1)·A0·B0'. A<B is the mirror image.
Questions to answer
- How is it extended to 4 or 8 bits?
Components used
7 × AND, 3 × Logic probe / LED, 4 × Logic switch, 4 × NOT, 2 × OR, 2 × XNOR
About the model
Ideal wires; component models as listed in the catalogue (no parasitics, no temperature drift). Built without a breadboard so the schematic stays readable.
Open this experiment in the circuit simulator