CS220 Practice Quiz 2
Choose the best alternative:
How many different values can be represented with 3 bits?
How many different values can be represented with 5 bits?
What is the largest unsigned integer that can be represented with 3 bits? Please convert to decimal.
What is the largest unsigned integer that can be represented with 5 bits? Please convert to decimal.
A byte consists of_____ bits.
For INTEL-BASED computers , 1 WORD consists of___ bits.
For INTEL-BASED computers , 1 WORD consists of ___ bytes.
For INTEL-BASED computers , a DOUBLEWORD consists of ___ bits.
For INTEL-BASED computers , a DOUBLEWORD consists of ___ bytes.
What is the byte complement of 11001011?
What is the word complement of 0000000000001011?
The complement of a negative number is...
In 2's complement, the 8-bit binary number 01010101 is .....
In 2's complement, the 8-bit binary number 10101010 is .....
In 2-s complement, the 4-digit hexadecimal number 7EEF is ....
In 2-s complement, the 4-digit hexadecimal number 8010 is ....
What is the largest 5-bit negative integer (in decimal) that can be represented using complement notation?
Convert 11111111 (a signed byte) to its decimal equivalent.
Using 1 byte (8-bits), convert the decimal number 14 to binary (base 2).
Using 1 byte (8-bits), convert the decimal number -25 to binary (base 2).
Using 1 byte (8-bits), convert the decimal number -2 to binary (base 2).
In the hexadecimal number A32C the MSD (most significant digit) is .....
In the hexadecimal number A32C the MSB (most significant byte) is .....
In the hexadecimal number A32C the LSD (least significant digit) is .....
In the hexadecimal number A32C the LSB (least significant byte) is .....
Answers:
8 The number of different values you can represent with n bits is 2^n. Therefore 2^3 = 8.
32 The number of different values you can represent with n bits is 2^n. 2^5 is 32.
7 The largest value occurs when all 3 bits are 1's (111 = 7). TIP: 2^n - 1 is the largest value.
31. 2^n - 1 represents the largest unsigned value. 2^5 - 1 = 31. Remember, the largest unsigned value occurs when all 5 bits are 1's (11111 = 31)
8. On most computer systems, 8 bits contitutes 1 byte.
16. 16 bits constitutes 1 word in the M68000 system.
2. Remember, 1 word = 16 bits and 1 byte = 8 bits.
32 bits (4 bytes) constitues a long word.
4 bytes = 32 bits
00110101. The complement is achieved by reversing each bit and adding 1. Remember, 1 byte = 8 bits.
1111111111110101. The complement is achieved by reversing each bit and adding 1. Remember, 1 word = 16 bits.
POSITIVE. The complement of a number is its negation.
POSITIVE. . A binary number is positive if its MSD (most significant digit) is 0.
NEGATIVE. The MSD (most significant digit) is 1, therefore it is a negative binary number.
POSITIVE. A hexadecimal number is positive if its MSD (most significant digit) is one of 0 through 7.
NEGATIVE. The MSD (most significant digit) is 8, therefore it is a negative number.
-16. Integers from - 2(n-1) through 2(n-1) -1 can be represented. - 24 = -16.
-1. 11111111 is negative. Find its complement: 00000001 (1), then add a negative sign, -1.
1110. 14 is a positive value, so we can simply convert it into its binary equivalent using 8-bits.
11100111. First, convert 25 to binary : 00011001. Then, find its complement : -25 = 11100111.
11111110. First, convert 2 to binary : 00000010. Then, find its complement : -2 = 11111110.
A
A3. One byte is two hexadecimal digits.
C
2C. One byte consists of two hexadecimal digits.