CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Combinational Logic

Debug: 4-Bit Comparator

MediumLogic CircuitDebug

A 4-bit comparator determines if two 4-bit binary values are identical in hardware applications like memory addressing and control logic.

Expected behavior:

The output Eq is 1 if and only if all corresponding bits match: A3 = B3, A2 = B2, A1 = B1, and A0 = B0. For all other input combinations, Eq must be 0.

Simulation shows Eq = 0 for inputs A = 0000 and B = 0000. Furthermore, Eq = 1 for inputs A = 0100 and B = 0000. Inspect the circuit and correct the fault.

Constraints

  • Do not add or remove input or output pins.
  • Modify only the single faulty gate.
  • The circuit must use standard basic logic gates.

Topics

Logic GatesDebugComparatorXNOR

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.

Sign in to solveSee what Pro unlocks

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.

Related problems

  • Binary to HexEasy
  • 1-to-4 Demultiplexer from AND and NOT GatesEasy
  • 2-to-4 Line Decoder with Active-High EnableEasy
  • Full Adder from Half AddersEasy
  • Odd Parity Bit Generator for 3-bit DataEasy
  • Hex Nibble to BinaryEasy
  • Extract Expression from a Two-Level AND-OR Circuit with Fan-OutEasy
  • The Two Zeros Problem in Sign-MagnitudeEasy

Browse all problems · Learning tracks