ECExplain
FormulasCompareNotesInterview
⌘K
Labs
Home
/Digital Electronics
/Signed Number Representation

Contents

Digital Electronics
Number Systems
Binary Number SystemOctal Number SystemHexadecimal Number SystemNumber System ConversionsBinary AdditionBinary Subtraction1s Complement2s ComplementSigned Number RepresentationBCD CodeGray CodeExcess-3 CodeASCII CodeError Detection CodesHamming Code
Logic Gates
AND GateOR GateNOT GateNAND GateNOR GateXOR GateXNOR GateUniversal Gates NANDUniversal Gates NORMulti-Input GatesBuffer GateTTL Logic FamilyCMOS Logic FamilyTTL vs CMOS ComparisonLogic Level Interfacing
Boolean Algebra
Boolean Algebra AxiomsBoolean Algebra TheoremsDe Morgan Theorem 1De Morgan Theorem 2De Morgan ApplicationsBoolean Expression SimplificationCanonical SOP FormCanonical POS FormMinterm and Maxterm RelationshipK-Map 2 VariableK-Map 3 VariableK-Map 4 VariableK-Map Don't Care ConditionsK-Map POS SimplificationQuine-McCluskey MethodPrime Implicant Chart
Combinational Circuits
Half AdderFull AdderRipple Carry AdderCarry Lookahead AdderBCD AdderHalf SubtractorFull SubtractorBinary Multiplier2-to-1 Multiplexer4-to-1 Multiplexer8-to-1 MultiplexerMUX as Function Generator1-to-4 Demultiplexer1-to-8 Demultiplexer2-to-4 Decoder3-to-8 DecoderBCD to 7-Segment DecoderPriority Encoder8-to-3 EncoderMagnitude ComparatorParity GeneratorParity CheckerCode Converter Circuits
Sequential Circuits
SR LatchGated SR LatchSR Flip-FlopD Flip-FlopJK Flip-FlopT Flip-FlopFlip-Flop Timing ParametersFlip-Flop ConversionsAsynchronous CounterSynchronous CounterBCD CounterMod-N CounterUp Down CounterRing CounterJohnson CounterSISO Shift RegisterSIPO Shift RegisterPISO Shift RegisterPIPO Shift RegisterUniversal Shift RegisterShift Register ApplicationsMealy State MachineMoore State MachineState Machine DesignState ReductionState AssignmentSequence Detector Design
Memory & PLDs
ROM ArchitecturePROMEPROM and EEPROMSRAMDRAMSRAM vs DRAMFlash MemoryPLAPALCPLDFPGA ArchitectureFPGA vs ASIC
Digital System Design
Propagation DelaySetup and Hold TimeStatic HazardsDynamic HazardsGlitches and RacesSynchronous Design PrinciplesClock Skew and JitterAsynchronous Circuit Design
Other Topics
Other Subjects
Analog ElectronicsSignals & SystemsControl SystemsElectromagnetic TheoryDigital CommunicationAnalog CommunicationNetwork AnalysisMicroprocessorsVLSI DesignVerilog HDLPower ElectronicsEmbedded SystemsDSPElectronic Devices
Section Progress60%

9 of 15 articles

