计算机科学导论课件:chap2-data-representation-new
- 格式:ppt
- 大小:4.60 MB
- 文档页数:128
Chapter 2 Data RepresentationKnowledge point:2.1 Data Types.2.2 Data inside the Computer.2.3 Representing Data.2.4 Hexadecimal and Octal notation.REVIEW QUESTIONS five types of data that a computer can process. ( Knowledge point2.1)A:Numbers, text, images, audio, and video.2.How does a computer deal with all the data types it must process? ( Knowledge point 2.2) A:All data types are transformed into bit pattern.3.4.What is the difference between ASCII and extended ASCII? ( Knowledge point 2.3)A:ASCII is a bit pattern made of 7 bits and extended ASCII is a bit pattern made of 8 bits.5.What is EBCDIC? ( Knowledge point 2.3)A:Extended Binary Coded Decimal Interchange Code.6.How is bit pattern length related to the number of symbols the bit pattern can represent?( Knowledge point 2.3)A:The relationship is logarithmic.7.8.9.What steps are needed to convert audio data to bit patterns? ( Knowledge point 2.3)A:Sampling, Quantization, and Coding.10.What is the relationship between image data and video data? ( Knowledge point 2.3)A:Video is a representation of images in time.MULTIPLE-CHOICE QUESTIONS11. Which of the following can be classified as data? ( Knowledge point 2.1) da. numbersb. videoc. audiod. all of the above12. To store a byte, you need d electronic switches. ( Knowledge point 2.2)a. 1b. 2c. 4d. 813. A byte consists of c bits. ( Knowledge point 2.2)a. 2b. 4c. 8d. 1614. In a set with 64 symbols, each symbol requires a bit pattern length of c bits. ( Knowledge point 2.3)a. 4b. 5c. 6d. 715. How many symbols can be represented by a bit pattern with 10 bits? ( Knowledge point2.3) da. 128b. 256c. 512d. 102416. In extended ASCII, each symbol is b bits. ( Knowledge point 2.3)a. 7b. 8c. 9d. 1017. If the ASCII code for E is 1000101, then the ASCII code for e is d. ( Knowledge point 2.3)a. 1000110b. 1000111c. 0000110d. 110010118.In extended ASCII, a a of the bit pattern for regular ASCII code. ( Knowledge point 2.3)a. 0 bit is added to the leftb. 0 bit is added to the rightc. 1 bit is added to the leftd. 1 bit is added to the right19. c is a code used in IBM mainframes. ( Knowledge point 2.3)a. ASCIIb. Extended ASCIIc. EBCDICd. Unicode20. d is a 16-bit code that can represent symbols in languages other than English. ( Knowledge point 2.3)a. ASCIIb. Extended ASCIIc. EBCDICd. Unicode21. d is a code used by the Java language to represent characters. ( Knowledge point2.3)a. ASCIIb. Extended ASCIIc. EBCDICd. Unicode22. A 32-bit code was developed by b to represent symbols in all languages. ( Knowledge point 2.3)a. ANSIb. ISOc. EBCDICd. Hamming23. An image can be represented in a computer using the d method. ( Knowledge point 2.3)a. bitmap graphicb. vector graphicc. matrix graphicd. a or b24.The bitmap graphic method and the vector graphic method are used to represent c in a computer. ( Knowledge point 2.3)a. audio b . video c. images d. numbers25.In the a graphic method of representing an image in a computer, each pixel is assigned one or more bit patterns. ( Knowledge point 2.3)a. bitmapb. vectorc. quantizedd. binary26. In the b graphic method of representing an image in a computer, the image is decomposed into a combination of curves and lines. ( Knowledge point 2.3)a. bitmapb. vectorc. quantizedd. binary27. In the a graphic method of representing an image in a computer, rescaling of the image creates a ragged or grainy image. ( Knowledge point 2.3)a. bitmapb. vectorc. quantizedd. binary28. When you want to download music to a computer, the audio signal must be d. ( Knowledge point 2.3)a. sampledb. quantizedc. codedd. all of the above EXERCISES29. Given 5 bits, how many distinct 5-bit patterns can you have? ( Knowledge point 2.2)A:25=3232. A machine has eight different cycles. How many bits are needed to represent each cycle? ( Knowledge point 2.3)A:log28=333. A student’s grade in a course can be A, B, C, D, F, W (withdraw), or I (incomplete). How many bits are needed to represent the grade? ( Knowledge point 2.3)A:log27≈334. A company has decided to assign a unique bit pattern to each employee. If the company has 900 employees, what is the minimum number of bits needed to create this system ofrepresentation? How many patterns are unassigned? If the company hires another 300 employees, should it increase the number of bits? Explain your answer. ( Knowledge point 2.3)A:log2900≈10,210-900=124,Yes, 900+300>21035. If you use a 4-bit pattern to represent the digits 0 to 9, how many bit patterns are wasted? ( Knowledge point 2.3)A:24-10=636. A gray scale picture is digitized using four different gray levels. If the picture is composed of 100×100 pixels, how many bits are needed to represent the picture? ( Knowledge point 2.3)A:100×100×log24=20000(bits)37. An audio signal is sampled 8000 times per second. Each sample is represented by 256 different levels. How many bits per second are needed to represent this signal? ( Knowledge point 2.3)A:log2256×8000=64000(bits)42. How many hexadecimal digits are needed to convert a 19-bit pattern? ( Knowledge point 2.4)A:543. How many octal digits are needed to convert a 19-bit pattern? ( Knowledge point 2.4)A:744. How many hexadecimal digits are needed to convert a 6-byte pattern? ( Knowledge point 2.4)A:12。
Chapter 1 Introduction计算机是一种可编程数据处理器。
一个程序是一组指令,告诉计算机做什么数据。
Speaker:音箱。
硬件四种种类:系统单元(System unit)、输入输出设备(Input/Output devices)、辅助储存设备(Secondary storage devices )、通信设备(Communications devices )。
1.系统单元的两个重要组成部分是微处理器(microprocessor)和存储器(primary storage or random access memory (RAM))。
微处理器控制和操纵数据来产生信息。
存储器用于保存数据和程序指令的数据处理。
它也保存处理后的信息在其输出之前。
2.不同于内存,二级存储设备存储数据和程序,即使在计算机的电源系统已关闭。
最重要的辅助媒介软盘(floppy disks),硬盘(hard disks),光盘(optical disks)。
3.通信设备从一台计算机或辅助存储发送或接受数据和程序。
如调制解调器(modern)冯布伊曼模型(Von Neumann Model):着眼于计算机内部(黑盒),定义计算机如何处理数据。
基于三个想法:1.模型定义为四个子系统:一个储存器,算术逻辑单元,控制单元,和输入/输出。
2.程序必须储存在内存中。
3.在冯诺依曼模型中的程序是由有限(finite)数量的指令构成。
指令一个又一个执行(顺序执行)。
软件:系统软件(System software),应用软件(application software )。
系统软件:最重要的系统软件是操作系统(operating system),它与应用软件和计算机相互作用。
应用软件:如浏览器(browser)。
软件与硬件的关系:计算机种类:超级计算机(supercomputers)、大型计算机(mainframe computers)、小型计算机(minicomputers)、微型计算机(microcomputers)。