当前位置:文档之家› 计算机导论-第3章-数字表示

计算机导论-第3章-数字表示

Chapter 3 Number RepresentationKnowledge point:3.1 Convert a number from decimal, hexadecimal, and octal to binary notation and vice versa.3.2 Integer representation: unsigned, sign-and-magnitude, one’s complement, and two’s complement.3.3 Excess system.3.4 Floating-point representation.REVIEW QUESTIONS5. What are three methods to represent signed integers? (Knowledge point 3.2)A:Sign-and-Magnitude, One’s Complement, and Two’s Complement.9. Name two uses of unsigned integers. ( Knowledge point 3.2)A:Counting and Addressing.10. What happens when you try to store decimal 130 using sign-and-magnitude representation with an 8-bit allocation? ( Knowledge point 3.2)A:Overflow.11. Compare and contrast the representation of positive integers in sing-and-magnitude, one’s complement, and two’s complement. ( Knowledge point 3.2)A:The representation of positive integers in sing-and-magnitude, one’s complement, and two’s complement is the same.14. Compare and contrast the range of numbers that can be represented in sign-and-magnitude, one’s complement, and two’s complement. ( Knowledge point 3.2)A:Sign-and-Magnitude range –(2N-1-1)~+(2N-1-1)One’s Complement range –(2N-1-1)~+(2N-1-1)Two’s Complement range –(2N-1)~+(2N-1-1)16. What is the primary use of the Excess_X system? ( Knowledge point 3.3)A:The primary use of the Excess_X system is in storing the exponential value of a fraction.17. Why is normalization necessary? ( Knowledge point 3.4)A:A fraction is normalized so that operations are simpler.MULTIPLE-CHOICE QUESTIONS20. The only digits used in the c number system are 0 and 1. ( Knowledge point 3.1)a. decimalb. octalc. binaryd. hexadecimal21. When converting a decimal number to binary, you repeatedly divide by a. ( Knowledge point 3.1)a. 2b. 8c. 10d. 1622. Which of the following is an integer representation method that handles both positive and negative numbers? ( Knowledge point 3.2) da. sign-and-magnitudeb. one’s complementc. two’s complementd. all of the above23. In unsigned integers, a 4-bit allocation allows d nonnegative numbers. ( Knowledge point 3.2)a. 7b. 8c. 15d. 1624. In all signed integer representations, a 4-bit allocation complementation allows bnonnegative numbers. ( Knowledge point 3.2)a. 7b. 8c. 15d. 1625. In c number representation, 1111 in memory represents -0. ( Knowledge point3.2)a. unsigned integersb. signed-and-magnitudec. one’s complementd. two’s complement26. In d number representation, 1111 in memory represents -1. ( Knowledge point3.2)a. unsigned integersb. signed-and-magnitudec. one’s complementd. two’s complement27. In d number representation, there are two representations for 0. ( Knowledge point 3.2)a. sign-and-magnitudeb. one’s complementc. two’s complementd. a and b28. In c number representation, there is one representation for 0. ( Knowledge point3.2)a. unsigned integerb. one’s complementc. two’s complementd. a and c29. If the leftmost bit is 0 in d number representation, then the decimal number is positive. ( Knowledge point 3.2)a. sing-and-magnitudeb. one’s complementc. two’s complementd. all of the above30. If the leftmost bit is 1 in d number representation, then the decimal number is positive. ( Knowledge point 3.2)a. sign-and-magnitudeb. one’s complementc. two’s complementd. none of the above31. Which number representation method is most widely used today for storing numbers in a computer? ( Knowledge point 3.2) ca. sing-and-magnitudeb. one’s complementc. two’s complementd. unsigned integers32. Which number representation method is often used to convert analog signals to digital signals? ( Knowledge point 3.2) da. unsigned integersb. sign-and-magnitudec. one’s complementd. b and c33. Unsigned integers can be used for d. ( Knowledge point 3.2)a. countingb. addressingc. signal processingd. a and b34. Which number representation method is often used to store the exponential value of a fraction? ( Knowledge point 3.3) da. unsigned integersb. one’s complementc. two’s complementd. Excess_X35. In an Excess_X conversion, you a the magic number X to the number to be converted. ( Knowledge point 3.3)a. addb. subtractc. multiplyd. divide36. In Excess_X number representation, what is usually the relationship between X and N, the bit allocation? ( Knowledge point 3.3 ca. X=2N-1b. X=2N+1c. X=2N-1-1d. a or c40. What is the Excess_128 representation of 5? ( Knowledge point 3.3) ca. 00000101b. 10000100c. 10000101d. 1000000141. When a fraction is normalized, there is a b to the left of the decimal point. ( Knowledge point 3.4)a. 0 bitb. 1 bitc. random bit sequenced. a or b42. You multiply a normalized number by d where e is the number of bits that the decimal point moved. ( Knowledge point 3.4)a. 2eb. e/2c. e2d. 2e43. When a fraction is normalized, the computer stores the d. ( Knowledge point 3.4)a. signb. exponentc. mantissad. all of the above44. The precision of the fractional number stored in a computer is defined by the c. ( Knowledge point 3.4)a. signb. exponentc. mantissad. any of the above45. How is the mantissa stored in a computer? ( Knowledge point 3.4) ca. in one’s complementb. in two’s complementc. as an unsigned integerd. in sign-and-magnitude46. An octal digit converted to binary is composed of b bits. ( Knowledge point 3.1)a. 2b. 3c. 4d. 8EXERCISES47.Change the following decimal numbers to 8-bit unsigned integer if possible. ( Knowledge point 3.1)a. 23 00010111b. 121 01111001c. 34 00100010d. 342 Overflow48.Change the following decimal numbers to 16it unsigned integer. ( Knowledge point 3.1)a. 41 0000000000101001b. 411 0000000110011011c. 1234 0000010011010010d. 342 000000010101011049. Change the following decimal numbers to 8-bit sign-and-magnitude integers. ( Knowledge point 3.2)a. 32 00100000b. -101 11100101c. 56 00111000d. 129 Overflow50. Change the following decimal numbers to 16-t sign-and-magnitude integers. ( Knowledge point 3.2)a. 142 0000000010001110b. -180 1000000010110100c. 560 0000001000110000d. 2456 000010011001100052. Change the following decimal numbers to 16-bit one’s complement integers. ( Knowledge point 3.2)a. 162 0000000010100010b. -110 1000000001101110c. 2560 0000101000000000d. 12,123 001011110101101153. Change the following decimal numbers to 8-bit two’s complement integers. ( Knowledge point 3.2)a. -12 11110100b. -101 10011011c. 56 00111000d. 142 Overflow54. Change the following decimal numbers to 16-bit two’s complement integers. ( Knowledge point 3.2)a. 102 0000000001100110b. -179 1111111101001101c. 534 0000001000010110d. 62,056 111100100110100055. Change the following 8-bit unsigned numbers to decimal. ( Knowledge point 3.1)a. 01101011 107b. 10010100 148c. 00000110 6d. 01010000 8056. Change the following 8-bit sign-and-magnitude numbers to decimal. ( Knowledge point3.2)a. 01111011 123b.10110100 -52c.01100011 99d.11010000 -8057. Change the following 8-bit one’s complement numbers to decimal. ( Knowledge point3.2)a.01100011 99b.10000100 -123c.01110011 115d.11000000 -6358. Change the following 8-bit two’s complement numbers to decimal. ( Knowledge point3.2)a.01110111 119b.11111100 -4c.01110100 116d.11001110 -5068. Show the following numbers in 32-bit IEEEformat. ( Knowledge point 3.4)a. -20x1.10001 1 01111111 10001000000000000000000b.+23x1.111111 0 10000010 11111100000000000000000c.+2-4x1.01110011 0 01111011 01110011000000000000000d.-2-5x1.01101000 1 01111010 01101000000000000000000ing the result of the previous problem, show the following numbers in 32-bit IEEE format. ( Knowledge point 3.4)a. 7.1875→111.0011 →22×1.110011 →0 10000001 11001100000000000000000b. 12.640625→1100.101001 →23×1.100101001 →0 10000010 10010100100000000000000 c. -11.40625→-1011.01101 →-23×1.01101101 → 1 10000010 01101101000000000000000d. -0.375→-0.011 →-2-2×1.1 → 1 01111101 10000000000000000000000。

相关主题