Signed Unsigned Binary Converter
Convert and compare signed two’s-complement and unsigned interpretations of the same binary value. Work with 8-bit, 16-bit, 32-bit and 64-bit values and view binary, hexadecimal and decimal results.
Signed vs Unsigned Binary
The same fixed-width binary pattern can represent different decimal values depending on whether it is interpreted as unsigned or signed two’s complement.
11110010
Unsigned:
242
Signed two’s complement:
-14
Unsigned Binary Interpretation
In an unsigned binary value, every bit contributes a non-negative power of two. All bit patterns therefore represent zero or positive numbers.
00000000 = 0
11111111 = 255
Signed Two’s-Complement Interpretation
For signed two’s-complement values, the most significant bit acts as the sign bit. A leading 0 represents a non-negative number, while a leading 1 represents a negative number.
01111111 = +127
10000000 = -128
11111111 = -1
How a Negative Binary Value Is Decoded
When the sign bit is 1, the magnitude can be found by inverting the bits and adding one.
Invert:
00001101
Add 1:
00001110
Magnitude:
14
Signed value:
-14
Signed and Unsigned Ranges
| Width | Unsigned Range | Signed Range |
|---|---|---|
| 8-bit | 0 to 255 | -128 to 127 |
| 16-bit | 0 to 65,535 | -32,768 to 32,767 |
| 32-bit | 0 to 4,294,967,295 | -2,147,483,648 to 2,147,483,647 |
| 64-bit | 0 to 18,446,744,073,709,551,615 | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
Same Bits, Different Meaning
| 8-bit Binary | Unsigned | Signed |
|---|---|---|
| 00000000 | 0 | 0 |
| 00000001 | 1 | 1 |
| 01111111 | 127 | 127 |
| 10000000 | 128 | -128 |
| 11110010 | 242 | -14 |
| 11111111 | 255 | -1 |
Important Signed / Unsigned Notes
The signed result uses two’s-complement interpretation.
The most significant bit is the sign bit only when the value is interpreted as signed.
A sign bit of 0 produces the same numeric result under both signed and unsigned interpretation.
A sign bit of 1 produces different signed and unsigned decimal values.
The selected word size is essential because signed interpretation depends on the fixed bit width.