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

Undefined Opcode Latch

MediumLogic CircuitDebug

An arithmetic logic unit computes operations based on a 2-bit instruction code and must drive a valid deterministic output for all possible encodings.

Expected behavior:

| Op1 | Op0 | Operation | Y Output | |-------|-------|-----------|------------| | 0 | 0 | AND | A & B | | 0 | 1 | OR | A | B | | 1 | 0 | XOR | A ^ B | | 1 | 1 | Invalid | 0 |

Synthesis tools report an unintended latch on the Y output. Simulation shows that Y fails to clear to 0 when an invalid opcode is provided. For the test case Op1=1, Op0=1, A=1, B=0, the circuit holds the previous output of 1 instead of dropping to 0. Inspect the circuit and correct the fault.

Constraints

  • The circuit must be strictly combinational.
  • Output Y must be explicitly driven to 0 when Op1=1 and Op0=1.
  • Do not use flip-flops or feedback loops to retain state.

Topics

alumultiplexerlatchsynthesis

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
  • Hex Nibble to BinaryEasy
  • Odd Parity Bit Generator for 3-bit DataEasy
  • Full Adder from Half AddersEasy
  • Modulo ArithmeticMedium
  • Two's Complement: Encode a Negative DecimalEasy

Browse all problems · Learning tracks