Module 2: Computer System P.1 CUHK FAA Thomas Cheung Secondary School S.6 AS Level Computer Applications Module 2: Computer System Name : _______________________ Class : _____ Class No. : ___ Date : _____________ Section 1 : The System Unit of a Computer System 1. Introduction 2. A computer system consists of both hardware and software. The system unit of a desktop personal computer exists motherboard(底板), interface cards(介 面卡) and storage devices. The motherboard in the system unit includes many different types of chips. A chip or integrated circuit (IC)合成電路 is a small piece of semi-conducting material that contain millions of transistors. They are linked by conducting wires which are metallic paths printed on the motherboard. Other devices, like keyboards, monitors and printers, are connected to the ports or interface cards of the system unit through cables. Basic Computer System 2.1 A basic computer system consists of the following hardware components: Item Motherboard : Peripheral devices (周邊設備): Components Central processing unit (CPU) Main memory Input devices Output devices Secondary storage Communication devices 2.2 Interrelationship between various hardware components Central Processing Unit (CPU) Input devices Main Memory Secondary storage 3. Output devices Communication devices Central Processing Unit (CPU) The CPU interprets and carries out the basic instructions that operate a computer. Central Processing Unit (CPU) Control Unit Input device Secondary storage Main memory ALU Control signal Output devices Inter-connection n Communication devices Prepared by H.L.Ng Module 2: Computer System P.2 3.1 Components of the CPU The CPU consists of 2 major components: 1. Control Unit (CU) Controls the overall operations of the computer. Interprets an instructs from a program and set off appropriate action. Directs and controls the operations of the peripheral. 2. Arithmetic and Logic Unit (ALU) Carries out computational jobs, including calculation, comparison and decision. 3.2 Microprocessor The CPU in a personal computer is the microprocessor. Question : 1. Clock speed: Higher is better? 3.3 Speed of CPU The capability of a CPU is indicated by the clock speed, which is the number of clock cycle. Because an instruction requires a fixed number of clock cycles to complete, the higher is the clock speed, the faster is the CPU. Clock speed is measured in hertz(Hz). 1 Mega = 1 M = 106 1 Gaga = 1 G = 109 Section 2 : Main Memory 1. Introduction Besides the microprocessor, main memory (or memory) is another important component found on the motherboard. The main memory stores data and instructions(指令).There are 3 types memory: Random Access Memory (RAM), Read Only Memory (ROM) and (CMOS). 2. Types of memory There are 3 types of memory: RAM, ROM and CMOS *Volatile RAM Main memory *Non-volatile ROM CMOS RAM, ROM and CMOS *Memory is classified into volatile and non-volatile. Volatile : The contents of the volatile memory will be lost when the computer power is turned off. Non-volatile : The contents of the non-volatile memory will retain after the power is turned off. 2.1 Random Access Memory (RAM) RAM stands for Random Access Memory. A location to hold the necessary instructions and data as long as the computer is running. It is volatile. Data stored in the RAM are lost when the power is turned off. Therefore, data needed for future use should be saved. Saving a file means copying data from RAM to the non-volatile secondary storage. Loading meaning copying data from secondary storage to RAM. Prepared by H.L.Ng Module 2: Computer System P.3 2.2 Read Only Memory (ROM) ROM stands for Read Only Memory. Store the sequence of instructions that the computer follows in the booting process(when the computer is power on or reset). This particular sequence of instructions is called the basic input/output system(BIOS), which is part of the system programs. The contents in ROM can be read but they cannot be changed. ROM is also called firmware, which means that the software (program) is stored in a chip instead of disc. 2.3 Complementary Metal-Oxide Semiconductor memory (CMOS) 3. Another type of memory chip on the motherboard is Complementary Metal-Oxide Semiconductor memory (CMOS). Stores the configuration information about a computer. Includes information like the capacity of the hard disk; the types of existing ports, keyboard and monitor; the current time and date. However, CMOS doesn’t store program. Unlike ROM, the computer can change the information in CMOS. Unlike RAM, CMOS is non-volatile. The contents in CMOS can be retained after the computer is power off. Comparison between RAM, ROM and CMOS RAM Permanence Flexibility Type of information Size Upgradeable 4. ROM CMOS Non-volatile Non-volatile Read only Read and write System program and data Configuration data Volatile Read and write Data and instructions being processed Largest small Yes; memory size can be no increased Smallest no Memory Size 1 Byte = 8 bits 1 KiloByte = 1 KB = 1024 Bytes 1 MegaByte = 1 MB = 1024 x 1024 Bytes = 106 Bytes 1 GigaByte = 1 GB = 1024 x 1024 x 1024 Bytes = 109 Bytes Term KiloByte MegaByte GigaByte Abbreviation KB MB GB Exact memory size (bytes) 1024 1024 x 1024 (106) 1024 x 1024 x 1024 (109) Question : 1. 128 KB = _______________ Bytes 2. 5 MB = _________ KB 3. 3 GB = __________ MB 5. Access of Data in Memory The main memory can be thought of as a series of locations each of length one byte. Each location has a unique address, counting from zero upward. The address is called memory address. For example, for a computer with a memory size of 1 K, the memory address ranges from 0 to 1,023. Since the size of address is limited, the memory size is also limited. The largest memory size depends on the architecture of a computer. Memory size = 2 no. of address bus For example, for a computer with 32 bits address bus, the memory size = 2 32 =__________ Prepared by H.L.Ng Module 2: Computer System P.4 6. Buses in a computer 6.1 What is a bus? The CPU gets data from and stores data onto the memory. A channel links between the CPU and the memory. Similar channels exist between the memory and the peripheral devices. Each channel, called a bus, allows a serried of electronic bits to transmit at the same time. A bus consists of 3 parts : address bus, data bus and control bus. Address bus carries address of memory location. Data bus carries data contents. Control bus carries control signal. 6.2 Types of bus There ate 2 basic types of bus : system bus (or processor bus) and peripheral bus. System bus transfer data between memory and CPU. Peripheral bus transfers data between memory and peripherals. CPU System bus Peripheral device (Keyboard) Peripheral device (Monitor) Main memory Peripheral device (Hard disk) Peripheral buses Examples of peripheral buses in a IBM-compatible PC are shown below: Bus Full Name ISA bus Industry Standard Architecture bus PCI bus Peripheral Component Interconnect bus SCSI bus Small Computer System Interface bus USB Universal Serial Bus AGP bus Accelerated Graphic Port bus CPU System bus Peripheral bu Hard disk Main memory Keyboard, mouse USB device (web cam) AGP video card 6.3 Ports and Interface Cards A port is build on the motherboard and forms the interface between peripheral devices and the memory or CPU. An interface card is a circuit board that connects a peripheral device to the motherboard or a computer. Interface slots, build on the motherboard, allow interface cards to be inserted. Prepared by H.L.Ng Module 2: Computer System P.5 Port Name Peripheral devices Keyboard and mouse port (PS2 or serial port) Keyboard, mouse Serial port Mouse, graphic tablet Parallel port Printer SCSI port Fast devices, e.g. hard disk USB port Printer, scanner 1394 port DV camera Common ports and their corresponding peripheral devices Card Name Network Interface Card (NIC) AGP video card Sound Card Modem Card Peripheral devices Switch or hubs of LAN or Internet Visual Display Unit (VDU) Microphone, speaker Telephone network Interface cards corresponding to their peripheral devices Prepared by H.L.Ng