Short answer
Sign and magnitude is a method of representing negative integers in binary by dedicating the most-significant bit (MSB) to indicate the sign: 0 means positive and 1 means negative. The remaining bits represent the magnitude — the absolute value — of the number, exactly as in ordinary unsigned binary.
At a glance
- Key stage
- GCSE
- Subject
- Computing
- Type
- Explainer
- For
- Students
- Read time
- 5 min
- Last updated
- 8 October 2026
Where this fits
- Key Stage 3Years 7–9
- GCSEYears 10–11This article
How does sign and magnitude work in practice?
In an 8-bit sign-and-magnitude system, the leftmost bit is the sign bit and the rightmost seven bits store the magnitude.
Worked examples — 8-bit sign and magnitude:
| Decimal | Binary | Explanation |
|---|---|---|
| +25 | 0001 1001 |
MSB = 0 (positive); magnitude = 25 |
| −25 | 1001 1001 |
MSB = 1 (negative); magnitude = 25 (same bits!) |
| +127 | 0111 1111 |
MSB = 0; magnitude = 127 (maximum positive) |
| −127 | 1111 1111 |
MSB = 1; magnitude = 127 (minimum negative) |
| +0 | 0000 0000 |
Positive zero |
| −0 | 1000 0000 |
Negative zero (a problem — see below) |
To convert a decimal number to 8-bit sign and magnitude:
- Note the sign — write 0 (positive) or 1 (negative) as the MSB.
- Convert the absolute value to 7-bit binary and place it in bits 6–0.
What is the range of sign and magnitude?
For an n-bit sign-and-magnitude representation:
- The MSB carries the sign, leaving n − 1 bits for the magnitude.
- Maximum positive value: 2^(n−1) − 1
- Minimum negative value: −(2^(n−1) − 1)
| Bit width | Range |
|---|---|
| 4-bit | −7 to +7 |
| 8-bit | −127 to +127 |
| 16-bit | −32,767 to +32,767 |
Compare this with two's complement, which uses the same number of bits but achieves a slightly wider range (8-bit two's complement spans −128 to +127), because it avoids the wasted negative-zero representation.
What is the two-zero problem?
Sign and magnitude has two distinct binary patterns for zero: +0 (0000 0000) and −0 (1000 0000). Mathematically, there is only one zero, so having two representations wastes a pattern that could have extended the range by one. Worse, hardware must explicitly handle both patterns whenever it tests for zero, adding complexity to processor circuits.
Two's complement avoids this entirely — it has exactly one representation for zero — which is the main reason modern processors use two's complement for signed integer arithmetic.
How does sign and magnitude compare with two's complement?
| Property | Sign and magnitude | Two's complement |
|---|---|---|
| Sign indicator | MSB: 0 = positive, 1 = negative | MSB is a weighted "−2^(n−1)" position |
| Zero representations | Two (+0 and −0) | One |
| Range (8-bit) | −127 to +127 | −128 to +127 |
| Arithmetic simplicity | Separate sign logic needed | Standard addition works for all cases |
| Negation | Flip the MSB | Invert all bits and add 1 |
| Used in modern CPUs | No | Yes |
The critical practical advantage of two's complement is that a single adder circuit handles both positive and negative numbers without any special cases. With sign and magnitude, the adder would need to inspect the sign bits and decide whether to add or subtract, doubling the circuit complexity.
Where is sign and magnitude actually used today?
Despite its disadvantages for integers, sign and magnitude is used in IEEE 754 floating-point numbers — the standard used for floating-point arithmetic in virtually all modern computers. The 32-bit single-precision format stores:
- 1 sign bit (exactly sign and magnitude's approach).
- 8 exponent bits (stored in a biased form, not two's complement).
- 23 mantissa bits.
The sign bit in floating-point works identically to sign and magnitude: 0 is positive, 1 is negative. The rest of the number (exponent and mantissa) uses different encoding, but the sign-bit concept survives because floating-point was designed independently of integer arithmetic.
Frequently asked questions
How do I negate a number in sign and magnitude?
Simply flip the MSB. To convert +25 (0001 1001) to −25, change bit 7 from 0 to 1: 1001 1001. That is all — the magnitude bits are untouched. This is much simpler than two's complement negation (invert all bits, add 1), which is one reason sign and magnitude appeals to beginners, even though two's complement wins overall.
Why do GCSE exams test sign and magnitude if processors use two's complement?
Both representations appear in GCSE specifications because understanding sign and magnitude makes the motivation for two's complement clearer. If you understand the two-zero problem and the arithmetic complexity of sign and magnitude, the design decisions behind two's complement make sense rather than seeming arbitrary. Examiners use sign and magnitude to test whether students understand the purpose of the sign bit, not just the mechanics of one specific encoding.
Can I use sign and magnitude to add negative numbers directly?
Not simply. Adding +5 (0000 0101) and −3 (1000 0011) in sign and magnitude gives 1000 1000, which the rules would read as −8 — wrong. Correct addition requires inspecting the signs, comparing magnitudes, choosing whether to add or subtract, and then determining the resulting sign. This is why circuits implementing sign-and-magnitude arithmetic are significantly more complex than two's-complement circuits.
What is the difference between signed and unsigned binary?
Unsigned binary treats all bits as magnitude — an 8-bit unsigned value ranges from 0 to 255. Signed binary reserves the MSB (or uses two's complement weighting) to represent negative numbers, reducing the positive range but adding negative values. Sign and magnitude and two's complement are both signed representations; they differ in how the sign information is encoded.
Want to practise converting between decimal, sign and magnitude, and two's complement with instant marking? Professor Turing at aitutors.me is ready to check each step.
Key terms
- n − 1
- −(2^(n−1) − 1)
- IEEE 754 floating-point numbers
- Unsigned
- Signed