Pearson Edexcel · GCSE · Computer Science

    Course version: 1CP2 · Version from Sept 2020

    Be able to add together two positive binary patterns and apply logical and…

    Full specification wording

    Binary: 2.1.4 be able to add together two positive binary patterns and apply logical and arithmetic binary shifts

    This topic covers adding two positive binary patterns and applying logical and arithmetic shifts.

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

    • Point 4 of 6
    • 4 key terms

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    This topic covers adding two positive binary patterns and applying logical and arithmetic shifts. To add, align the bits and work from right to left using 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 0 carry 1. For example, 00101100 (44) + 00010111 (23) = 01000011 (67). A logical left shift moves every bit one place left, puts 0 in the least significant bit, and multiplies the unsigned value by 2; a logical right shift moves every bit one place right, puts 0 in the most significant bit, and divides the unsigned value by 2, discarding any remainder. An arithmetic left shift works in the same way as a logical left shift for positive patterns. An arithmetic right shift moves every bit right but copies the original most significant bit into the new most significant bit, preserving the sign of a signed pattern.

    What earns the marks

    • Binary addition: add the two positive patterns column by column from right to left, writing 0 and carrying 1 when 1 + 1 occurs; for example 00101100 + 00010111 = 01000011.
    • Logical left shift: move each bit one place to the left, insert 0 as the least significant bit, and state that the unsigned value is multiplied by 2; for example 00001010 becomes 00010100.
    • Logical right shift: move each bit one place to the right, insert 0 as the most significant bit, and state that the unsigned value is divided by 2 with any remainder discarded; for example 00001010 becomes 00000101.
    • Arithmetic right shift: move each bit one place to the right but copy the original most significant bit into the new most significant bit, preserving the sign of a signed pattern; for example 10000010 becomes 11000001.
    • Arithmetic left shift: for positive patterns, shift each bit one place left and insert 0 as the least significant bit, which multiplies the value by 2.

    Common mistakes and how to put them right

    • Forgetting to carry 1 when adding 1 + 1.

      Put it right: Write 0 in that column and carry 1 to the next column to the left.

    • Using a logical right shift on a signed negative pattern and expecting the sign to be preserved.

      Put it right: Use an arithmetic right shift, which copies the original most significant bit into the new most significant bit.

    • Shifting in the wrong direction.

      Put it right: A left shift moves bits towards the most significant end and multiplies by 2; a right shift moves bits towards the least significant end and divides by 2.

    • Ignoring overflow when a left shift pushes a 1 out of the 8-bit pattern.

      Put it right: State that the bit shifted out is lost and the result may no longer fit in 8 bits.

    Exam tips

    • Line up the two binary patterns carefully before adding, and work from right to left so carries are not missed.
    • For shifts, write the original pattern above the shifted pattern so you can see which bit has moved where.
    • State the effect on the value, such as multiplied by 2 or divided by 2, as well as showing the shifted pattern.

    Try the lesson

    The start of the Binary: 2.1.4 be able to add together two positive binary patterns and apply logical and arithmetic binary shifts lesson, made from checked teaching notes for this specification point.

    Have a go first

    Add the positive 4-bit binary patterns 0101 and 0011 using column addition, carrying values into the next column when needed. What is the 4-bit result?

    Listen

    This topic covers adding two positive binary patterns and applying logical and arithmetic shifts. To add, align the bits and work from right to left using 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 0 carry 1. For example, 00101100 (44) + 00010111 (23) = 01000011 (67). A logical left shift moves every bit one place left, puts 0 in the least significant bit, and multiplies the unsigned value by 2; a logical right shift moves every bit one place right, puts 0 in the most significant bit, and divides the unsigned value by 2, discarding any remainder. An arithmetic left shift works in the same way as a logical left shift for positive patterns. An arithmetic right shift moves every bit right but copies the original most significant bit into the new most significant bit, preserving the sign of a signed pattern. A strong answer earns marks for these points. Binary addition: add the two positive patterns column by column from right to left, writing 0 and carrying 1 when 1 + 1 occurs; for example 00101100 + 00010111 = 01000011. Logical left shift: move each bit one place to the left, insert 0 as the least significant bit, and state that the unsigned value is multiplied by 2; for example 00001010 becomes 00010100. Logical right shift: move each bit one place to the right, insert 0 as the most significant bit, and state that the unsigned value is divided by 2 with any remainder discarded; for example 00001010 becomes 00000101. Arithmetic right shift: move each bit one place to the right but copy the original most significant bit into the new most significant bit, preserving the sign of a signed pattern; for example 10000010 becomes 11000001. A common slip: Forgetting to carry 1 when adding 1 + 1. Instead, write 0 in that column and carry 1 to the next column to the left. Exam tip: Line up the two binary patterns carefully before adding, and work from right to left so carries are not missed.

    Key words

    Say what each word means before you turn the card.

    Binary addition with carry

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

    Logical left shift

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

    Logical right shift

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

    Arithmetic right shift

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

    See every definition
    Binary addition with carry
    Adding two positive binary patterns column by column from right to left, writing 0 and carrying 1 when 1 + 1 occurs.
    Logical left shift
    Moving every bit one place left, putting 0 in the least significant bit, and multiplying the unsigned value by 2.
    Logical right shift
    Moving every bit one place right, putting 0 in the most significant bit, and dividing the unsigned value by 2, discarding any remainder.
    Arithmetic right shift
    Moving every bit right but copying the original most significant bit into the new most significant bit, preserving the sign of a signed pattern.

    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.4 be able to add together two positive binary patterns and apply logical and arithmetic binary shifts

    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