Chapter.2 Data Representation Test Bank - Practice Test Bank | Prelude Programming 6e Venit by Stewart Venit. DOCX document preview.
Test Bank for Prelude to Programming Chapter 2
MULTIPLE CHOICE
1. How many digits are there in the binary system?
a. | 9 |
b. | 10 |
c. | 0 1 |
d. | 2 |
2. A normalized binary number consists of three parts. These are:
a. | sign, exponent, mantissa |
b. | integer part, decimal point, fractional part |
c. | sign, real part, imaginary part |
d. | sign, integer, mantissa |
3. Given the decimal number 43, the base is:
a. | 4 | b. | 3 | c. | 10 | d. | 64 |
4. What is the decimal value of 01102?
a. | 4 | b. | 6 | c. | 11 | d. | 110 |
5. What is the binary representation of 6210?
a. | 00111110 | b. | 00100010 | c. | 00100001 | d. | 11101000 |
6. Represent 3110 in hexadecimal notation.
a. | 1F | b. | FF | c. | F1 | d. | AF |
7. Convert 001100112 to hexadecimal.
a. | 5A116 | b. | 3316 | c. | A316 | d. | 3A16 |
8. In sign-and-magnitude format, what does 01112 represent?
a. | 8 | b. | -7 | c. | +7 | d. | 110 |
9. Convert 1710 to an 8-bit integer in sign-and-magnitude format:
a. | 100012 | b. | 100100012 | c. | 000100012 | d. | 1100012 |
10. Convert +1210 to a 4-bit integer in two’s complement format:
a. | 000011002 | b. | 100011002 | c. | 11002 | d. | 100112 |
11. Convert -1510 to a 4-bit integer in two’s complement format:
a. | 11112 | b. | 100012 | c. | 000012 | d. | 00012 |
12. The standard representation for storing positive, zero, and negative integers is:
a. | unsigned | b. | sign-and-magnitude |
c. | one’s complement | d. | two’s complement |
13. Floating point numbers always have which of the following:
a. | An integer part | b. | A sign |
c. | A fractional part | d. | All of these |
14. Convert the decimal fraction ½ to binary.
a. | 0.012 | b. | 0.12 | c. | 1.02 | d. | .1102 |
15. Convert the decimal number 0.610 to a 4-bit binary number.
a. | 0.11002 | b. | 0.10102 | c. | 0.10012 | d. | 0.1112 |
16. Convert the decimal number 12.410 to a binary number, allocating 4 bits for the integer part and 4 bits for the fractional part.
a. | 1100.01002 | b. | 1010.0112 |
c. | 1100.01102 | d. | None of these are correct |
17. Convert 5,689,00010 to exponential notation.
a. | 5689 X 103 | b. | 5689E+3 |
c. | 5.6E+5 | d. | 5.689E+6 |
18. A single precision floating point number stored in a computer has three parts. They are:
a. | sign, binary point, mantissa | b. | sign, exponent, mantissa |
c. | integer, binary point, fraction | d. | sign, integer, fraction |
19. Convert +610 to binary using the Excess_127 system.
a. | 0110 X 10127 | b. | 1.0000101E+7 |
c. | 0000101 | d. | 10000101 |
20. Convert -1210 to binary using the Excess_127 system.
a. | 10001100 | b. | 01110011 |
c. | 0.1110011E-12 | d. | Cannot be done |
TRUE/FALSE
1. True/False? There are 9 digits in the hexadecimal system.
2. True/False: Any number can be used as a base for a number system.
3. True/False: In a storage location of 8 bits, a sign-and-magnitude integer could be any integer from 0 to 15, inclusive.
4. True/False: The range of integers that can be stored in one’s complement format is exactly double the range that can be stored in sign-and-magnitude format.
5. True/False: One problem with using one’s complement to store integers is that there are two ways to represent 0.
6. True/False: It is impossible to store the fraction 0.5 in 6 bits as a binary number because 0.510 = 0.12.
7. True/False: To store the binary number 101012 in an 8-bit location, simply add three zeros to get 101010002.
8. True/False: A number system that uses 19 as a base would be impossible to create because the highest possible number system is 16.
9. True/False: The result of adding the binary digits 1 + 1 is 10.
10. True/False: In one’s complement format, the leftmost bit is saved for the sign where 1 indicates a negative number and 0 indicates a positive number.
11. True/False: The smallest integer that can be represented by a sign-and-magnitude binary number is always 0.
12. True/False: A double precision number always takes up 64 bits in the computer’s memory.
13. True/False: The following two representations are equivalent:
1110010111010101010100112 and D5D55316
14. True/False: It is impossible to store 1610 in 4-bits because overflow will occur.
15. True/False: The two’s complement representation of +6710 in 8-bits is 10000112.
SHORT ANSWER
1. Given the number 455, __________ is the base.
2. (-23)0 = __________.
3. There are __________ digits in the binary system.
4. The decimal value of A in the hexadecimal number 6A2 is __________.
5. A very long binary number, such as 1111000010101100111000102 may be converted to __________ notation to make it easier to read.
6. The one’s complement format is not often used because there are two ways to represent the value of __________ .
7. The unsigned form of an integer does not allow for __________ numbers.
8. The condition known as __________ occurs when you try to store an integer that is bigger than the maximum allowed by the number of bits you have.
9. Given: |-56|. The __________ of this expression is 56.
10. A __________ separates the whole number and fractional parts of a binary floating point number.