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

更新时间:2023-04-07 01:32:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Chapter 3 Number Representation

Knowledge 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 QUESTIONS

5. 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 QUESTIONS

20. The only digits used in the c number system are 0 and 1. ( Knowledge point 3.1)

a. decimal

b. octal

c. binary

d. hexadecimal

21. When converting a decimal number to binary, you repeatedly pide by a. ( Knowledge point 3.1)

a. 2

b. 8

c. 10

d. 16

22. Which of the following is an integer representation method that handles both positive and negative numbers? ( Knowledge point 3.2) d

a. sign-and-magnitude

b. one’s complement

c. two’s complement

d. all of the above

23. In unsigned integers, a 4-bit allocation allows d nonnegative numbers. ( Knowledge point 3.2)

a. 7

b. 8

c. 15

d. 16

24. In all signed integer representations, a 4-bit allocation complementation allows b

nonnegative numbers. ( Knowledge point 3.2)

a. 7

b. 8

c. 15

d. 16

25. In c number representation, 1111 in memory represents -0. ( Knowledge point

3.2)

a. unsigned integers

b. signed-and-magnitude

c. one’s complement

d. two’s complement

26. In d number representation, 1111 in memory represents -1. ( Knowledge point

3.2)

a. unsigned integers

b. signed-and-magnitude

c. one’s complement

d. two’s complement

27. In d number representation, there are two representations for 0. ( Knowledge point 3.2)

a. sign-and-magnitude

b. one’s complement

c. two’s complement

d. a and b

28. In c number representation, there is one representation for 0. ( Knowledge point

3.2)

a. unsigned integer

b. one’s complement

c. two’s complement

d. a and c

29. If the leftmost bit is 0 in d number representation, then the decimal number is positive. ( Knowledge point 3.2)

a. sing-and-magnitude

b. one’s complement

c. two’s complement

d. all of the above

30. If the leftmost bit is 1 in d number representation, then the decimal number is positive. ( Knowledge point 3.2)

a. sign-and-magnitude

b. one’s complement

c. two’s complement

d. none of the above

31. Which number representation method is most widely used today for storing numbers in a computer? ( Knowledge point 3.2) c

a. sing-and-magnitude

b. one’s complement

c. two’s complement

d. unsigned integers

32. Which number representation method is often used to convert analog signals to digital signals? ( Knowledge point 3.2) d

a. unsigned integers

b. sign-and-magnitude

c. one’s complement

d. b and c

33. Unsigned integers can be used for d. ( Knowledge point 3.2)

a. counting

b. addressing

c. signal processing

d. a and b

34. Which number representation method is often used to store the exponential value of a fraction? ( Knowledge point 3.3) d

a. unsigned integers

b. one’s complement

c. two’s complement

d. Excess_X

35. In an Excess_X conversion, you a the magic number X to the number to be converted. ( Knowledge point 3.3)

a. add

b. subtract

c. multiply

d. pide

36. In Excess_X number representation, what is usually the relationship between X and N, the bit allocation? ( Knowledge point 3.3 c

a. X=2N-1

b. X=2N+1

c. X=2N-1-1

d. a or c

40. What is the Excess_128 representation of 5? ( Knowledge point 3.3) c

a. 00000101

b. 10000100

c. 10000101

d. 10000001

41. When a fraction is normalized, there is a b to the left of the decimal point. ( Knowledge point 3.4)

a. 0 bit

b. 1 bit

c. random bit sequence

d. a or b

42. You multiply a normalized number by d where e is the number of bits that the decimal point moved. ( Knowledge point 3.4)

a. 2e

b. e/2

c. e2

d. 2e

43. When a fraction is normalized, the computer stores the d. ( Knowledge point 3.4)

a. sign

b. exponent

c. mantissa

d. all of the above

44. The precision of the fractional number stored in a computer is defined by the c. ( Knowledge point 3.4)

a. sign

b. exponent

c. mantissa

d. any of the above

45. How is the mantissa stored in a computer? ( Knowledge point 3.4) c

a. in one’s complement

b. in two’s complement

c. as an unsigned integer

d. in sign-and-magnitude

46. An octal digit converted to binary is composed of b bits. ( Knowledge point 3.1)

a. 2

b. 3

c. 4

d. 8

EXERCISES

47.Change the following decimal numbers to 8-bit unsigned integer if possible. ( Knowledge point 3.1)

a. 23 00010111

b. 121 01111001

c. 34 00100010

d. 342 Overflow

48.Change the following decimal numbers to 16it unsigned integer. ( Knowledge point 3.1)

a. 41 0000000000101001

b. 411 0000000110011011

c. 1234 0000010011010010

d. 342 0000000101010110

49. Change the following decimal numbers to 8-bit sign-and-magnitude integers. ( Knowledge point 3.2)

a. 32 00100000

b. -101 11100101

c. 56 00111000

d. 129 Overflow

50. Change the following decimal numbers to 16-t sign-and-magnitude integers. ( Knowledge point 3.2)

a. 142 0000000010001110

b. -180 1000000010110100

c. 560 0000001000110000

d. 2456 0000100110011000

52. Change the following decimal numbers to 16-bit one’s complement integers. ( Knowledge point 3.2)

a. 162 0000000010100010

b. -110 1000000001101110

c. 2560 0000101000000000

d. 12,123 0010111101011011

53. Change the following decimal numbers to 8-bit two’s complement integers. ( Knowledge point 3.2)

a. -12 11110100

b. -101 10011011

c. 56 00111000

d. 142 Overflow

54. Change the following decimal numbers to 16-bit two’s complement integers. ( Knowledge point 3.2)

a. 102 0000000001100110

b. -179 1111111101001101

c. 534 0000001000010110

d. 62,056 1111001001101000

55. Change the following 8-bit unsigned numbers to decimal. ( Knowledge point 3.1)

a. 01101011 107

b. 10010100 148

c. 00000110 6

d. 01010000 80

56. Change the following 8-bit sign-and-magnitude numbers to decimal. ( Knowledge point

3.2)

a. 01111011 123

b.10110100 -52

c.01100011 99

d.11010000 -80

57. Change the following 8-bit one’s complement numbers to decimal. ( Knowledge point

3.2)

a.01100011 99

b.10000100 -123

c.01110011 115

d.11000000 -63

58. Change the following 8-bit two’s complement numbers to decimal. ( Knowledge point

3.2)

a.01110111 119

b.11111100 -4

c.01110100 116

d.11001110 -50

68. Show the following numbers in 32-bit IEEEformat. ( Knowledge point 3.4)

a. -20x1.10001 1 01111111 10001000000000000000000

b.+23x1.111111 0 10000010 11111100000000000000000

c.+2-4x1.01110011 0 01111011 01110011000000000000000

d.-2-5x1.01101000 1 01111010 01101000000000000000000

08ac5f47a1116c175f0e7cd184254b35effd1a10ing 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 11001100000000000000000

b. 12.640625

→1100.101001 →23×1.100101001 →0 10000010 10010100100000000000000 c. -11.40625

→-1011.01101 →-23×1.01101101 → 1 10000010 01101101000000000000000

d. -0.375

→-0.011 →-2-2×1.1 → 1 01111101 10000000000000000000000

本文来源:https://www.bwwdw.com/article/qtvl.html

Top