GCSE · Computer Science · Eduqas · Spec C500QS

Sign and magnitude representation

A computer has no minus key, only bits. So how does it store −45? One bit gets a special job, and it is not part of the size at all.

​

Representing numbers

One pattern, two jobs

  1. 1 Explore
  2. 2 Translate
  3. 3 Spot the mismatch

Model. Every pattern and number here is an 8-bit example written by hand for this lesson: one sign bit plus seven magnitude bits. The same split works for other numbers of bits.

Step 1 · Explore

Tap the sign bit and see where it shows up in the other views. Then tap the magnitude bits. Now step through all four values: what changes between +45 and −45, and what stays exactly the same? Then look hard at +0 and −0.

Choose a value
Linked parts: select one to follow it through every representation

The leftmost bit on its own, then the seven bits after it.

Linked parts tried: 0 of 2. Values tried: 1 of 2.

Denary to sign and magnitude

Build −37 in 8 bits

Write −37 in 8-bit sign and magnitude. Two steps are missing: you supply them.

  1. Eight bits means 1 sign bit and 7 magnitude bits, so the size has to fit in 7 bits.
  2. Ignore the minus sign for a moment. The size is 37, and 37 = 32 + 4 + 1, which is 100101 in binary.
  3. missing step
Which line is step 3?

Sign and magnitude to denary

Catch the slip

A student converts the 8-bit sign and magnitude pattern 10110101 into a denary number. Find the line where the working goes wrong.

A student's working — which line goes wrong?

How big can it get?

The biggest positive number

What is the largest positive whole number that 8-bit sign and magnitude can store? Move the slider to commit to a guess, then lock it in.

Your estimate

150

0300

Predict, then check

In 8 bits, +5 is 00000101 and −3 is 10000011. Add them column by column, exactly as you would for unsigned binary.

Read the answer you get as a sign and magnitude number. What number is it?

Your turn

Describe the drawbacks

Describe two drawbacks of using sign and magnitude to represent whole numbers in binary. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

How a computer stores a negative number using nothing but 0s and 1s.

What you need to know

  • Sign and magnitude stores positive and negative whole numbers (integers) in binary, using a fixed number of bits.
  • The leftmost bit is the sign bit. The remaining bits are the magnitude, meaning the size of the number.
  • A sign bit of 0 means positive; a sign bit of 1 means negative.
  • Have a goWhich of these 8-bit patterns is positive: 01110000 or 11110000?

    01110000

    Only the leftmost bit decides the sign: 0 means positive and 1 means negative.

  • Read the magnitude bits as ordinary unsigned binary, with place values doubling right to left: 1, 2, 4, 8, and so on.
  • Have a goSam reads 10000101 as 133 (128 + 4 + 1) and is absolutely certain. What does 10000101 really mean?

    −5: the leftmost 1 means negative, and 0000101 is 4 + 1 = 5.

    Sam counted the leftmost bit as 128, but it is a sign bit, so it only sets the sign. The size comes from the other seven bits.

  • A number and its negative differ only in the sign bit: in 8 bits, +45 is 00101101 and −45 is 10101101.
  • To go from denary to sign and magnitude, write the size in n − 1 bits (padding with zeros), then set the sign bit.
  • To go back, convert the magnitude bits to denary, then make the result negative if the sign bit is 1.
  • With n bits, only n − 1 hold the magnitude, so the range is −(2^(n−1) − 1) to +(2^(n−1) − 1).
  • Have a goA sign and magnitude number has 4 bits. How many hold the magnitude, and what is the largest magnitude?

    3 bits hold the magnitude, and the largest magnitude is 7.

    One of the 4 bits is the sign bit, so n − 1 = 3 bits hold the size. The biggest 3-bit value is 111 = 7, which is 2^3 − 1.

  • In 8 bits that means −127 to +127. A value outside the range cannot be stored with that number of bits.
  • The drawbacks: two zeros (+0 and −0), a smaller largest positive value than unsigned, and addition needing extra logic.

The big picture

Sign and magnitude stores a whole number as a fixed-length pattern of bits. The leftmost bit is the sign bit (0 for positive, 1 for negative) and the remaining bits hold the size as ordinary unsigned binary. With n bits the range is −(2^(n−1) − 1) to +(2^(n−1) − 1). It is easy to read, but it has two zeros, a smaller largest positive value than unsigned binary, and awkward addition.

Key points

1Read the sign first: the leftmost bit says positive (0) or negative (1) and never adds to the size.
2The size comes from the n − 1 magnitude bits, read as ordinary binary.
3With n bits, the largest magnitude is 2^(n−1) − 1, so 8 bits cover −127 to +127.
4Three drawbacks: two zeros, a smaller largest positive value than unsigned, and addition that needs extra logic.

Worked example

Problem

Write −100 in 8-bit sign and magnitude, then write +100 and compare the two patterns.

⚠ Watch out

Reading the leftmost bit as just another place value. In 8 bits it is not worth 128: it only sets the sign. So 10101101 is −45, not 173. Convert the magnitude bits on their own, then apply the sign.

🧠

Memory hook

Head and body. The sign bit is the head: it decides plus or minus. The other bits are the body: they carry the size. Swap the head and +45 becomes −45; the body never changes.

✓

Check yourself

From memory: which bit decides the sign? What does the 5-bit pattern 10111 mean in sign and magnitude, and what range can 5 bits store? (Answers: the leftmost bit; −7; −15 to +15.)

Flashcards

(12)
What is sign and magnitude?
A way of representing positive and negative whole numbers (integers) in binary using a fixed number of bits.
Which bit is the sign bit, and what do the other bits hold?
The most significant (leftmost) bit is the sign bit. The remaining bits hold the magnitude (size) of the number.
What do sign bits 0 and 1 mean?
A sign bit of 0 means the number is positive. A sign bit of 1 means the number is negative.
How are the magnitude bits read?
As an ordinary unsigned binary number, with place values that double from right to left (1, 2, 4, 8, ...), starting from the bit next to the sign bit.
Converting from denary: which do you deal with first, the size or the sign bit?
Write its absolute value in binary using the n − 1 magnitude bits, padding with leading zeros. Then set the sign bit to 0 if positive or 1 if negative.
Converting back to denary: what happens to the sign bit?
Convert the magnitude bits to denary. Then make the result negative if the sign bit is 1, or leave it positive if the sign bit is 0.
How do the patterns for +n and −n differ?
Only in the sign bit. For example, in 8 bits +45 is 00101101 and −45 is 10101101.
Why is the largest magnitude with n bits 2^(n−1) − 1?
One bit is used for the sign, so only n − 1 of the n bits hold the magnitude.
What is the 8-bit range, and what happens to a value outside it?
−127 to +127. A value whose magnitude does not fit in the magnitude bits cannot be represented with that number of bits.
Drawback: what is wrong with zero in sign and magnitude?
It has two representations, +0 and −0 (00000000 and 10000000 in 8 bits). This wastes one bit pattern and complicates comparing values.
Drawback: how does the largest positive value compare with unsigned binary?
It is smaller, because the sign bit is not used for size: +127 rather than 255 with 8 bits.
Drawback: what goes wrong when you add sign and magnitude numbers?
Ordinary binary addition does not always give the correct result, in particular when the signs differ. A computer needs extra logic to handle the sign separately.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.