The smallest integer that can be represented by an 8-bit number in 2...
Range of 2's compliment no = > (- 2n-1)to + (2n-1 - 1)
Here n = No of bits = 8.
So minimum no = -2 ^ 7 = (B) -128
View all questions of this test
The smallest integer that can be represented by an 8-bit number in 2...
Explanation:
In 2s complement form, the most significant bit (MSB) of an 8-bit number represents the sign of the number. If the MSB is 0, the number is positive, and if the MSB is 1, the number is negative.
Representation of Positive Numbers:
For positive numbers, the MSB is always 0. The remaining bits represent the magnitude of the number in binary form. In an 8-bit number, the remaining 7 bits can represent values from 0 to 127 (2^7 - 1).
Representation of Negative Numbers:
For negative numbers, the MSB is always 1. To represent a negative number in 2s complement form, we take the binary representation of its positive counterpart and invert all the bits (change 0s to 1s and 1s to 0s). Then, we add 1 to the inverted result.
Calculating the Smallest Negative Number:
To find the smallest negative number that can be represented in 8-bit 2s complement form, we start with the binary representation of 0, which is 00000000.
- Inverting all the bits gives us 11111111.
- Adding 1 to the inverted result gives us 100000000. However, since we are working with 8-bit numbers, we discard the leftmost 1, leaving us with 00000000.
Therefore, the smallest negative number that can be represented in 8-bit 2s complement form is -128.
Answer:
The smallest integer that can be represented by an 8-bit number in 2s complement form is -128. Hence, option 'B' is the correct answer.