Digital Electronics
Number Systems
Binary Number SystemOctal Number SystemHexadecimal Number SystemNumber System ConversionsBinary AdditionBinary Subtraction1s Complement2s ComplementSigned Number RepresentationBCD CodeGray CodeExcess-3 CodeASCII CodeError Detection CodesHamming Code
Logic Gates
AND GateOR GateNOT GateNAND GateNOR GateXOR GateXNOR GateUniversal Gates NANDUniversal Gates NORMulti-Input GatesBuffer GateTTL Logic FamilyCMOS Logic FamilyTTL vs CMOS ComparisonLogic Level Interfacing
Boolean Algebra
Boolean Algebra AxiomsBoolean Algebra TheoremsDe Morgan Theorem 1De Morgan Theorem 2De Morgan ApplicationsBoolean Expression SimplificationCanonical SOP FormCanonical POS FormMinterm and Maxterm RelationshipK-Map 2 VariableK-Map 3 VariableK-Map 4 VariableK-Map Don't Care ConditionsK-Map POS SimplificationQuine-McCluskey MethodPrime Implicant Chart
Combinational Circuits
Half AdderFull AdderRipple Carry AdderCarry Lookahead AdderBCD AdderHalf SubtractorFull SubtractorBinary Multiplier2-to-1 Multiplexer4-to-1 Multiplexer8-to-1 MultiplexerMUX as Function Generator1-to-4 Demultiplexer1-to-8 Demultiplexer2-to-4 Decoder3-to-8 DecoderBCD to 7-Segment DecoderPriority Encoder8-to-3 EncoderMagnitude ComparatorParity GeneratorParity CheckerCode Converter Circuits
Sequential Circuits
SR LatchGated SR LatchSR Flip-FlopD Flip-FlopJK Flip-FlopT Flip-FlopFlip-Flop Timing ParametersFlip-Flop ConversionsAsynchronous CounterSynchronous CounterBCD CounterMod-N CounterUp Down CounterRing CounterJohnson CounterSISO Shift RegisterSIPO Shift RegisterPISO Shift RegisterPIPO Shift RegisterUniversal Shift RegisterShift Register ApplicationsMealy State MachineMoore State MachineState Machine DesignState ReductionState AssignmentSequence Detector Design
Memory & PLDs
ROM ArchitecturePROMEPROM and EEPROMSRAMDRAMSRAM vs DRAMFlash MemoryPLAPALCPLDFPGA ArchitectureFPGA vs ASIC
Digital System Design
Propagation DelaySetup and Hold TimeStatic HazardsDynamic HazardsGlitches and RacesSynchronous Design PrinciplesClock Skew and JitterAsynchronous Circuit Design
Other Topics
Other Subjects
Analog ElectronicsSignals & SystemsControl SystemsElectromagnetic TheoryDigital CommunicationAnalog CommunicationNetwork AnalysisMicroprocessorsVLSI DesignVerilog HDLPower ElectronicsEmbedded SystemsDSPElectronic Devices
Section Progress60%

9 of 15 articles

Signed Number Representation

Sign magnitude, 1s complement, 2s complement, range.

Darshan N
Updated: 7 April 2026
10 min read

Signed number representation determines how CPUs interpret and compare integers. The choice of representation affects the design of comparators, branch instructions, and flag registers in processors like the Intel 8086 and ARM Cortex-A series.

Signed Number Representations (4-bit)Sign-MagnitudeBits Value0111 +70110 +60001 +10000 +01000 -01001 -11111 -7Range: -7 to +7Two zerosMSB = sign bitMagnitude = rest1s ComplementBits Value0111 +70110 +60001 +10000 +01111 -01110 -11000 -7Range: -7 to +7Two zerosNegate: invert bitsEnd-around carry2s ComplementBits Value0111 +70110 +60001 +10000 01111 -11110 -21000 -8Range: -8 to +7One zeroNegate: invert+1No end-aroundExcess-N / BiasedBias=8 (Excess-8)1111 +71000 00111 -10000 -8Value = code - biasUsed in floatexponent (IEEE)One zero
Figure 1: Four signed number representations compared side by side

Core Concept

Four methods exist for representing signed integers in binary. Sign-magnitude stores the sign in the MSB and the magnitude in the remaining bits. It is intuitive but requires separate addition and subtraction hardware and has two zeros.

1s complement and 2s complement both encode the sign implicitly through the bit pattern. 2s complement is the universal standard in all modern CPUs because it has a single zero, supports simple addition/subtraction with one hardware unit, and simplifies overflow detection. The ARM Cortex-M4 APSR flags (N, Z, C, V) are designed around 2s complement arithmetic.

The fourth method, excess-N or biased notation, stores the value as (true value + N). Excess-127 is used for the exponent field of the IEEE 754 single-precision float. Biased encoding allows unsigned comparators to sort signed values directly, which is why it is used inside floating-point units.

Boolean Expression

For an n-bit 2s complement number with bits bₙ₋₁ ... b₁ b₀: value = −bₙ₋₁ × 2ⁿ⁻¹ + Σᵢ₌₀ⁿ⁻² bᵢ × 2ⁱ. For sign-magnitude: value = (−1)^bₙ₋₁ × (bₙ₋₂...b₀). For excess-N: value = code − N.

