Comparator (4-bit)
Use the combinational 4-bit Magnitude Comparator to compare A[3:0] and B[3:0] as unsigned values. Exactly one of A>B, A=B, and A<B is HIGH for defined inputs.
Overview
The 4-Bit Magnitude Comparator compares two unsigned nibbles and drives one of three relationship outputs.
Functional Behavior
For defined binary operands, exactly one relationship output is HIGH. Comparison is unsigned over the range 0–15; no mode or cascade inputs are provided.
Released inputs sample as LOW. For driven unknowns, Logic Lab evaluates binary completions and
retains any relationship output whose value is invariant; other affected outputs are driven X.
Simulation Boundary
The comparator is an atomic functional model. It does not expose a bitwise cascade, compare signed two's-complement values, or characterize physical timing, fan-out, or power.
Learning Path
Next Steps
Frequently Asked Questions
How does a magnitude comparator work?
It compares two binary numbers bit by bit, producing three outputs: A>B, A=B, A<B. Only one output is HIGH at a time.
Where are comparators used?
Jump conditions in CPUs, sorting circuits, min/max detectors, and any circuit that needs to make decisions based on relative values.