Introduction
Signed binary numbers are used in digital systems and computers to represent both positive and negative values. Since digital circuits operate only with binary digits (0 and 1), special methods are required to represent negative numbers. In mathematics, positive numbers do not require a sign. However, negative numbers use a minus (-) sign to indicate their value. In digital systems, we cannot attach a “+” or “−” symbol because computers work only with binary digits. To represent signed binary numbers, the Most Significant Bit (MSB) is used as the sign bit:
- 0 → Positive number
- 1 → Negative number
The remaining bits represent the magnitude (value) of the number.
Range of Signed Binary Numbers
If an n-bit number is used in sign-magnitude form:
- 1 bit is used for the sign
- n − 1 bits are used for magnitude
The range becomes:
−(2n−1 − 1) to +(2n−1 − 1)
For example, in a 4-bit signed binary number:
Range = −7 to +7
Whereas an unsigned 4-bit number ranges from 0 to 15.
1. Sign-Magnitude Representation
In sign-magnitude format:
- MSB represents the sign
- Remaining bits represent magnitude
Example (8-bit representation of 53):
- +53 → 00110101
- -53 → 10110101
Disadvantage
This method produces two representations for zero:
- +0 → 0000
- -0 → 1000
This creates complications in digital systems.
2. One’s Complement Representation
In One’s Complement:
- Positive numbers remain unchanged.
- Negative numbers are obtained by inverting all bits (0 → 1, 1 → 0).
Example:
10010100 → 01101011
Range remains:
−(2n−1 − 1) to +(2n−1 − 1)
Still has two zeros:
- 0000 (+0)
- 1111 (-0)
Addition & Subtraction Using One’s Complement
Subtraction can be performed using addition:
A − B = A + (One’s Complement of B)
Example: 115 − 27 (8-bit system)
Convert to binary:
115 → 01110011 27 → 00011011
Find One’s Complement of 27:
00011011 → 11100100
Add:
01110011 + 11100100 ------------ 1 01010111
Ignore overflow bit (9th bit).
Add 1 to result:
01010111 +00000001 ------------ 01011000
Result = 88 (Decimal)
3. Two’s Complement Representation
Two’s complement is the most widely used method in computers.
To find Two’s Complement:
- Find One’s Complement
- Add 1 to the result
Mathematically:
::contentReference[oaicite:0]{index=0}
Subtraction formula:
::contentReference[oaicite:1]{index=1}
Example: 115 − 27 Using Two’s Complement
Binary values:
115 → 01110011 27 → 00011011
Find Two’s Complement of 27:
One’s Complement → 11100100 Add 1 → 11100101
Add:
01110011 + 11100101 ------------ 1 01011000
Ignore overflow bit.
Final Answer: 01011000 = 88 (Decimal)
Advantages of Two’s Complement
- No double-zero problem
- Easier arithmetic operations
- Widely used in computers
- Simple hardware implementation
4-Bit Signed Binary Comparison Table
| Decimal | Sign-Magnitude | One’s Complement | Two’s Complement |
|---|---|---|---|
| +3 | 0011 | 0011 | 0011 |
| +2 | 0010 | 0010 | 0010 |
| +1 | 0001 | 0001 | 0001 |
| 0 | 0000 | 0000 | 0000 |
| -1 | 1001 | 1110 | 1111 |
| -2 | 1010 | 1101 | 1110 |
| -3 | 1011 | 1100 | 1101 |
Tutorial Summary
- The MSB is used as a sign bit in signed binary numbers.
- Sign-Magnitude is simple but has a double-zero problem.
- One’s Complement also has two zero representations.
- Two’s Complement eliminates the double-zero issue.
- Modern computers use Two’s Complement for representing negative numbers.
Although using signed representation reduces the positive number range, it allows digital systems to perform arithmetic operations efficiently.
