Which of the following is the smallest 4-bit negative number stored in...
Explanation:
To find the smallest 4-bit negative number stored in its 2s complement representation, we need to understand how 2s complement works. In 2s complement, the most significant bit (MSB) represents the sign of the number, where 0 is positive and 1 is negative. The rest of the bits represent the magnitude of the number.
To convert a number to its 2s complement representation, we follow these steps:
1. Invert all the bits (change 0 to 1 and 1 to 0).
2. Add 1 to the result of step 1.
Now, let's find the smallest 4-bit negative number stored in its 2s complement representation.
Step 1: Invert all the bits of 0000 (smallest 4-bit positive number).
0000 -> 1111
Step 2: Add 1 to the result of step 1.
1111 + 1 = 10000 (5-bit number)
Since we are limited to 4 bits, we discard the MSB and get the 4-bit 2s complement representation of -8, which is 0000. But this is not the answer since we are looking for the smallest negative number.
To get the smallest negative number, we need to increment the result of step 1 by 1 before discarding the MSB.
Step 1: Invert all the bits of 0000 (smallest 4-bit positive number).
0000 -> 1111
Step 2: Add 1 to the result of step 1.
1111 + 1 = 10000 (5-bit number)
Step 3: Increment the result of step 2 by 1.
10000 + 1 = 10001 (5-bit number)
Discard the MSB and we get the smallest 4-bit negative number stored in its 2s complement representation, which is 1000 (equals to -8 in decimal).
Therefore, the correct answer is option A.
Which of the following is the smallest 4-bit negative number stored in...
The smallest negative number is the largest binary value.
1111 is -1, 1110 is -2, 1101 is -3, etc down to 1000 which represents -8.