Numverto logo NUMVERTO
Published: 5 min read By
binary complement number systems computer architecture

What is 1's Complement and 2's Complement in Binary?

Learn 1's complement and 2's complement with simple explanations, step-by-step examples, and practice problems for BCA/BTech exams.

Advertisement — Responsive Ad

Introduction

In digital computers, negative numbers cannot be stored using a minus sign the way we write them on paper. Instead, computers use binary complement systems to represent signed integers. The two most important methods are 1’s complement and 2’s complement. Understanding these is crucial for BCA, BTech, GATE, and any computer architecture course.

This guide explains both complement systems from scratch with worked examples, comparison tables, and common exam questions.

Why Do We Need Complements?

Computers store everything as binary bits (0s and 1s). To handle subtraction and negative numbers using the same hardware that handles addition, engineers developed complement notation. The most significant bit (MSB) indicates the sign: 0 for positive, 1 for negative.

1’s Complement

Definition

The 1’s complement of a binary number is obtained by flipping every bit — change all 0s to 1s and all 1s to 0s.

Steps to Find 1’s Complement:

  1. Write the binary number (pad to required bit width if needed)
  2. Flip every bit: 0 → 1 and 1 → 0
  3. The result is the 1’s complement

Example 1: Find 1’s complement of 01010110

Original:    0 1 0 1 0 1 1 0
1's comp:    1 0 1 0 1 0 0 1

Result: 10101001

Example 2: Find 1’s complement of 00001101

Original:    0 0 0 0 1 1 0 1
1's comp:    1 1 1 1 0 0 1 0

Result: 11110010

2’s Complement

Definition

The 2’s complement is found by taking the 1’s complement and adding 1 to the least significant bit.

Steps to Find 2’s Complement:

  1. Write the binary number
  2. Find the 1’s complement (flip all bits)
  3. Add 1 to the result
  4. The final number is the 2’s complement

Example 1: Find 2’s complement of 01010110

Original:     0 1 0 1 0 1 1 0
1's comp:     1 0 1 0 1 0 0 1
Add 1:      + 0 0 0 0 0 0 0 1
            ─────────────────────
2's comp:     1 0 1 0 1 0 1 0

Result: 10101010

Example 2: Find 2’s complement of 00000101 (decimal +5)

Original:     0 0 0 0 0 1 0 1  (+5)
1's comp:     1 1 1 1 1 0 1 0
Add 1:      + 0 0 0 0 0 0 0 1
            ─────────────────────
2's comp:     1 1 1 1 1 0 1 1  (−5)

Result: 11111011 represents −5 in 8-bit two’s complement.

Shortcut Method

Starting from the rightmost bit, keep all bits the same up to and including the first 1, then flip all remaining bits to the left.

Example: 01100000

  • Keep rightmost bits up to first 1: …00000 → first 1 is at position 5, keep 100000
  • Flip everything to the left: 01 → 10
  • Result: 10100000

Comparison: 1’s vs 2’s Complement

Feature1’s Complement2’s Complement
MethodFlip all bitsFlip all bits + add 1
Zero representationTwo zeros (+0 and −0)Single zero
Range (8-bit)−127 to +127−128 to +127
Used in modern CPUsRarelyStandard
SubtractionNeeds end-around carryDirect subtraction

Representing Negative Numbers

In an 8-bit system using 2’s complement:

  • +5 = 00000101
  • −5 = 11111011 (2’s complement of 00000101)
  • +127 = 01111111 (maximum positive)
  • −128 = 10000000 (minimum negative)

Subtraction Using 2’s Complement

To subtract A − B: find 2’s complement of B, then add it to A.

Example: 7 − 3 in 8-bit binary

7 in binary:     00000111
3 in binary:     00000011
2's comp of 3:   11111101

  00000111
+ 11111101
──────────
 100000100  (discard carry → 00000100 = 4)

Result: 4 ✓

Try It Online

Use the free 1’s & 2’s Complement Calculator on Numverto to compute both complements instantly with bit-by-bit working shown. Supports 4-bit, 8-bit, and 16-bit widths.

Frequently Asked Questions

What is the difference between 1’s complement and 2’s complement?

1’s complement simply flips all bits. 2’s complement flips all bits and adds 1. The key practical difference is that 2’s complement has only one representation of zero and is used by virtually all modern processors.

Why is 2’s complement preferred in modern computers?

2’s complement eliminates the dual-zero problem (both +0 and −0 in 1’s complement), simplifies addition/subtraction hardware, and provides one extra negative number in the representable range.

What is the 2’s complement of 0?

The 2’s complement of 00000000 is 100000000. In an 8-bit system, the overflow bit is discarded, giving 00000000 — zero is its own 2’s complement.

How do I find the decimal value of a 2’s complement number?

If the MSB is 0, interpret normally (positive). If the MSB is 1, take the 2’s complement to find the magnitude, then apply a negative sign. For example, 11111011: complement → 00000101 = 5, so the value is −5.

Can 2’s complement represent −128 in 8 bits?

Yes. The range is −128 (10000000) to +127 (01111111). This asymmetry happens because there is no −0, freeing one pattern for an extra negative value.

Advertisement — Responsive Ad

Share this article

Learn Faster with Numverto

Explore free number system converters, binary tools, EMI calculators, GST calculators, and educational guides.

About Numverto

Numverto logo

Numverto Editorial Team

Numverto publishes educational content about number systems, computer science concepts, binary arithmetic, financial calculations, EMI formulas, GST calculations, and practical learning resources for students and professionals.

About | Contact | Editorial Policy

Article Metadata

Tags: binary, complement, number systems, computer architecture

Last Updated: June 2026

Related Calculators

Advertisement — Responsive Ad

Related Articles

Popular Tools

View all 13 free tools → · Read tutorials · Number system guide