Pearson Edexcel · GCSE · Computer Science

    Course version: 1CP2 · Version from Sept 2020

    Understand how computers represent and manipulate unsigned integers and…

    Full specification wording

    Binary: 2.1.2 understand how computers represent and manipulate unsigned integers and two’s complement signed integers

    Unsigned integers use every bit for magnitude, so an 8-bit unsigned pattern ranges from 00000000 (0) to 11111111 (255).

    Checked against the Pearson Edexcel 1CP2 specification (opens in a new tab) on .

    • Point 2 of 6
    • 4 key terms

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    Unsigned integers use every bit for magnitude, so an 8-bit unsigned pattern ranges from 00000000 (0) to 11111111 (255). Two's complement signed integers reserve the most significant bit as a sign indicator: 0 means non-negative and 1 means negative. To form the negative of a value, invert all bits and add 1; for example, +5 in 8 bits is 00000101, so −5 is 11111011. In 8-bit two's complement the range is −128 to +127, because 10000000 represents −128 and 01111111 represents +127. Addition and subtraction use the same binary circuits for both representations, and overflow occurs when a result falls outside the representable range.

    What earns the marks

    • Unsigned integers use all bits for magnitude, so an 8-bit unsigned integer ranges from 0 to 255.
    • In two's complement, the most significant bit indicates the sign: 0 for non-negative values and 1 for negative values.
    • The negative of a two's complement value is formed by inverting all bits and adding 1, for example +5 as 00000101 becomes −5 as 11111011 in 8 bits.
    • An 8-bit two's complement integer ranges from −128 to +127, with 10000000 representing −128 and 01111111 representing +127.
    • Addition and subtraction can be performed directly on two's complement patterns, and overflow occurs when the result lies outside the representable range.

    Common mistakes and how to put them right

    • Treating the most significant bit as a simple minus sign.

      Put it right: In two's complement the place value of the most significant bit is negative, which is why 10000000 represents −128.

    • Forgetting to add 1 after inverting the bits when negating a value.

      Put it right: Inversion alone gives the ones' complement, not the two's complement.

    • Assuming an 8-bit signed range is −127 to +127.

      Put it right: The correct range is −128 to +127 because there is one more negative value than positive values.

    Exam tips

    • Show each step when converting to two's complement: write the positive pattern, invert every bit, then add 1.
    • Check the sign bit first when reading a two's complement pattern, then evaluate the remaining bits to find the magnitude.
    • When adding or subtracting, state whether the result fits the range; if it does not, identify it as overflow.

    Try the lesson

    The start of the Binary: 2.1.2 understand how computers represent and manipulate unsigned integers and two’s complement signed integers lesson, made from checked teaching notes for this specification point.

    Have a go first

    What is the denary value of the unsigned 8-bit binary number 00101101?

    Listen

    Unsigned integers use every bit for magnitude, so an 8-bit unsigned pattern ranges from 00000000 (0) to 11111111 (255). Two's complement signed integers reserve the most significant bit as a sign indicator: 0 means non-negative and 1 means negative. To form the negative of a value, invert all bits and add 1; for example, +5 in 8 bits is 00000101, so −5 is 11111011. In 8-bit two's complement the range is −128 to +127, because 10000000 represents −128 and 01111111 represents +127. Addition and subtraction use the same binary circuits for both representations, and overflow occurs when a result falls outside the representable range. A strong answer earns marks for these points. Unsigned integers use all bits for magnitude, so an 8-bit unsigned integer ranges from 0 to 255. In two's complement, the most significant bit indicates the sign: 0 for non-negative values and 1 for negative values. The negative of a two's complement value is formed by inverting all bits and adding 1, for example +5 as 00000101 becomes −5 as 11111011 in 8 bits. An 8-bit two's complement integer ranges from −128 to +127, with 10000000 representing −128 and 01111111 representing +127. Exam tip: Show each step when converting to two's complement: write the positive pattern, invert every bit, then add 1.

    Key words

    Say what each word means before you turn the card.

    Unsigned integer representation

    Try answering aloud or in your head before turning the card.

    Two's complement signed representation

    Try answering aloud or in your head before turning the card.

    Sign bit and place value

    Try answering aloud or in your head before turning the card.

    Range and overflow

    Try answering aloud or in your head before turning the card.

    See every definition
    Unsigned integer representation
    Every bit is used for magnitude, so an 8-bit unsigned pattern ranges from 00000000 (0) to 11111111 (255).
    Two's complement signed representation
    The most significant bit is reserved as a sign indicator, where 0 means non-negative and 1 means negative.
    Sign bit and place value
    The most significant bit indicates the sign, and its place value is negative, which is why 10000000 represents −128.
    Range and overflow
    In 8-bit two's complement the range is −128 to +127, and overflow occurs when a result falls outside the representable range.

    There is more to this lesson

    The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of Binary: 2.1.2 understand how computers represent and manipulate unsigned integers and two’s complement signed integers

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge