1 / 64

Introduction to Computer Science

Introduction to Computer Science. By Wanshanshan wss@bucea.edu.cn. Components. 计算机基本组成. 存储器. 输入设备. 运算器. 输出设备. 控制器. 数据流. 冯 . 诺依曼思想: 二进制; 程序与数据一样存放在内存; 五大模块。. 控制流. Capabilities. All computers must perform set of tasks and provide the capability to:

jamal
Download Presentation

Introduction to Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Computer Science By Wanshanshan wss@bucea.edu.cn

  2. Components C Language Programming

  3. 计算机基本组成 存储器 输入设备 运算器 输出设备 控制器 数据流 冯.诺依曼思想: 二进制; 程序与数据一样存放在内存; 五大模块。 控制流

  4. Capabilities • All computers must perform set of tasks and provide the capability to: • Accept input(输入), both data(数据) and instructions(指令) • Display output(输出), both textual and numerical • Store data and instructions • Perform arithmetic and logic operations on either the input or stored data • Monitor, control and direct the overall operation and sequencing of the system C Language Programming

  5. 操作码 操作数 计算机基本工作原理 1. 指令 让计算机完成某个操作发出的命令。 2. 程序 有序的指令集合。 3. 指令的执行 指令 取指周期: 内存 CPU 控制信号 CPU译码 有关部件动作 执行周期: 4. 程序的执行 CPU不断地取指令,执行指令。

  6. 指令执行过程 起始地址 自动加1 ① 程序计数器PC 0100H ⑨ 程序区 ② 指令寄存器 ③ ⑤ 译码器 控制器 ④ 操作控制线路 数据区 ⑥ ⑦ 累加器 算术、逻辑运算 ⑧ 运算器 Fundamental of Computer Information Technology

  7. AB地址总线 DB数据总线 CB控制总线 CPU 接口 接口 只读存储器 ROM 随机存储器 RAM 输出设备 输入设备 CPU与输入输出设备的连接 常用输入设备:键盘、鼠标、扫描仪、光笔、数字化仪等。 常用输出设备:显示器、打印机、绘图仪等。

  8. Hardware – Devices for Microcomputer • Processing: system unit • Storage • Input • Output • Communications

  9. CPU Power PC Pentium系列芯片 ROM 内存 RAM:一条有256MB、512MB Cache:内部Cache和外部Cache。 扩展槽:用于连接其它设备。 I/O总线:ISA、EISA、PCI等。 主机 硬盘、软盘、CD-ROM或DVD-ROM等驱动器。 显示卡、声频卡等。 通用串行总线USB 电源 个人计算机硬件系统

  10. System Board • Other components to be plugged into • Microprocessor chips • Memory chips • Bus lines • Expansion cards • Sockets and slots

  11. Microprocessor or CPU • Where the main action takes place • Processes data and instructions • Two basic components on a microchip • Control unit • Arithmetic-logic unit

  12. Central Processing Unit (CPU,中央处理单元) • Control unit(控制单元): directs and monitors the overall operation of the computer • Keeps track of where the next instruction resides • Issues the signals needed to both read data from and write data to other units in the system • Executes all instructions • Arithmetic and Logic Unit (ALU,运算逻辑单元): performs all of the computations, such as addition, subtraction, comparisons, and so on, that a computer provides • CPUs are constructed as a single microchip, which is referred to as a microprocessor(微处理器)

  13. Control Unit • 控制单元是微处理器最重要的部件之一,因为它负责整个处理过程 • Generates controls used to carry out a program’s instruction. (根据来自译码单元的指令,它会生成控制信号) • 告诉运算逻辑单元(ALU)和寄存器如何运算、对什么进行 运算 • Directs the movement of electronic signals between different parts • Directs control signals between the CPU and input/output devices. • 确保一切事情均发生在正确的时间和正确的地点。

  14. Arithmetic-Logic Unit • Usually called the ALU • performs two types of operations • Arithmetic: addition, subtraction, multiplication, and division • Logical: Comparing two pieces of data to see if one is • equal to (=) the other • less than (<) the other • greater than (>) the other

  15. CPU • 2. 衡量CPU性能的主要技术指标 • CPU字长:内部各寄存器之间一次能够传递的数据位,由内部数据总线决定,反映CPU内部运算速度和效率。 • 位宽:CPU通过外部数据总线与外部设备之间一次能够传递的数据位。 x位CPU:通常用CPU字长和位宽来称呼CPU。 如:Pentium CPU字长是32位,位宽是64位,称为超32位CPU。 80286 CPU字长和位宽都是16位,则称为16位CPU。 • CPU外频 :CPU总线频率,由主板为CPU提供的基准时钟频率。一般等于内存总线频率。 • CPU主频 :CPU内核电路的实际工作频率。 CPU在一个时钟周期里面完成的指令数。主频越高,CPU的速度就越快。由于CPU的内部结构不尽相同,并非时钟频率相同就性能一样。倍频:主频=外频*倍频 • 生产工艺技术:通常用微米(μm)数字来描述,精度越高表示生产工艺越先进,集成度越高。 Socket 478接口LGA775接口

  16. 第一台微型计算机: Intel 4004,4位,1969年由Intel公司的M.E.Hoff设计。 微处理器芯片的发展 计算机发展趋势:巨型化、微型化、网络化、智能化和多媒体化。

  17. 指令高速缓存 指令高速缓存 (cache): 指令高速缓存是芯片上的指令仓库,这样微处理器就不必停下来查找计算机内存中的指令。这种快速访问方式加快了处理速度,因为预取单元已经“取得”了这些指令,并将其以正确的顺序存放在预取单元中等待处理。

  18. Main Memory Unit(内存) • Stores data and instructions as sequence of bytes • A program must reside in main memory if it is to operate on the computer • Combines 1 or more bytes into a single unit, referred to as a word(字) Address Space for storage Unit 1 Unit 2 Fig. Structure of main memory

  19. Main Memory Unit • RAM , random access memory(随机存储器) • Every section of memory can be accessed randomly as quickly as any other section • Volatile: data is lost when power is turned off • ROM, read only memory(只读存储器) • Nonvolatile • Size is usually specified in bytes (MB or GB) 1 kilobytes (KB) = 1024 bytes 1megabytes (MB) = 1024 KB 1 gigabytes (GB) = 1024 MB 1 terabytes (TB) = 1024 GB

  20. Memory chips - RAM • Random access memory • Chips used for the temporary storage of data and instructions in main memory • Emptied when • The power is turned off • The computer is restarted • Destructive write process • Previous data lost • Nondestructive read process • Data left undisturbed

  21. ROM Memory • Stands for read only memory • Contain special programs for specific computer operations • Programs are built into them at the factory • Data inside could be retrieved, but could not be rewritten • Two variations • PROM (programmable ROM) • Can be written with special equipment once • EPROM (erasable programmable ROM) • Erasable with a special ultraviolet light

  22. Ports Panel • Power plug socket • Keyboard port • Mouse port • Monitor/graphics port • Serial port • Parallel port • USB port • Network port telephone jack • Speaker and microphone jacks

  23. Microcomputer cables and connectors

  24. Input and Output -- Two important computing steps

  25. 键盘 输入设备 鼠标器 扫描仪 CRT和平板显示器。 SVGA、TVGA。 隔行扫描和逐行扫描。 分辩率:1024  768。 显示器 常用 外部设备 输出设备 绘图仪 喷墨打印机 360~1440DPI 激光打印机 600DPI 打印机 点阵打印机 9针及24针 UPS不间断电源 输入输出设备

  26. Input Devices • Convert people-readable data into machine-readable form • Electronic signals of 0’s and1’s • Most Commonly used • Keyboard • Keys: typewriter keys, function keys, numeric keys, special-purpose and cursor-control keys • Direct entry: data in machine-readable format • Pointing devices, mouse • Scanning devices • Voice-input devices • Digital cameras and Digital video cameras

  27. Toggle keys: Num Lock, Caps Lock

  28. Pointing devices • Mouse, trackball – cursor moves in response to rolling ball or moving finger • Touch screen – screen recognizes position of touching finger • Light pen - screen recognizes position of light-sensitive penlike device • Digitizer – special pad and stylus used to capture images hand drawn • Pen-base recognizing – handwriting recognition for writing directly on the screen with a stylus

  29. Pointing devices

  30. Scanning devices • Convert images of text, drawings or special symbols into machine readable data for computer processing • Types • Image scanner • Fax machines • Fax modem cards • Barcode readers • Others

  31. Scanning Devices

  32. Voice-input devices • Convert a person’s speech into a digital code • Combined with appropriate software for voice recognition • Some system must be trained to a particular user’s voice • Voice recognition systems • Continuous speech • Discrete word

  33. Digital Cameras • Digital camera • Record still images digitally • CCD: sensor, up to 8 megapixels • Memory: CF, SM, Memory Stick, etc • Vendors: Sony, Nikon, Olympus • Digital video camera • Digital camcorder • Record motion digitally • Also capture still digital images

  34. Output Devices • Pieces of equipment that translate the processed information to a people-readable form • Categories • Monitors • Printers • Plotters • Voice

  35. Monitors • Most common • Pixel: picture element • Matrix of pixels: quality • More pixels, higher resolution • 640x480--1280x1024

  36. CRT Monitors

  37. Flat-panel monitors • Known as liquid crystal display (LCD) monitors • Portable monitors • Two types

  38. Printers • Convert processed data from machine language to a hard-copy format for human use • Types • Dot-matrix printers • Ink-jet printers • Laser printers • Thermal printers • Other printers

  39. Dot-matrix printer • dots generated by pins that strike an inked ribbon • Inexpensive • Noisy • low image quality

  40. Ink-Jet Printers • Sprays tiny ink droplets at high speed onto paper surface • Letter quality • Full color capable • Reliable • Quiet • inexpensive

  41. Laser Printers

  42. Thermal Printers • Use heat elements to produce images on heat sensitive paper • Produce very high quality but are expensive and require special supplies

  43. Plotters

  44. Voice-Output Devices

  45. Terminals

  46. Secondary Storage(外存) • Used as permanent storage for programs and data • Magnetic tape(磁带), magnetic disks(磁盘), and CD-ROMs • Magnetic tape is often used to backup data separately from the computer. And it is a sequential storage media. • Direct access storage device (DASD): allows a computer to read or write any one file or program independent of its position on the storage medium • Magnetic hard disk(硬盘) consists of rigid platters(硬盘片) that spin together on a common spindle • Initially, the common magnetic disk storage device was the removable floppy disk(软盘) • USB disk can store more data than floppy disk. Its size can be 128M~80GB.

  47. Magnetic Hard Disk 轴 磁道 扇区 盘片 Platters 读/写磁头 柱面

More Related