🎓 Learning Journey · Topic 1.2B · Cornerstone

Your journey through Shifts & Negative Numbers

Logical binary shifts (left ×2 per shift · right ÷2 per shift) and two's complement negative numbers (mirror-and-nudge). Seven stages from theory to mastery. Click any stage card to dive in — or continue where you left off.

Your progress

Where you are in Topic 1.2B

0 / 7Stages visited
0%Accuracy
0 / 10Mastery checklist
🎯 Recommended next stage

Start with Book Notes

Read the theory and terminology to get grounded.

The 7 stages

Choose any stage

Green cards are stages you've already visited. Grey cards are new territory. Click any card to jump straight to that stage.

📚 Topic 1.2B · Data Representation · Cornerstone

Shifts & Negative Numbers

Logical shifts move bits left or right (each shift ×2 or ÷2), and two's complement lets 8-bit registers store negative numbers. This lesson covers both, with the two verbatim examiner traps that catch students every session.

🧪 Cambridge Exam Mode ON — hints hidden, feedback delayed, model answers locked until marking.
§1 · Topic overview

What is Topic 1.2B?

A logical binary shift moves every bit a fixed number of places left or right. A left shift by n multiplies the value by 2n; a right shift by n divides by 2n (integer division). Bits that fall off the end are lost forever; empty positions are filled with zeros.

Two's complement is how computers store negative numbers in a fixed-size register. In 8-bit two's complement, the most significant bit (MSB) has place value −128 (not +128). The range becomes −128 to +127 instead of 0 to 255.

Note: binary addition and overflow are covered in 1.2A Binary Operations Trainer. This lesson (1.2B) covers shifts and two's complement only.

§2 · Learning objectives

By the end of 1.2B you can…

  • Perform a logical left shift and state the ×2n effect
  • Perform a logical right shift and state the ÷2n effect
  • State that bits shifted off the end are lost and empty positions are filled with 0
  • Give a use for logical shifts (e.g. fast multiplication/division by powers of 2)
  • Define two's complement and state that the MSB has place value −128
  • Convert a positive denary number to 8-bit two's complement (just its binary)
  • Convert a negative denary number to 8-bit two's complement (mirror-and-nudge)
  • Convert 8-bit two's complement back to denary (check MSB, apply place values)
  • State the 8-bit two's complement range: −128 to +127
§3 · Key terminology

Cambridge-approved terms

TermDefinition
Logical shiftAn operation that moves every bit a fixed number of places left or right. Bits off the end are lost; empty positions are filled with 0.
Left shiftEach bit moves one place to the left. A single left shift multiplies the value by 2.
Right shiftEach bit moves one place to the right. A single right shift divides the value by 2 (integer division).
MSBMost Significant Bit — the leftmost bit. In unsigned binary it's worth +128; in two's complement it's worth −128.
LSBLeast Significant Bit — the rightmost bit, place value 1.
Two's complementA method of representing signed integers where the MSB has a negative place value. Enables an 8-bit register to store negative numbers.
Sign bitThe MSB of a two's complement number: 0 means positive/zero, 1 means negative.
Mirror-and-nudgeMethod to convert negative denary to two's complement: write the positive binary, flip every bit, add 1.
Signed vs unsignedSigned uses two's complement (range −128 to +127 for 8-bit). Unsigned treats all bits as positive (range 0 to 255 for 8-bit).
§4 · Core theory

The three tables you must know cold

Shift effect on value

OperationEffect on valueMultiplier
Left shift by 1Multiply by 2×2
Left shift by 2Multiply by 4×4 (not ×2)
Left shift by 3Multiply by 8×8
Right shift by 1Divide by 2 (integer)÷2
Right shift by 2Divide by 4 (integer)÷4
Right shift by nMultiply by 2n (left) or divide by 2n (right)2n

Two's complement 8-bit place values

