计算机导论-第3章-数字表示
- 格式:doc
- 大小:54.00 KB
- 文档页数:5
第3章补充习题答案1. (10111.110)2=(27.6)8 , (10111.110)2=(17.C)16(1001010.101)2= (112.5)8 , (1001010.101)2= (4A.A)162. (17)10=(10001)2 ,(17)10=(21)8 ,(17)10=(11)16(0.5918)10=(0.1001)2 ,(0.5918)10=(0.457)8 (0.5918)10=(0.9780)16(125)10= (1111101)2 ,(125)10= (175)8 ,(125)10= (7D)16(234.125)10=(11101010.001)2 ,(234.125)10=(352.1)8 ,(234.125)10=(DA.2)163. (101011.110)2= (43.75)10 (73.2)8=(59.25)10 (A8C)16= (2700)104.若用二进制数表示所有4位十进制数,至少需要10位二进制数5. (1001)原码是00001001,补码是00001001,反码是00001001,(-1001) 原码是10001001,补码是11110110,反码是11110111(1000) 原码是00001000补码是00001000反码是00001000(-1000) 原码是10001000补码是11111000反码是11110111(+0000) 原码是00000000补码是00000000反码是00000000(-0000) 原码是10000000补码是100000000反码是111111116 1).[X]原=10111;则头号位1为“-”号,0111为1+2+4=7所以原来的数位-7。
2).[X]反=10111;则头号位1为“-”号,0111为1000,等于8+0+0+0=8所以原来的数为-8。
3).[X]补=10111:则头号位1为“-”号,0111要-1等于0110,0110反过来是1001.,1001等于8+0+0+1=9,所以原来的数为-97 YES的ASCII码的二进制是11011010111111010111 ,十进制是896983十六进制是DAFD7COMPUTER的ASCII码的二进制是11000000101100010110000011000011101100111111111000110十进制是6779778085846982 十六进制是18162C18767FC6SIN(3.14、N) 的ASCII码的二进制是110111111111011011011000000011110011011110000101101001010100001 十进制是8069161937298182817十六进制是6FFB6C079BC2D2A18 计算机:计算机是一种能够按照程序对各种数据和信息进行自动处理的电子设备。
计算机中如何表示数字-01机器数与真值机器数就是数值在计算机中的表示形式,真值则是它在现实中的实际数值。
可以这样简单的理解。
因为计算机只能直接识别和处理用0、1两种状态的二进制形式的数据,所以在计算机中无法按人们的日常书写习惯用正、负符号加绝对值来表示数值,而与数字一样采用二进制代码0和1来表示正、负号。
这样在计算机中表示带符号的数值数据时,符号和数均采用了0、1进行了代码化。
这种采用二进制表示形式,连同正负符号一起代码化的数据,称为机器数或者机器码(即,数值在计算机中的二进制表示形式)。
与机器数对应,用正、负符号加绝对值来表示的实际数值称为真值。
根据约定机器数是否存在符号位,机器数可以分为无符号数和带符号数。
无符号数是指计算机字长的所有二进制位均表示数值。
带符号数是指机器数分为符号位和数值两部分,且均采用二进制表示。
一般约定最高位表示符号。
例1-1:10011001作为无符号定点整数时,真值是153;作为带符号定点整数时,第一位是符号位,1代表负号,二进制数10011001的真值是-0011001,转化成十进制是-25。
对于带符号数,根据小数点位置固定与否,又可以分为定点数和浮点数。
在介绍浮点数之前我们要将注意力完全放在定点数上面,要有点耐心,对定点数的理解程度决定了我们对浮点数的理解程度,因为可以将浮点数看成是对定点数的一种应用,以后就会明白了。
好了,先看一看什么是定点数。
定点数约定所有数据的小数点位置均是相同且固定不变的。
计算机中通常使用的定点数有定点小数和定点整数两类。
定点小数:对于一个长度为n位的机器数,定点小数约定小数点在符号位和最高数值位之间,如下数符(最高位,占用1位). 尾数(剩余n-1位)小数点只是一个约定,是隐含的,不占用空间。
定点整数:对于一个长度为n位的机器数,定点整数约定小数点在最低数值位之后,如下数符(最高位,占用1位)尾数(剩余n-1位).小数点也是隐含的。
例1-2:下的八位二进制数,我们看看它们所代表的值是多少定点小数:1.1011001 真值=-0.1011001=-0.6953125定点整数:11011001 真值=-1011001=-89真值:127=+1111111 定点整数:01111111真值:-0.125=-0.001 定点小数:1.0010000总结上面的内容,机器数的特点是:1. 符号数值化,0代表正、1代表负。
计算机导论课后习题第一章绪论一、单项选择题1.世界上第一台电子计算机ENIAC诞生于()。
A.1941年B.1946年C.1949年D.1950年2.世界上首次提出存储程序计算机体系结构的是()。
A.莫奇莱B.艾仑·图灵C.乔治·布尔D.冯·诺依曼3.世界上第一台电子数字计算机采用的主要逻辑部件是()。
A.电子管B.晶体管C.继电器D.光电管4.物理器件采用晶体管的计算机被称为()。
A.第一代计算机B.第二代计算机C.第三代计算机D.第四代计算机5.下列叙述正确的是()。
A.世界上第一台电子计算机ENIAC,首次实现了“存储程序”方案B.按照计算机的规模,人们把计算机的发展过程分为四个时代C.微型计算机最早出现于第三代计算机中D.冯·诺依曼提出的计算机体系结构奠定了现代计算机结构的理论基础6.计算机最早的应用领域是()。
A.科学计算B.数据处理C.过程控制D.CAD/CAM/CIMS7.计算机辅助设计的简称是( )。
A.CAD B.CAM C.CAI D.CBE8.当前的计算机一般称为第四代计算机,它所采用的逻辑元件是()。
A.晶体管B.集成电路C.电子管D.大规模集成电路9.按照计算机用途,可将计算机分为()。
A.通用计算机和个人计算机B.数字计算机和模拟计算机C.数字计算机和混合计算机D.通用计算机和专用计算机10.计算机中所有信息的存储都采用()。
A.十进制B.二进制C.八进制D.十六进制11.计算机最主要的工作特点是()。
A.存储程序与自动控制B.高速度与高精度C.可靠性与可用性D.有记忆能力12.计算机硬件的组成部分主要包括运算器、存储器、输入设备、输出设备和()。
A.控制器B.显示器C.磁盘驱动器D.鼠标器13.客机、火车票系统属于()方面的计算机应用。
A.科学计算B.数据处理C.过程控制D.人工智能14.个人计算机属于()。
A.小巨型机B.小型计算机C.微型计算机D.中型计算机15.计算机之所以能实现自动连续执行,是由于计算机采用了()工作原理。
第一章概述1、计算机的发展从1946年第一台电子计算机ENIAC问世至今已经历了五代的发展历史。
第一台计算机ENIAC诞生于1946年,是电子管计算机;第二代是晶体管计算机;第三代是中小规模集成电路;第四代是大规模集成电路;2、冯·诺依曼原理:存储程序和程序控制的原理3、信息的基本单位●基本概念◆位bit:一位二进制代码,用b表示;是数字信息化的最小单位◆字节Byte:简写为B。
8位二进制数为一个字节,是表示存储容量大小的最基本单位;◆字Word:由字节组成,为字节的整数倍;◆字长●存储容量大小的换算1 B ===8bit; 1KB====1024B ;1MB====1024KB; 1GB===1024MB;1TB===1024GB; 1个汉字===2B;●几种进制数(1)十进制计数制:有0-9十个数码,逢十进一。
用D标记或加下标10(2)二进制计数制:仅有0、1两个数码,逢二进一。
(0+0=0 0+1=1 1+0=1 1+1=10)用B标记或加下标2(3)八进制计数制:有0-7共8个数码,逢八进一。
(7+1=10)用O标记或加下标8(4)十六进制计数制:有0-9、A、B、C、D、E、F共十六个数码,逢十六进一。
(F+1=10)用H标记或加下标16●几种进制数之间的转换(1)各进位制数转换为十进制数将各进位制数按照其通式展开(个位为0位),计算出结果即可。
(2)十进制数换成二、八、十六进制数10→?整数部分:采用“除—倒取余数法”(一直除到商为0,将得出的余数倒排即为转换结果。
)小数部分:采用“乘—顺取整数部分”(一直除到小数部分为0,将得出的整数部分顺序排列即为转换结果。
)(3)二进制数与八进制数转换⏹2→8采用“三位一并”法:以小数点为基点,向左右两边三位一组转为八进制数,不足三位用0补齐。
⏹8→2采用“一分为三”法。
(4)二进制数与十六进制数转换●2→16采用“四位一并”法:以小数点为基点,向左右两边四位一组转为十六进制数,不足四位用0补齐。
第1章习题参考答案1、简要叙述ENIAC之前计算工具的发展历程。
答案:(1)算筹;(2)算盘;(3)计算尺;(4)机械计算机;(5)机电计算机。
对于(3)—(5),列出其代表机型。
2、对比说明第一代至第四代计算机各自的主要特点。
答案:(1)第一代计算机的主要特点:用电子管作为基本元器件;用机器语言或汇编语言编写程序;使用水银延迟线、静电存储管、磁鼓和磁芯作主存储器;输入输出装置主要用穿孔卡片;主要用于科学计算。
(2)第二代计算机的主要特点:用晶体管作为基本元器件;出现了FORTRAN、ALGOL和COBOL 等高级语言;采用磁芯存储器作主存,采用磁盘与磁带作辅存;除了科学计算和数据处理外,开始进入实时过程控制领域;出现了操作系统。
(3)第三代计算机的主要特点:用集成电路作为基本元器件;高级语言得到广泛应用;用半导体存储器取代了磁芯存储器,存储容量大幅度提高;普遍采用了微程序设计技术,设计了具有兼容性的体系结构;系统软件与应用软件都有很大发展,操作系统的功能有很大的提高和完善;出现了成本较低的小型计算机。
(4)第四代计算机的主要特点:用微处理器或超大规模集成电路取代了普通集成电路;计算机的存储容量进一步扩大,开始使用光盘和激光打印机;面向对象程序设计语言得到广泛使用;微型计算机诞生;数据通信、计算机网络、分布式处理有了很大的发展,互联网得到广泛应用。
3、微型计算机是如何发展起来的?微型计算机的快速发展有什么重要意义?答案: 1971年诞生的微处理器是将运算器和控制器集成在一起的大规模/超大规模集成电路芯片,以微处理器为核心再加上存储器和接口芯片,便构成了微型计算机。
1981年IBM公司推出微型计算机IBM PC后,微型计算机得到了快速发展。
微型机的出现及快速发展,才使计算机走进了大大小小的企事业单位和千家万户,也促进了互联网的快速发展和广泛应用。
4、简要说明第五代计算机的含义,如何评价第五代计算机的研究。
《计算机导论》教学大纲说明:教师可根据课时和学校特点适当选择、调整教学安排。
一、课程简介实证思维、逻辑思维和计算思维是人类认识世界和改造世界的三大思维。
计算机的出现为人类认识世界和改造世界提供了一种更有效的手段,以计算机技术和计算机科学为基础的计算思维已成为人们必须具备的基础性思维。
如何以计算机思维为切入点,通过重构《大学计算机》的课程体系和知识结构,促进计算思维能力培养,提升大学生综合素质和创新能力是大学计算机课程改革面临的重要课题。
这些不断变化的情况要求对目前《大学计算机》的课程体系进行改革。
所以,如何明确、恰当地将计算思维融入知识体系,培养当代大学生用计算机解决和处理问题的思维和能力,从而提升大学生的综合素质,强化创新实践能力是当前的迫切要求。
1.教学目标(1)基本目标《大学计算机》教学不仅承担着传承知识,更肩负着创新知识的使命。
因此,在传授知识的同时更应培养学生的学习能力、解决问题的能力、交流能力、团队合作能力和创新能力,使他们能更快地适应未来工作的需求。
分层次课程体系体现《大学计算机》课程教学的实效性和针对性, 以“全面提高计算机公共课程教学质量,培养学生良好的信息化素养, 计算思维品质和计算机应用技能,为学生的后续专业学习提供良好的支持”为核心目标。
(2)高级目标研究性教学在培养学生的综合能力的过程中将发挥越来越重要的作用,它将成为综合性实践课程的主要教学方法。
学习的过程是参与的过程,是创造的过程而非盲目接受的过程。
学生积极的思维习惯和探究问题的意识应该在课程教学中得到培养。
在实现基本目标的基础上,实现高级目标:♦提升学习愿望,学习目标;♦增强学生的自我意识;♦运用已有知识学习新事物;♦教授特定领域和特定课程的学习策略;♦潜移默化,完善学生的人格。
2.实践环节实践性教学内容的设置遵循以下原则:(1)课程实验采用集中实验和自主实险相结合的原则。
其中,集中实验根据课程安排到统一的实验室进行实验;自主实验则由学生利用自己的机器或学校内外公有计算机实验室自主完成实验任务。
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。