Signed number can be represented by using four methods:
- 1's complement
- 2's complement
- Sign Method
- Sign Magnitude Method
- Sign Extension Method
4. Excess-N Method
- Excess-127 method
- Excess-1023 method
1. One's Complement:
It swaps the binary digits from 1 to 0 and vice verse. One's complement ranges from -127 to 127 for a 8 bit byte. It has two representations for signs 00000000 (+0) and 11111111 (-0). Lets look into an example for more elucidation on one's complement:
![]() |
| 8 bit One's complement |
(43)10 -- (00101011)2 on doing one's complement to the decimal we get (-43)10 -- (11010100)2.
Problems in one's complement is that it takes two zeros ±0 for representing positive and negative values and also due to end carry around condition which is not expected to be in 2's complement.
2. Two's Complement:
It also inverts the binary digits i.e. 0 to 1 and vice verse, thereby converting the bits to one's complement's bits but after conversion one is added to the least significant bit (LSB) thereby converting the bits into two's complement's bits. It doesn't have any positive and negative zeros but only one zero.
It also inverts the binary digits i.e. 0 to 1 and vice verse, thereby converting the bits to one's complement's bits but after conversion one is added to the least significant bit (LSB) thereby converting the bits into two's complement's bits. It doesn't have any positive and negative zeros but only one zero.
![]() |
| 8 bit Two's Complement |
Two's complement ranges from -128 to 127 for a 8 bit byte. This system is the most common method of representing signed integers on computers. It doesn't support addition/subtraction like one's compliment during carry/borrow of the binary number. Lets see previous example of one's compliment and give a trial by taking two's compliment:
(43)10 -- (00101011)2 on doing one's complement we get (11010100)2 now adding one to the LSB we get (-43)10 -- (11010101)2 thus getting Two's complement.
(43)10 -- (00101011)2 on doing one's complement we get (11010100)2 now adding one to the LSB we get (-43)10 -- (11010101)2 thus getting Two's complement.
3. Sign Method
3a. Sign Magnitude Method:
The first bit of a byte is provided to the sign ('+' or '-') known as sign bit. If the bit is set to 0 (zero) its a positive sign and if the it is set to 1 it means negative. The remaining bits in the number indicates the magnitude or mantissa/significand (floating) or absolute value. Hence in a byte 7 bits (except the signs), magnitude can range from 00000000 (0) to 11111111(127). Thus once sign bit is assigned then the range varies from -127 to 127 since zero can be represented into two ways as explained above.
3b. Sign Extension:
It is an operation of increasing the number of bits of a binary number while preserving the number's sign as well as the number e.g. the number ten is represented in six bits in a binary form (00 1010)2 the sign extend operation increases the word length upto 16 bits and the new representation is like (0000 0000 0000 1010)2 thereby preserving the value as well as its sign too. In case of negative value e.g. -1510 the binary conversion (11 1111 0001)2 using two's complement, and this is sign extended to 16 bits, therefore the new representation is (1111 1111 1111 0001)2. Here one is appended to the MSB on the left tereby keeping the sign as well as the number preserved.
4. Excess N Method:
Excess N is also called as offset binary or biased representation, uses a pre-specified number N as a biasing value. Here 0 is represented by N and for -N is represented by all zeros. Biased representation are primarily used for the exponent of floating point numbers. The exponent field of a single-precision (32-bit) number as an 8-bit excess-127 field. The double-precision (64-bit) exponent field is an 11-bit excess-1023 field.
3a. Sign Magnitude Method:
The first bit of a byte is provided to the sign ('+' or '-') known as sign bit. If the bit is set to 0 (zero) its a positive sign and if the it is set to 1 it means negative. The remaining bits in the number indicates the magnitude or mantissa/significand (floating) or absolute value. Hence in a byte 7 bits (except the signs), magnitude can range from 00000000 (0) to 11111111(127). Thus once sign bit is assigned then the range varies from -127 to 127 since zero can be represented into two ways as explained above.
3b. Sign Extension:
It is an operation of increasing the number of bits of a binary number while preserving the number's sign as well as the number e.g. the number ten is represented in six bits in a binary form (00 1010)2 the sign extend operation increases the word length upto 16 bits and the new representation is like (0000 0000 0000 1010)2 thereby preserving the value as well as its sign too. In case of negative value e.g. -1510 the binary conversion (11 1111 0001)2 using two's complement, and this is sign extended to 16 bits, therefore the new representation is (1111 1111 1111 0001)2. Here one is appended to the MSB on the left tereby keeping the sign as well as the number preserved.
4. Excess N Method:
Excess N is also called as offset binary or biased representation, uses a pre-specified number N as a biasing value. Here 0 is represented by N and for -N is represented by all zeros. Biased representation are primarily used for the exponent of floating point numbers. The exponent field of a single-precision (32-bit) number as an 8-bit excess-127 field. The double-precision (64-bit) exponent field is an 11-bit excess-1023 field.
![]() |
| 8 bit Excess-127 |



No comments:
Post a Comment