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

Debugging Twos Complement Overflow

MediumLogic CircuitDebug

A two's complement overflow detector flags when the addition of two signed numbers exceeds the representable bit width.

Expected behavior:

| A3 | B3 | S3 | V | |------|------|------|-----| | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 1 | | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 0 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 0 | | 1 | 1 | 0 | 1 | | 1 | 1 | 1 | 0 |

Simulation shows V = 0 for inputs A3=1, B3=1, S3=0. The overflow output fails to detect negative overflow. Inspect the circuit and correct the fault.

Constraints

  • Do not modify the input or output pins.
  • Only standard combinational logic gates are permitted.

Topics

Combinational LogicDebugDatapath Design RTL

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

  • Half Adder Using Only XOR and ANDEasy
  • Four-Bit Bus AdderEasy
  • ALU Flag Evaluation Branch LogicHard
  • BCD Adder Correction BlockMedium
  • IEEE 754 Mantissa Alignment ShifterHard
  • 1-Bit ALU SliceMedium
  • 4-bit Carry Lookahead BlockHard
  • Floating Point Exception FlagsMedium

Browse all problems · Learning tracks