Skip to content
Computer ScienceISC Class 11 · System of Numeration

Binary Arithmetic, 1's and 2's Complement (ISC Class 11 Computer Science)

Updated 17 October 2026 · Fact-checked

In base b, addition proceeds digit by digit with a carry whenever a column sum reaches b. Binary rules: 0+0=0, 0+1=1, 1+1=10, 1+1+1=11. To subtract B from A in n bits using 2's complement, add A to the 2's complement of B (invert the bits of B and add 1): a carry out of the left is discarded and the result is positive; if there is no carry, the result is negative and its magnitude is the 2's complement of the sum. With 1's complement, a carry out is added back (end-around carry).

Subtract by adding the 2's complement: invert the bits, add 1, add to A, then throw away the carry out of the left to get a positive answer.

Illustration drawn for QuestionBuddy.

Understand Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication

Addition in base b. Add column by column from the right; if a column total is b or more, write total - b and carry 1. Binary: 1 + 1 = 10 (write 0, carry 1); 1 + 1 + 1 = 11. 1011 + 1101 = 11000 (11 + 13 = 24). Octal: 57 + 46 = 125 (47 + 38 = 85). Hexadecimal: 3A + 5F = 99 (58 + 95 = 153).

Complements (n-bit). *1's complement:* change every 0 to 1 and every 1 to 0. *2's complement:* 1's complement + 1. For 8 bits: 6 = 00000110; 1's complement = 11111001; 2's complement = 11111010 (this represents -6).

