Binary to Signed Magnitude Converter
Convert an unsigned binary magnitude into signed-magnitude representation. Enter a binary value, choose positive or negative, and select the total bit width to generate the sign bit and padded magnitude instantly.
What Is Signed-Magnitude Binary?
Signed-magnitude representation stores the sign of a number separately from its binary magnitude. The leftmost bit is the sign bit, while all remaining bits represent the absolute value.
Example: Positive 1011 in 8-Bit Signed Magnitude
The binary magnitude 1011 equals decimal 11.
Example: Negative 1011 in 8-Bit Signed Magnitude
The magnitude remains exactly the same. Only the sign bit changes.
How to Convert Binary to Signed Magnitude
1. Start with the magnitude
Use the unsigned binary digits representing the absolute value.
2. Select a total width
The total width must include one extra bit for the sign.
3. Reserve the sign bit
The leftmost bit is reserved for positive or negative status.
4. Pad the magnitude
Add leading zeros until the magnitude fills the remaining positions.
5. Choose the sign
Use 0 for positive and 1 for negative.
6. Combine the fields
Place the sign bit before the padded magnitude bits.
Signed-Magnitude Bit Layout
| Total Width | Sign Bits | Magnitude Bits | Maximum Magnitude |
|---|---|---|---|
| 4-bit | 1 | 3 | 7 |
| 8-bit | 1 | 7 | 127 |
| 16-bit | 1 | 15 | 32,767 |
| 32-bit | 1 | 31 | 2,147,483,647 |
8-Bit Signed-Magnitude Examples
| Decimal Value | Magnitude | 8-Bit Signed Magnitude |
|---|---|---|
| +1 | 1 |
00000001 |
| −1 | 1 |
10000001 |
| +5 | 101 |
00000101 |
| −5 | 101 |
10000101 |
| +11 | 1011 |
00001011 |
| −11 | 1011 |
10001011 |
| +127 | 1111111 |
01111111 |
| −127 | 1111111 |
11111111 |
Signed-Magnitude Range
With a total width of n bits, one bit is reserved for the sign.
That leaves n − 1 magnitude bits.
Why Signed Magnitude Has Positive and Negative Zero
One unusual property of signed-magnitude representation is that zero can have two different encodings because the sign bit can be either 0 or 1 while all magnitude bits remain zero.
Both represent a magnitude of zero, which is one reason signed magnitude is less common for general integer arithmetic than two’s complement.
Signed Magnitude vs Two’s Complement
| Feature | Signed Magnitude | Two’s Complement |
|---|---|---|
| Sign indication | Separate sign bit | Encoded across bit pattern |
| Positive values | Same basic magnitude | Same as ordinary binary |
| Negative zero | Exists | Does not exist |
| 8-bit negative minimum | −127 | −128 |
| Common integer use | Less common | Very common |
Signed Magnitude vs One’s Complement
Both signed magnitude and one’s complement can represent positive and negative zero, but they encode negative values differently.
Signed magnitude changes the sign bit while keeping magnitude bits unchanged. One’s complement forms a negative value by inverting every bit of the positive representation for a fixed width.
Why Bit Width Matters
The same magnitude can have different signed-magnitude bit strings depending on the chosen width because additional zeros are inserted before the magnitude.
101:
4-bit → 0101
8-bit → 00000101
16-bit → 0000000000000101
The numerical value is unchanged; only the storage width differs.
What Happens If the Magnitude Is Too Large?
A signed-magnitude value has only width − 1 positions available
for magnitude bits.
For example, a 4-bit representation contains only three magnitude bits, so
111 is the largest possible magnitude.
Signed-Magnitude Uses
Signed magnitude is easy to understand because the sign and absolute value are visually separate. The same general sign-plus-magnitude concept also appears in some numerical representations, although modern integer processors typically use two’s complement for signed integer arithmetic.
Common Signed-Magnitude Mistakes
Counting the sign bit as magnitude
The total width includes the sign bit, leaving one fewer bit for magnitude.
Inverting negative values
Signed magnitude does not invert the magnitude bits. Only the sign bit changes.
Confusing it with two’s complement
Signed magnitude and two’s complement use different rules for negative numbers.
Ignoring overflow
A magnitude must fit within the available width minus one sign bit.
Related BinaryCon Tools
Binary to Signed Magnitude Converter FAQs
What is signed-magnitude binary?
What does a sign bit of 0 mean?
0 represents a positive value.
What does a sign bit of 1 mean?
1 represents a negative value.
How do I represent +11 in 8-bit signed magnitude?
1011. Pad it to seven magnitude bits as
0001011, then add sign bit 0: 00001011.
How do I represent −11 in 8-bit signed magnitude?
0001011 with sign bit 1, giving
10001011.