Bitwise Equality Comparator

Compare two 4-bit words bit by bit. eq[i] is 1 when a[i] equals b[i] (an XNOR per bit), and all_eq is 1 only when every bit matches.

Inputs: a and b, 4 bits each.
Outputs: eq, 4 bits; all_eq, 1 bit.

The testbench applies all 256 pairs and compares both outputs.

Contributed by Indicore

Compiler Output
Waveform Viewer