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

Two's Complement: Encode a Negative Decimal

EasyLogic CircuitAnalyze

Modern processors use two's complement to represent signed integers because it allows addition and subtraction to be performed by the same arithmetic logic unit. The target value is the decimal integer -108 represented in an 8-bit system. The conversion requires finding the positive binary representation, inverting all bits, and adding 1 to the least significant bit.

Determine the exact 8-bit sequence for -108. Trace the carry propagation during the final addition step to ensure the correct final bit pattern.

Constraints

  • All binary answers must be exactly 8 bits long, including leading zeros.
  • Use standard two's complement arithmetic rules.

Topics

twos-complementdata-representationbinary-arithmetic

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
  • Signed Overflow Detection in Two's Complement AdditionMedium
  • Modulo ArithmeticMedium

Browse all problems · Learning tracks