计算机概论第二章

Answers are in blue.

|---------------------------------------------------------------------------------------------------|
| Computer Science Illuminated, Seventh Edition Nell Dale, PhD; John Lewis, PhD |

|-----------------------------------------|
| CHAPTER 2 EXERCISES AND ANSWERS |

For Exercises 1--5, match the following numbers with their definition.

  1. Number
  2. Natural number
  3. Integer number
  4. Negative number
  5. Rational number
    1. A unit of an abstract mathematical system subject to the laws of arithmetic.

A

    1. A natural number, a negative of a natural number, or zero. C
    2. The number zero and any number obtained by repeatedly adding one to it.

B

    1. An integer or the quotient of two integers (division by zero excluded).

E

    1. A value less than zero, with a sign opposite to its positive counterpart.

D

For Exercises 6--11, match the solution with the problem.

  1. 10001100
  2. 10011110
  3. 1101010
  4. 1100000
  5. 1010001
  6. 1111000
    1. 1110011 + 11001 (binary addition) A
    2. 1010101 + 10101 (binary addition) C
    3. 1111111 + 11111 (binary addition) B
    4. 1111111 - 111 (binary subtraction) F
    5. 1100111 - 111 (binary subtraction) D
    1. 1010110 - 101 (binary subtraction) E

For Exercises 12--17, mark the answers true and false as follows:

      1. True
      2. False
    1. Binary numbers are important in computing because a binary number can be converted into every other base.

B错误

    1. Binary numbers can be read off in hexadecimal but not in octal.

B都可以才对

    1. Starting from left to right, every grouping of four binary digits can be read as one hexadecimal digit.

B从右往左读

    1. A byte is made up of six binary digits. B8
    2. Two hexadecimal digits can be stored in one byte. A 一个16一个4,两个16一个8
    3. Reading octal digits off as binary produces the same result whether read from right to left or left to right.

A

八进制读成二进制怎么读都是一样的

Exercises 18--47 are problems or short answer questions.

    1. Distinguish between a natural number and a negative number.

A natural number is 0 and any number that can be obtained by repeatedly adding 1 to it. A negative number is less than 0, and opposite in sign to a natural number (although we usually do not consider negative 0).

自然数是0反复加一,

负数小于0,并在自然数上符号相反

    1. Distinguish between a natural number and a rational number. A rational number is an integer or the quotient of integer numbers. (Division by 0 is excluded.) A natural number is 0 and the positive integers. (See also definitions in answer to Exercises 1--5.)
    2. 有理数是整数的商,
    3. 自然舒是0和正整数
    4. Label the following numbers natural, negative, or rational.
      1. 1.333333

rational

      1. -1/3

negative, rational

      1. 1066

natural

      1. 2/5

rational

      1. 6.2

rational

      1. π (pi)

not any listed

    1. If 891 is a number in each of the following bases, how many 1s are there?
      1. base 10

891

      1. base 8

Cannot be a number in base 8

越界

      1. base 12

1261

      1. base 13

1470

      1. base 16

2193

    1. Express 891 as a polynomial in each of the bases in Exercise 21.
      1. 8 * 102 + 9 * 10 + 1
      2. Cannot be shown as a polynomial in base 8.
      3. 8 * 122 + 9 * 12 + 1
      4. 8 * 132 + 9 * 13 + 1
      5. 8 * 162 + 9 * 16 + 1
    2. Convert the following numbers from the base shown to base 10.
      1. 111 (base 2)

7

      1. 777 (base 8)

511

      1. FEC (base 16) 4076
      2. 777 (base 16)

1911

      1. 111 (base 8)

73

    1. Explain how base 2 and base 8 are related.

Because 8 is a power of 2, base-8 digits can be read off in binary and three base-2 digits can be read off in octal.

因为8是2的幂,所以可以将八进制数字读取为二进制,并且可以从八进制中读取三个二进制数字。

    1. Explain how base 8 and base 16 are related. 8 and 16 are both powers of two.
    2. 是的,8和16都是2的幂。其中,8是2的立方,而16是2的四次方。

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |----------|---------|-----------| | binary | octal | decimal | | 000 | 0 | 0 | | 001 | 1 | 1 | | 010 | 2 | 2 | | |

Expand the table on page 43 to include the numbers from 11 through 16.

|-------|----|----|
| 011 | 3 | 3 |
| 100 | 4 | 4 |
| 101 | 5 | 5 |
| 110 | 6 | 6 |
| 111 | 7 | 7 |
| 1000 | 10 | 8 |
| 1001 | 11 | 9 |
| 1010 | 12 | 10 |
| 1011 | 13 | 11 |
| 1100 | 14 | 12 |
| 1101 | 15 | 13 |
| 1110 | 16 | 14 |
| 1111 | 17 | 15 |
| 10000 | 20 | 16 |

    1. Expand the table in Exercise 26 to include hexadecimal numbers.

|----------|---------|-----------|---------------|
| binary | octal | decimal | hexadecimal |
| 000 | 0 | 0 | 0 |
| 001 | 1 | 1 | 1 |
| 010 | 2 | 2 | 2 |
| 011 | 3 | 3 | 3 |
| 100 | 4 | 4 | 4 |
| 101 | 5 | 5 | 5 |
| 110 | 6 | 6 | 6 |
| 111 | 7 | 7 | 7 |
| 1000 | 10 | 8 | 8 |
| 1001 | 11 | 9 | 9 |
| 1010 | 12 | 10 | A |
| 1011 | 13 | 11 | B |
| 1100 | 14 | 12 | C |
| 1101 | 15 | 13 | D |
| 1110 | 16 | 14 | E |
| 1111 | 17 | 15 | F |
| 10000 | 20 | 16 | 20 |

    1. Convert the following binary numbers to octal.
      1. 111110110