ColumnPlace value (unsigned)Place value (two's complement)
Column 8 (MSB)128−128
Column 76464
Column 63232
Column 51616
Column 488
Column 344
Column 222
Column 1 (LSB)11

8-bit range

SystemMinimumMaximumTotal values
Unsigned0 (00000000)255 (11111111)256
Two's complement (signed)−128 (10000000)+127 (01111111)256
§5 · Worked examples

Watch each conversion done step by step

Worked example 1 · Left shift by 2 (×4 effect)

Perform a logical left shift of 2 places on 00001101.

Original: 0 0 0 0 1 1 0 1 (denary 13) Shift left by 2 places: Each bit moves 2 places left. Two 0s fill the vacated positions on the right. Result: 0 0 1 1 0 1 0 0 (denary 52) Effect: 13 × 2² = 13 × 4 = 52 ✓ NOT 13 × 2 = 26. Shift by 2 = ×4, not ×2.

Worked example 2 · Right shift by 3 (÷8 effect)

Perform a logical right shift of 3 places on 11000000.

Original: 1 1 0 0 0 0 0 0 (unsigned denary 192) Shift right by 3 places: Each bit moves 3 places right. The 3 rightmost bits fall off and are lost. Three 0s fill the vacated positions on the left. Result: 0 0 0 1 1 0 0 0 (denary 24) Effect: 192 ÷ 2³ = 192 ÷ 8 = 24 ✓

Worked example 3 · −45 in two's complement (mirror-and-nudge)

Convert denary −45 to 8-bit two's complement.

Step 1 · Write POSITIVE 45 in 8-bit binary: 0 0 1 0 1 1 0 1 Step 2 · MIRROR (flip every bit): 1 1 0 1 0 0 1 0 Step 3 · NUDGE (add 1): 1 1 0 1 0 0 1 0 + 1 ───────────────── = 1 1 0 1 0 0 1 1 Answer: 11010011 = −45 in two's complement. Check: −128 + 64 + 16 + 2 + 1 = −45 ✓

Worked example 4 · Convert two's complement to denary

Convert two's complement 10110100 to denary.

Column: MSB 64 32 16 8 4 2 1 Value: −128 64 32 16 8 4 2 1 Bit: 1 0 1 1 0 1 0 0 Multiply and add: = (1×−128) + (0×64) + (1×32) + (1×16) + (0×8) + (1×4) + (0×2) + (0×1) = −128 + 32 + 16 + 4 = −76 Answer: 10110100 = −76 in two's complement. Warning: the SAME bit pattern in unsigned would be 180. Different system, different value.
§6 · Common misconceptions

Traps that cost marks every session

Trap · MSB used as +128 in two's complement

In two's complement, the MSB has place value −128, not +128. This is the single most common two's complement trap. Reading 10000000 as +128 gives −128 the wrong sign completely.

Cited: 2024 M/J examiner report — verbatim: "using this value as 128 rather than –128"

Trap · Shift by 2 = ×2 (should be ×4)

A left shift by 2 places multiplies by 2² = 4, not by 2. Students confuse "shift 2 places" with "×2". Each additional place doubles the effect.

Cited: 2024 examiner report — verbatim: "most common incorrect answer given was that it would multiply the binary number by 2"

Trap · Filling with 1s instead of 0s

Logical shifts always fill vacated positions with 0. Filling with 1s is arithmetic shift (not on the 0478 syllabus). Cambridge only test logical shifts.

Cited: recurring shift-question mistake

Trap · Wrong direction assumed

Some students automatically read "shift" as "shift right". Read the question — Cambridge specify left or right in every question.

Cited: recurring pattern

Trap · Forgetting to add 1 in two's complement conversion

The method is mirror-and-nudge: flip every bit, then add 1. Students often flip the bits and forget the +1, giving one's complement (which is wrong for Cambridge).

Cited: recurring two's complement mistake

Trap · Signed range given as −127 to +127

The 8-bit two's complement range is −128 to +127 — not symmetric. The extra value comes from the MSB being −128, giving one more negative value than positive.

Cited: recurring pattern
§7 · Cambridge exam focus

Mark-scheme templates

These are the exact phrasings Cambridge accept. Learn them.

"A logical shift moves every bit a fixed number of places; bits that fall off the end are lost; empty positions are filled with 0" — the definition
"A left shift by n places multiplies the value by 2n" — the effect
"A right shift by n places divides the value by 2n" — the effect
"In two's complement, the MSB has place value −128" — the definition
"To convert a negative denary number: write the positive in binary, flip every bit, add 1" — mirror-and-nudge
"8-bit two's complement range: −128 to +127"
Never write: MSB is 128 in two's complement · shift 2 = ×2 · fill with 1s · range is −127 to +127
§8 · Quick knowledge check

Check yourself — tap to reveal (0/6)

Answer these in your head, then tap to see the model answer. Aim for 5 or 6 right before moving on.

Q1 · What is the effect of a left shift by 3?
Multiply by 2³ = 8. NOT 3 or 6 — each additional place doubles the effect.
Q2 · What fills vacated positions in a logical shift?
Zeros. Always. Filling with 1s would be arithmetic shift, not on the syllabus.
Q3 · What place value does the MSB have in 8-bit two's complement?
−128 (negative one hundred and twenty-eight). Not +128.
Q4 · What is the 8-bit two's complement range?
−128 to +127. Not symmetric — one extra negative.
Q5 · How do you convert a negative denary number to two's complement?
Write the positive in binary, flip every bit (mirror), add 1 (nudge).
Q6 · Convert 10000001 (two's complement) to denary.
−128 + 1 = −127. (Only bits 8 and 1 are set.)
🚀 Ready for Activities
If you can answer 5 of the 6 knowledge checks above, you're ready to move on. Tap 🎓 Learn for the interactive Shift Simulator and Two's Complement Converter, then 🎮 Activities to practise.
Logical shifts · the mechanics

How a logical shift works

⬅️

Left shift

Every bit moves left. Bits off the left edge are lost. Zeros fill on the right.

Effect: value is multiplied by 2n where n is the number of places.

➡️

Right shift

Every bit moves right. Bits off the right edge are lost. Zeros fill on the left.

Effect: value is divided by 2n (integer division).

🎯

Why use shifts?

They're the fastest way for a CPU to multiply or divide by powers of 2. Also used for extracting individual bits and packing data into registers.

Inline trap · Shift by 2 ≠ ×2

A left shift by 2 places multiplies by 2² = 4. This is the most common wrong answer on shift questions.

Cited: 2024 examiner report — verbatim
Signature interactive · Shift Simulator

The Shift Simulator

Type an 8-bit binary number, choose direction and places, then see the shifted result with lost bits marked and filled positions highlighted.

8-bit binary input
Direction
Number of places
Two's complement · the mechanics

Storing negative numbers in 8 bits

Unsigned 8-bit binary can store 0 to 255. But we also need negative numbers. The clever trick: reinterpret the MSB as having value −128 instead of +128. Now bit patterns starting with 1 are negative, and the same 256 patterns cover the range −128 to +127.

🪞 Mirror-and-nudge method

To convert a negative denary number to two's complement:

  1. Write the positive version in 8-bit binary
  2. Mirror: flip every bit (0→1, 1→0)
  3. Nudge: add 1

Example: −45 → +45 = 00101101 → mirror = 11010010 → nudge = 11010011.

🔎 Two's complement → denary

Read left to right using place values −128, 64, 32, 16, 8, 4, 2, 1. Multiply each bit by its place value and add.

Example: 10110100 = (−128) + 32 + 16 + 4 = −76.

Inline trap · MSB is −128

The single most common two's complement mistake is treating the MSB as +128. In two's complement it's −128. Always.

Cited: 2024 M/J examiner report — verbatim: "using this value as 128 rather than –128"
Cambridge syntax reference

How Cambridge phrase these questions

"Perform a logical left shift of 3 places on the following binary number." — 1 mark for correct result.
"State the effect of a logical left shift of 2 places on the value." — 1 mark. Answer: multiplied by 4.
"Convert −45 to 8-bit two's complement. Show your working." — 3 marks. Method marks for mirror + nudge.
"Convert the two's complement number 11010011 to denary." — 2 marks. Method marks for using −128 as MSB.
"State the range of an 8-bit two's complement number." — 1 mark. −128 to +127.
"Give one benefit of using two's complement." — 1 mark. Enables representation of negative numbers within a fixed-size register.
Working quick check

One more sanity check

In two's complement, the MSB of an 8-bit number represents:

+128
−128
+256
The sign only, no value

Activity 1 — Shift Drill medium

Apply the specified shift and type the resulting 8-bit binary.

Press New Question.

Stretch: 5 in a row across mixed left/right shifts.

Activity 2 — Two's Complement Converter medium

Convert the given denary value to 8-bit two's complement, or vice versa.

Press New Question.

Stretch: after getting one right, explain the mirror-and-nudge steps aloud.

Activity 3 — Shift Effect Quiz medium

What effect does the shift have on the value?

Press New Question.

Stretch: shift 3 = ×8. Shift 4 = ×16. Notice the pattern: 2n.

Activity 4 — Spot the Mistake medium

Which statement about shifts or two's complement is WRONG?

Press New Question.

Stretch: explain out loud why the wrong statement is wrong, using mark-scheme phrasing.

Activity 5 — 60-second Sprint exam

Answer as many shift + two's complement questions as you can in 60 seconds.

60Seconds left
0Correct
0Personal best

Press Start Sprint to begin.

Stretch: beat your personal best twice in a session.

Adaptive practice

Weak skills come round twice as often. No question repeats immediately. 20 questions across 8 skills.

All Easy Medium Exam

Press New Question.

Cambridge-style exam questions

12 questions in Cambridge Paper 1 style. Every question cites its source. Write your answer, then click Mark for keyword scoring.

Press New Question to begin.

Quick review quiz

Press New Question.

Exam traps — confirmed by examiners

Every trap below is drawn from a real Cambridge examiner report or a recurring pattern flagged across multiple sessions.

Trap 1 · MSB used as +128 in two's complement

The MSB is −128 in two's complement, not +128. This single mistake wrecks every two's complement answer.

Cited: 2024 M/J examiner report — verbatim: "using this value as 128 rather than –128"

Trap 2 · Shift by 2 = ×2 (should be ×4)

Left shift by n places multiplies by 2n. Shift by 2 = ×4, not ×2.

Cited: 2024 examiner report — verbatim: "most common incorrect answer given was that it would multiply the binary number by 2"

Trap 3 · Filling with 1s instead of 0s

Logical shifts always fill with 0. Filling with 1s is arithmetic shift, not on the 0478 syllabus.

Cited: recurring shift-question mistake

Trap 4 · Direction assumed rather than read

Cambridge always specify left or right. Read the question — don't default.

Cited: recurring pattern

Trap 5 · Forgetting the "nudge" (+1)

Two's complement is mirror-and-nudge. Flip every bit, then add 1. Skipping the +1 gives one's complement, which is wrong.

Cited: recurring two's complement mistake

Trap 6 · Signed range given as −127 to +127

The 8-bit two's complement range is −128 to +127. Not symmetric.

Cited: recurring pattern

Trap 7 · Losing track of the "lost" bits

In right shift by 3, the three rightmost bits fall off (are lost). Students sometimes drop the wrong end's bits.

Cited: recurring shift mistake

Trap 8 · Using unsigned reading for two's complement bits

The same bit pattern has different values in the two systems. 10110100 = 180 unsigned or −76 two's complement. Read the question format.

Cited: recurring interpretation mistake

Trap 9 · Applying shift as ×n rather than ×2n

Shift by 3 = ×8 (2³), not ×3 or ×6. Always powers of 2.

Cited: recurring shift arithmetic mistake

Memory triggers

🧠 "Shift by n → power of 2 to the n"

Left shift n places = ×2n. Right shift n places = ÷2n. Always powers of 2, never just ×n.

🧠 "MSB is minus 128"

Two's complement 8-bit: MSB place value is −128. Say it out loud until you can't forget it.

🧠 "Mirror and nudge"

Two's complement for negatives: flip every bit (mirror), then add 1 (nudge). Miss the +1 and you get one's complement.

🧠 "Zero the empties"

Logical shift: whatever end is vacated, fill with 0. Left shift → 0s on right. Right shift → 0s on left.

🧠 "Read the direction"

Cambridge always specify left or right. Never default. Circle the direction word before shifting.

🧠 "Range: −128 to +127"

Not −127 to +127 (that would be one's complement). Not −128 to +128 (that's 257 values). Exactly −128 to +127.

Skill grid — tap any badge to override

Green ≥ 70% · Yellow 30–69% · Grey untried. Tap any cell to manually mark a skill as mastered.

Revision checklist

Ten items. Tap each once you're confident. When all 10 are ticked, 1.2B is mastered.

💔 Mistake Tracker

Learn from mistakes

Every wrong answer is logged. See your weak areas and turn them into vault entries.

Mistake log

📊 Progress

Your 1.2B progress

Track accuracy, streaks, and mastery in one place.

Overall statistics

0%Accuracy
0Answered
0Streak

Performance chart

🔖 Bookmarks

Saved Bookmarks

Quick links to questions and activities you want to revisit.

Your bookmarks

📝 My Notes

Your personal notes

Jot down anything useful during your session — questions, mnemonics, or gaps you want to come back to.

Add a note

Title
Note

Saved notes

🗄️ Knowledge Vault

Exam Knowledge Vault

Store definitions, mark-scheme points, model answers, and common mistakes.

Add exam information

Category
Confidence
Title
Exam information

Vault entries