Two's Complement (CIE IGCSE Computer Science)

Revision Note

Test Yourself
Becci Peters

Expertise

Computer Science

Two's Complement

  • Two's complement is a method of representing signed integers in binary form, where the leftmost bit represents the sign (0 for positive and 1 for negative)
  • To convert a positive number to a two's complement 8-bit integer, first represent the number in binary form with leading zeros until it is 8 bits long. If the number is positive, the leftmost bit should be 0
  • To convert a negative number to a two's complement 8-bit integer, first invert all the bits in the binary representation of the positive equivalent of the number (i.e., flip all the 1's to 0's and all the 0's to 1's). Then, add 1 to the result to obtain the two's complement representation

Two's complement walkthrough:

  • The binary number 00101011 represents the positive integer 43 in 8-bit binary form
  • E.g. to represent the negative integer -43 in two's complement 8-bit form, start by representing the positive equivalent of 43 in binary form: 00101011. Then invert all the bits to get 11010100, and add 1 to get 11010101

You've read 0 of your 0 free revision notes

Get unlimited access

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Becci Peters

Author: Becci Peters

Becci has been a passionate Computing teacher for over 9 years, teaching Computing across the UK helping to engage, interest and develop confidence in the subject at all levels. Working as a Head of Department and then as an educational consultant, Becci has advised schools in England, where her role was to support and coach teachers to improve Computing teaching for all. Becci is also a senior examiner for multiple exam boards covering GCSE & A-level. She has worked as a lecturer at a university, lecturing trainee teachers for Computing.