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

Signed Overflow Detection in Two's Complement Addition

MediumLogic CircuitAnalyze

Hardware arithmetic logic units must distinguish between valid results and numbers that exceed the representable bit width.

The scenarios presented cover four distinct N-bit addition operations: positive plus positive, negative plus negative, positive plus negative, and negative plus positive. The operands are A and B, the result is S, and the carry into the most significant bit (MSB) is Cin while the carry out of the MSB is Cout.

Determine which operand sign combinations can trigger signed overflow and identify the precise Boolean logic used to detect it at the hardware level.

Constraints

  • Operands A and B are represented in standard two's complement format.
  • The MSB of an N-bit value represents its sign bit: 0 for positive, 1 for negative.

Topics

ArithmeticOverflowALUTwo's Complement

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