If the word length is 4 binary bits (including sign), what
decimal
number does 1001 represent in
a. in sign and magnitude?
b. in 2’s complement?
Sign and Magnitude Representation:
It is most basic method of representing both Positive and Negative Number in Binary Format. In this we represent the differentiate Positive and Negative Numbers placing a Sign bit before the data bits.
And the Magnitude of the Number is determined by converting the remaining bits to Decimal representation using Positional Weight Method
A) The given word is 1001 and length is 4 binary bits (including sign),
The MSB bit of 1 001 is 1 .
Therefore It is a Negative Number.
Now finding the magnitude of the data bits (001) using Positional Weight Method
Positional Weights Method: (exclude the MSB because it is sign bit)
Positional Weight | 22 | 21 | 20 |
Data Bits | 0 | 0 | 1 |
Value | 0 | 0 | 1 |
Total value = ( 0 × 22 + 0 × 21 + 1 × 20)
= 1
Magnitude of 001 is 1 and sign is negative
Therefore 1001 represent the decimal number - 1
Hence ( 1001 )2 = ( -1 )10
2's Complement Forms: It is the enhanced form of representing the Negative Numbers in the binary format. which rectify the drawback of the sign Magnitude form.
Converting a 2's Complement number into Decimal Format:
B) The given word is 1001 and length is 4 binary bits (including sign),
The MSB bit of 1 001 is 1 .
Therefore It is a Negative Number.
2' Complement | 1 | 0 | 0 | 1 |
1' Complement | 0 | 1 | 1 | 0 |
Adding 1 | + | 1 | ||
Final Result | 0 | 1 | 1 | 1 |
Now convert the final result into Decimal using positional weight Method.
Positional Weights Method: (do not exclude the MSB because it is sign bit)
Positional Weight | 23 | 22 | 21 | 20 |
Data Bits | 0 | 1 | 1 | 1 |
Value | 0 | 4 | 2 | 1 |
Total value = ( 0 × 23 + 1 × 22 + 1 × 21 + 1 × 20)
= 4 + 2 + 1 = 7
Magnitude of 1001 is 7 and the Sign is Negative
Hence ( 1001 )2 = ( -7 )10
If You Have Any Doubts. Please Ask Using Comments.
Have A Great Day!
Get Answers For Free
Most questions answered within 1 hours.