Example
Given:
  Identify the decimal value of 10110010 in each representation

Formula / Rule:
  Apply the appropriate formula for each format

Step by step:

  Sign-Magnitude:
    MSB=1 means negative. Magnitude = 0110010 = 50
    Value = -50

  1s Complement:
    MSB=1 means negative.
    Invert all bits: 01001101 = 77
    Value = -77

  2s Complement:
    MSB=1 means negative.
    Invert and add 1: 01001101 + 1 = 01001110 = 78
    Value = -78
    (Or: -128 + 32 + 16 + 2 = -78)

  Excess-127 (IEEE float exponent):
    Binary 10110010 = 178 unsigned
    Value = 178 - 127 = +51

Final Answer:
  Same bit pattern 10110010 means:
  SM: -50,  1sC: -77,  2sC: -78,  Excess-127: +51
Exam Tip: GATE problems regularly ask you to convert the same bit pattern under different signed representations. The three methods give three different values for any pattern with MSB=1. Also, the range of 2s complement is asymmetric: minimum is -2^(n-1), maximum is +2^(n-1)-1. For 8 bits: -128 to +127. Many students incorrectly state the range as -127 to +127.

Key Properties

  • Sign-magnitude: MSB = sign, rest = magnitude; range -(2ⁿ⁻¹-1) to +(2ⁿ⁻¹-1); two zeros
  • 1s complement: negate by inverting all bits; two zeros; needs end-around carry
  • 2s complement: negate by inverting + adding 1; one zero; range -2ⁿ⁻¹ to +2ⁿ⁻¹-1
  • Excess-N: value = stored_code − N; used in IEEE 754 exponent field with N=127 (single) or N=1023 (double)
  • 2s complement is standard in ARM Cortex, x86, 8051, 8085, RISC-V, and all modern DSPs
  • Overflow in 2s complement: adding two same-sign numbers yields opposite-sign result
  • IEEE 754 single precision: 1 sign bit, 8 biased exponent bits (excess-127), 23 mantissa bits

Quick Revision

  • Sign-magnitude: MSB is sign, not part of value
  • 1s complement negate: flip all bits; 2s complement negate: flip all bits + 1
  • 1s and sign-magnitude both have two zeros; 2s complement has one
  • 2s complement range (n-bit): -2^(n-1) to +2^(n-1)-1
  • Excess-127 used for IEEE 754 float exponent; allows direct unsigned comparison
  • All modern CPUs: 2s complement for integers
  • ARM APSR V flag signals 2s complement signed overflow
  • Exam trap: many students state 8-bit range as -127 to +127 — the correct range is -128 to +127

Signed Numbers Quiz

Test your knowledge of signed magnitude, 1s complement, and 2s complement representations.

Question 1 of 3

Q1.For an n-bit 2s complement system, what is the representable range?

Related Articles

Number System Conversions

Direct methods between binary, octal, decimal, hex.

8 min read

Hexadecimal Number System

Base-16, hex to binary and decimal conversion.

9 min read

Binary Number System

Base-2, place values, binary to decimal conversion.

9 min read

Octal Number System

Base-8, octal to binary and decimal conversion.

5 min read

1s Complement

Bitwise inversion, subtraction using 1s complement.

6 min read

Previous
2s Complement
Next
BCD Code
ECExplain

Open engineering curriculum for ECE, EEE & EI students. Dedicated to clear physical derivations, formula sheets, and live browser circuit simulations.

[email protected]
Follow @ecexplainECExplain Labs

Core Subjects

  • Analog Electronics
  • Digital Electronics
  • Signals & Systems
  • Control Systems
  • Electromagnetic Theory

Advanced Topics

  • Digital Communication
  • Analog Communication
  • Network Analysis
  • Microprocessors
  • VLSI Design

Revision Tools

  • Formula Sheets
  • Revision Notes
  • Component Comparison
  • Interview Questions
  • Interactive Labs (150+)

© 2026 ECExplain. Built for electrical & computer engineers.

AboutPrivacyTerms