16 bit and 8-bit Representation
Two's Complement Representation - Quiz Explanation
The answers you selected are indicated below, along with text that explains the correct answers.
1.
What range of integers can be represented using 16-bit two's complement representation?
Please select the best answer.
A.
-2
15
to 2
15
- 1
B.
-2
16
to 2
16
- 1
C.
-16
2
to 16
2
The correct answer is A.
Using two's complement representation with n bits you can represent the integers -2
n-1
to 2
n-1
- 1. Thus, with 16 bits you can represent the integers -2
15
to 2
15
- 1, or -32768 to 32767.
2.
What is the decimal equivalent of the 8-bit two's complement number
10010111
?
Please select the best answer.
A.
-104
B.
-152
C.
-105
The correct answer is C.
Reversing each bit of
10010111
, we obtain
01101000
. Adding 1 to
01101000
gives
01101001
, which represents the decimal number 105. Thus,
10010111
represents the decimal number -105.
3.
What is the 8-bit two's complement representation of the decimal number -18?
Please select the best answer.
A.
11101101
B.
00010010
C.
11101101
The correct answer is A.
The 8-bit binary representation of the decimal number 18 is
00010010
. Reversing each bit of
00010010
, we obtain
11101101
. Adding 1 to
11101101
gives
11101110
. Thus, the 8-bit two's complement representation of the decimal number -18 is
11101110
.