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.
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?
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
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?
Which bit is the sign bit, and what do the other bits hold?
What do sign bits 0 and 1 mean?
How are the magnitude bits read?
Converting from denary: which do you deal with first, the size or the sign bit?
Converting back to denary: what happens to the sign bit?
How do the patterns for +n and −n differ?
Why is the largest magnitude with n bits 2^(n−1) − 1?
What is the 8-bit range, and what happens to a value outside it?
Drawback: what is wrong with zero in sign and magnitude?
Drawback: how does the largest positive value compare with unsigned binary?
Drawback: what goes wrong when you add sign and magnitude numbers?
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 postedMore Eduqas GCSE Computer Science topics
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.