Subtraction A - B using 2's complement. (1) Write both in n bits. (2) Find the 2's complement of B. (3) Add it to A. (4) If there is a carry out of the left, discard it; the result is positive. (5) If there is no carry, the result is negative: take the 2's complement of the sum to get the magnitude.
13 - 6: 00001101 + 11111010 = 1 00000111: discard the carry: 00000111 = 7.
6 - 13: 00000110 + 11110011 (2's complement of 13) = 11111001, no carry: negative; its 2's complement is 00000111: the answer is -7.

Subtraction using 1's complement. Add the 1's complement of B to A. If there is a carry out, add it back to the sum (end-around carry): the result is positive. If there is no carry, the result is negative: take the 1's complement of the sum. 13 - 6: 00001101 + 11111001 = 1 00000110; add the carry: 00000111 = 7.

Multiplication. Multiply as in decimal using the multiplication table of the base and add the partial products. Binary: 101 x 11 = 101 + 1010 = 1111 (5 x 3 = 15). Octal: 25 x 3 = 77 (21 x 3 = 63). Hexadecimal: 1A x 2 = 34 (26 x 2 = 52).

Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication: key facts

Complements
1's complement: invert all bits | 2's complement = 1's complement + 1
For n bits.
2's complement subtraction
  • A - B = A + 2's complement of B
  • Carry out: discard, result positive
  • No carry: result negative
n-bit arithmetic.
Column rule
Column total >= b: write total - b, carry 1 | Binary: 1 + 1 = 10
Addition in base b.

How to answer Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication questions

Fix the number of bits first and keep every number to that length.

  1. 1Write both numbers in n bits (pad with zeros).
  2. 2Find the complement of the number being subtracted.
  3. 3Add and examine the carry out of the left end.
  4. 4Interpret the result: discard carry (positive) or complement again (negative).

Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication in real life

The idea, met in an everyday situation. Answer the question in your own words, then compare with the model answer. The one-line hook is what to remember.

Why complement

Suppose a calculator chip has an adder circuit but no separate subtractor.

How can it compute 13 - 6?

Try it first, then show the solutionSolution
  1. It adds 13 to the 2's complement of 6.
  2. 00001101 + 11111010 = 100000111; dropping the extra carry bit leaves 00000111 = 7.

Answer: 7, using only an adder.

Memory hook: Subtraction becomes addition of the complement.

Tricks to remember Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • Flip and add one

    2's complement: invert then add 1.

    Use it when: Complement.

  • Carry means positive

    Carry out in 2's complement subtraction: positive result.

    Use it when: Sign check.

  • End-around carry

    With 1's complement, add the carry back.

    Use it when: 1's complement.

Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication: solved examples

Ordered from board level to HOTS. Try each one before you open the solution.

Example 1: Binary sum · 1 mark · MCQBoard level

1011 + 1101 in binary is:
(a) 11000 (b) 10110 (c) 11110 (d) 10100

Try it first, then show the solutionSolution
  1. 11 + 13 = 24 = 11000.

Answer: (a) 11000

Example 2: Addition in bases · 3 marks · Short answerBoard level

Add: (i) 1011 + 1101 (binary) (ii) 57 + 46 (octal) (iii) 3A + 5F (hex). (3 marks)

Try it first, then show the solutionSolution
  1. (i) 11000.
  2. (ii) 7 + 6 = 13 = 15 (octal) write 5 carry 1; 5 + 4 + 1 = 10 = 12 (octal): write 2 carry 1: 125.
  3. (iii) A + F = 10 + 15 = 25 = 19 (hex): write 9 carry 1; 3 + 5 + 1 = 9: 99.

Answer: (i) 11000; (ii) 125; (iii) 99.

Example 3: 2's complement subtraction · 6 marks · Long answerHarder board level

Using 8-bit 2's complement, compute 13 - 6 and 6 - 13. Show the complement, the sum, the carry and the interpretation. (6 marks)

Try it first, then show the solutionSolution
  1. 6 = 00000110; 1's complement 11111001; 2's complement 11111010.
  2. 13 + (-6): 00001101 + 11111010 = 1 00000111; carry discarded: 00000111 = 7.
  3. 13 = 00001101; 1's 11110010; 2's 11110011.
  4. 6 + (-13): 00000110 + 11110011 = 11111001, no carry: negative.
  5. 2's complement of 11111001: 1's 00000110, plus 1 = 00000111 = 7: the answer is -7.

Answer: 13 - 6 = 7 (carry discarded); 6 - 13 = -7 (no carry, so negative with magnitude 7).

Example 4: 1's complement subtraction · 5 marks · Long answerHarder board level

Using 8-bit 1's complement subtraction compute 13 - 6 and 6 - 13 (show end-around carry for the first). (5 marks)

Try it first, then show the solutionSolution
  1. 13 - 6: 00001101 + 11111001 (1's complement of 6) = 1 00000110; add the carry back: 00000110 + 1 = 00000111 = 7.
  2. 6 - 13: 00000110 + 11110010 (1's complement of 13) = 11111000, no carry: negative.
  3. 1's complement of 11111000 = 00000111 = 7: the answer is -7.

Answer: 13 - 6 = 7 (end-around carry added); 6 - 13 = -7 (no carry; complement the sum).

Example 5: Multiplication and checking · 6 marks · Long answerHOTS / competency

Multiply 101 x 11 in binary, 25 x 3 in octal and 1A x 2 in hexadecimal and check each by converting to decimal. Then find the 8-bit 2's complement of 0 and explain what happens. (6 marks)

Try it first, then show the solutionSolution
  1. 101 x 11 = 101 + 1010 = 1111 = 15 (5 x 3).
  2. 25 octal = 21; 21 x 3 = 63 = 77 octal.
  3. 1A hex = 26; 26 x 2 = 52 = 34 hex.
  4. 0 = 00000000; 1's complement 11111111; add 1 = 1 00000000: the carry is discarded and the result is 00000000: the 2's complement of 0 is 0.

Answer: 1111 (15); 77 (63); 34 (52). The 2's complement of 0 is 0.

Where students lose marks in Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication

The slips examiners see most often, and what to write instead.

  • Mistake: Forgetting to add 1 for the 2's complement

    Stopping at the 1's complement.

    Wrong working

    11111001 used as -6

    Right working

    11111010

    Do this: Invert then add 1.

    Usually costs: 2 marks.

  • Mistake: Not keeping n bits

    Dropping leading zeros.

    Wrong working

    110 for 6 in 8-bit work

    Right working

    00000110

    Do this: Pad to n bits.

    Usually costs: 2 marks.

  • Mistake: Keeping the carry in 2's complement

    Extra bit left.

    Wrong working

    100000111

    Right working

    00000111

    Do this: Discard the carry out.

    Usually costs: 1-2 marks.

Exam tips

  • State the number of bits used.
  • Show the complement step explicitly.
  • Check by converting to decimal.

Practice questions on Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQBoard level

    In 8-bit arithmetic the 2's complement of 00000001 is:
    (a) 11111110 (b) 11111111 (c) 00000010 (d) 10000000

    Hint

    Invert then add 1.

    Answer

    (b) 11111111

  2. Q2 · 2 marks · Short answerBoard level

    Add 1101 and 0111 in binary and 7B and 2D in hexadecimal. (2 marks)

    Hint

    13 + 7; 123 + 45.

    Answer

    1101 + 0111 = 10100 (20). 7B + 2D = A8 (123 + 45 = 168).

  3. Q3 · 5 marks · Long answerHarder board level

    Using 8-bit 2's complement compute 25 - 18 and 18 - 25. (5 marks)

    Hint

    2's complement of 18 is 11101110.

    Answer

    18 = 00010010; 2's complement 11101110. 25 + (-18) = 00011001 + 11101110 = 1 00000111: carry discarded: 7. For 18 - 25: 25 = 00011001, 2's complement 11100111; 00010010 + 11100111 = 11111001, no carry: negative; 2's complement of 11111001 = 00000111: -7.

  4. Q4 · 4 marks · Short answerHarder board level

    Multiply 111 x 101 in binary and check in decimal; then multiply 17 x 5 in octal (decimal check). (4 marks)

    Hint

    7 x 5 = 35.

    Answer

    111 x 101 = 111 + 11100 = 100011 (35). 17 octal = 15; 15 x 5 = 75 = 113 octal.

  5. Q5 · 3 marks · Short answerHOTS / competency

    In a 4-bit system the largest positive number in 2's complement is 0111 (7). Show what happens when 5 + 4 is calculated and explain this overflow, and suggest a fix. (3 marks)

    Hint

    0101 + 0100.

    Answer

    0101 + 0100 = 1001, which in 2's complement is -7: overflow, since the true sum 9 does not fit in the range -8 to 7. Use more bits (such as 5 or 8) to hold the result.

Test your recall

Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.

  1. 1.1 + 1 in binary?Show answer

    10.

  2. 2.2's complement?Show answer

    1's complement + 1.

  3. 3.Carry in 2's complement subtraction?Show answer

    Discard; result positive.

  4. 4.No carry means?Show answer

    Negative result.

  5. 5.1's complement carry?Show answer

    Added back (end-around).

Arithmetic in Other Bases: Addition, Subtraction by 1's and 2's Complement, Multiplication: frequently asked questions

Why do computers use 2's complement?

One adder handles addition and subtraction.

What is the 8-bit range?

-128 to 127.

Is 1's complement common?

Rare now.

What is overflow?

A result too large for the bits.