766

      1. 1000001

101

      1. 10000010

202

      1. 1100010

142

    1. Convert the following binary numbers to hexadecimal.
      1. 10101001 A9
      2. 11100111 E7
      1. 01101110 6E
      2. 01111111 7F
    1. Convert the following hexadecimal numbers to octal.
      1. A9 251
      2. E7 347
      3. 6E 156
    2. Convert the following octal numbers to hexadecimal.
      1. 777 1FF
      2. 605

185

      1. 443

123

      1. 521

151

      1. 1

1

    1. Convert the following decimal numbers to octal.
      1. 901

1605

      1. 321

501

      1. 1492

2724

      1. 1066

2052

      1. 2001

3721

    1. Convert the following decimal numbers to binary.
      1. 45

101101

      1. 69

1000101

      1. 1066

10000101010

      1. 99

1100011

      1. 1

1

    1. Convert the following decimal numbers to hexadecimal.
      1. 1066 42A
      2. 1939

793

      1. 1

1

      1. 998 3E6
      2. 43 2B
    1. If you were going to represent numbers in base 18, what symbols might you use to represent the decimal numbers 10 through 17 other than letters?
    2. 如果你要用
    3. 18进制表示数字,除了字母之外,你可以使用哪些符号来代表10到17的十进制数字呢?你可以延续十六进制的方法,使用G表示16,H表示17。但任何特殊字符或其他字母表的字符也可以使用,例如,你可以使用#表示16,@表示17。Convert the following decimal numbers to base 18 using the symbols you suggested in Exercise 35.
      1. 1066

354 (answers will vary)

      1. 99099

#@F9 (answers will vary)

      1. 1

1 (answers will vary)

    1. Perform the following octal additions.
      1. 770 + 665

1655

      1. 101 + 707

1010

      1. 202 + 667

1071

    1. Perform the following hexadecimal additions.
      1. 19AB6 + 43 19AF9
      2. AE9 + F AF8
      3. 1066 + ABCD BC33
    2. Perform the following octal subtractions.
      1. 1066 - 776

70

      1. 1234 - 765

247

      1. 7766 - 5544

2222

    1. Perform the following hexadecimal subtractions.
      1. ABC - 111 9AB
      2. 9988 - AB 98DD
      3. A9F8 - 1492 9566
    2. Why are binary numbers important in computing?

Data and instructions are represented in binary inside the computer.

二进制数字在计算中为何重要?

计算机内部表示数据和指令时使用二进制。

    1. A byte contains how many bits? 8
    1. How many bytes are there in a 64-bit machine? 8
    2. Why do microprocessors such as pagers have only 8-bit machines?

Pagers are not general-purpose computers. The programs in pagers are small enough to be represented in 8-bit machines.

寻呼机程序足够小,可以用8位机器表示

    1. Why is important to study how to manipulate fixed-sized numbers?

It is important to understand how to manipulate fixed-sized numbers because numbers are represented in a computer in fixed-sized format.

因为计算机中的数字是以固定大小的格式表示的

    1. How many ones are there in the number AB98 in base 13? ((13 * 13 * 13 * 10) + (13 * 13 * 11) + 13 * 9) + 8) = 23954
    2. Describe how a bi-quinary number representation works. There are seven lights to represent ten numbers. The first two determine the meaning of the next five. If the first light is on, the next five represent 0, 1, 2, 3, and 4, respectively.

If the second is on, the next five represent 5, 6, 7, 8, and 9, respectively.

描述一下二五进制数的表示方法。有七个灯表示十个数字。前两个灯决定接下来五个的意义。如果第一个灯亮着,接下来的五个分别表示0、1、2、3和4。如果第二个灯亮着,接下来的五个分别表示5、6、7、8和9。

相关推荐
像污秽一样1 小时前
《计算机网络(第7版)-谢希仁》期末考试复习题和答案(总结整理)
计算机网络
Dovir多多5 小时前
Python数据处理——re库与pydantic的使用总结与实战,处理采集到的思科ASA防火墙设备信息
网络·python·计算机网络·安全·网络安全·数据分析
小伍_Five8 小时前
透视网络世界:计算机网络习题的深度解析与总结【前3章】
服务器·网络·计算机网络
sensen_kiss14 小时前
CAN201 Introduction to Networking(计算机网络)Pt.2 传输层
网络·学习·计算机网络
萧瑟其中~14 小时前
计算机网络:TCP/IP网络协议
网络协议·tcp/ip·计算机网络
‘’林花谢了春红‘’1 天前
计算机网络习题(第5章 网络层 第6章 传输层)
网络·计算机网络
霸气的哦尼酱1 天前
物理层知识要点
计算机网络
lfwendula01 天前
组相联映射 set-associative mapping
计算机网络
CHENGlady1 天前
传输层协议分析头歌
计算机网络
Jacen.L2 天前
使用TC命令模拟弱网丢包
计算机网络