Verilog Coding Exercise · Combinational I
4-bit Magnitude Comparator
Same idea, scaled up to a real bus width.
Compares two 4-bit numbers using ordinary relational operators — this is where behavioral Verilog (if/else on vectors) starts to earn its keep over gate-by-gate logic.