Chapter 4 System Unit & Input/ Output Devices & Secondary Storage Objectives: In this chapter we will discuss the following topics: The major system unit components. How a computer uses binary codes to represent data. Types of memory. Four principal types of bus lines. Four types of ports. Latest Input /Output Devices Latest Secondary Storage Learning outcomes: At the end of the chapter, students will be able to: 1. Understand and explain the major system unit components. 2. Explain how a computer uses binary codes to represent data. 3. Describe the different types of memory. 4. Identify and describe the four principal types of bus lines. 5. Identify and describe the various types of ports. 6. Identify and describe the most common Input /Output Devices 7. Understand the importance of Secondary Storage 4.0 Introduction A computer is an electronic device, operating under the control of instructions stored in its own memory, which can accept data (input), process the data according to specified rules (process), produce results (output), and store and the results (storage) for future use as shown in Figure 4.0. Input Process Output Figure 4.0: Concept of Computer Processing 1 Storage Generally, computer is made of collection of hardware components that function together as a system as shown in Figure 4.1. It has six primary components, namely input devices, the processor (control unit and arithmetic/logic unit), memory, output devices, storage devices, and communications devices. The processor, memory, and storage devices are housed in a box case called the system unit. Figure 4.1: A Computer Unit 4.1 The major system unit components. All general-purpose computers require the following hardware components: 1. Memory: Enables a computer to store, at least temporarily, data and programs. 2. Storage device: Allows a computer to permanently retain large amounts of data. Common storage devices include disk drives and tape drives. 3. Input device: Usually a keyboard and mouse, the input device is the conduit through which data and instructions enter a computer. 4. Output device: A display screen, printer, or other device that lets you see what the computer has accomplished. 2 5. Central processing unit (CPU): The heart of the computer, this is the component that actually executes instructions. Figure 4.2: A System unit As shown in Figure 4.2, System unit is made of the following parts: Motherboard - The motherboard is the main circuit board of a microcomputer. It is also known as the mainboard or system board. CPU - The CPU is the central electronic chip that determines the processing power of the computer. Memory - Memory is the part of the computer that temporarily stores applications, documents, and stem operating information. Bus - A bus is an electronic line that allows 1s and 0s to move from one place to another. Expansion Slots - Expansions slots appear on the motherboard. They are sockets into which adapters are connected. 3 Ports and Connectors - A port is a connector located on the motherboard or on a separate adapter. Bays - A bay is a space inside the computer case where a hard drive, floppy drive or CD-ROM drive sits Power Supply - A power supply changes normal household electricity into electricity that a computer can use. Sound Components - A sound card lets a computer play and record high quality sound. Central Processing Unit (CPU) Following are the functions of CUP: Does all of the work for the computer Does all of the mathematics, mainly addition Does all the logical comparisons of values Directs the flow of data in a computer Controls the operation of the parts of the computer Today, all CPUs are microprocessors. A microprocessor is a complete computer on a silicon chip. It does all of the functions of a computer such as stores data and instructions waiting to be used, follows changeable instructions, does input, processing, and output, CPUs have three basic parts: 4 a) The Arithmetic Logic Unit (ALU) - does all of the mathematics in a computer and all of the logic comparisons of values. Some common logic comparison symbols are: = equal to < less than greater than <= less than or equal to >= greater than or equal to not equal b) The Control Unit directs the flow of information into the CPU and/or memory or storage, controls which instructions the CPU will do next as shown below: c) Registers - Used to store data and instructions inside the processor and size of the registers can affect the speed and performance of the processor. Speed of CPUs - The speed of CPUs is measured in hertzs. A hertz is on cycle per second. Need to measure time to determine cycles per second. All computers have a clock built into them for timing the cycles. The clock is usually located in a small metal box on the motherboard. Today, many CPUs can complete over six (6) instructions per second. Speeds of modern CPUs - Most computers have a CPU that can do more than 400 MHz. MHz stands for megahertzs. A MHz is 1,000,000 cycles per second. Computers will soon be at speeds of over a gigahertz, 1,000,000,000 Hertzs. 4.2 How a computer uses binary codes to represent data. The computer stores information as a string of zeros (0) and ones (1). The standard string length is eight 0's or 1's in a row. This standard length is called a byte. A byte equals one character A character is a letter, number, or symbol - it is about any thing that can be typed on a keyboard There are 256 standard characters used by almost all computers 5 Information size measurements Kilobyte (KB) o One kilobyte equals about 1024 bytes o 1KB is about 140 words, about a half page of typed double-spaced text (words only) Megabyte (MB) o One megabyte equals about 1000 KB o One megabyte equals about 1,000,000 bytes o One megabyte equals about 500 pages of text, or one large book Gigabyte (GB) o One gigabyte equals about 1000 MB o One gigabyte equals about 1,000,000 KB o One gigabyte equals about 1,000,000,000 bytes o One gigabyte equals over 1,000 books of text 4.3 Types of memory Primary memory can be used directly by the CPU. Primary memory is also called primary storage. It consists of silicon chips; usually either VLS or VLSI technology is used to create the chips. Two forms of Primary Memory are: Read Only Memory (ROM) Random Access Memory (RAM) Read Only Memory (ROM) Stores instructions that are used by the CPU 6 Tells the CPU how to be the kind of computer it is, for example a Windows, Macintosh, or Play Station computers. Tells the CPU how to work with the different parts of the computer ROM can also hold programs that are directly accessed by the CPU. One such program is the self-test when the computer is first turned on. The self-test tests to seem if all the parts on the main circuit board (mother board) are working correctly. The instructions in ROM can not usually be changed The instructions are built into the electronic circuits of the chips These instructions in ROM are called firmware To change the instructions in ROM you need to usually change the chips or do some other special process that is normally not available to an average user. The instructions in ROM are nonvolatile. They stay in ROM even when the computer is turned off. Random Access Memory (RAM) Access to information is random access. Random access means that any piece of information in ROM can be accessed at any given time without access other information first. It is a lot like the tracks on a music CD. You can access any track at any time and in any order. The other kind of access is sequential access. You must access the information in the order that they are located. This is a lot like a music tape. You must play the songs in order, or you have to fast forward past songs to get to the one you want. Store data and instructions that are used by the CPU to perform some task. These instructions are usually loaded into RAM from a secondary storage device. RAM is also used to store instructions that tell the CPU how to work with its parts. These instructions are usually called drivers. 7 The instructions in RAM are constantly changing, depending on the needs of the CPU. The instructions in RAM are volatile. When the computer is turned off the information in RAM disappears. The information in RAM needs to be saved to secondary storage before the computer is turned off. Access to information is random access. Registers - Used to store data and instructions inside the processor and size of the registers can affect the speed and performance of the processor. Cache memory Cache (pronounced cash) memory is extremely fast memory that is built into a computer’s central processing unit (CPU), or located next to it on a separate chip. The CPU uses cache memory to store instructions that are repeatedly required to run programs, improving overall system speed. The advantage of cache memory is that the CPU does not have to use the motherboard’s system bus for data transfer. Whenever data must be passed through the system bus, the data transfer speed slows to the motherboard’s capability. The CPU can process data much faster by avoiding the bottleneck created by the system bus. Cache that is built into the CPU is faster than separate cache, running at the speed of the microprocessor itself. However, separate cache is still roughly twice as fast as Random Access Memory (RAM). Cache is more expensive than RAM, but it is well worth getting a CPU and motherboard with built-in cache in order to maximize system 4.4 Four principal types of bus lines. A bus is a communication pathway connecting two or more devices. A key characteristic of a bus is that it is a shared transmission medium. Multiple devices connect to the bus, and a signal transmitted by any one device is available for the same time period, their signals will overlap and become garbled. Thus, only one device at a time can successfully transmit. In many cases, a bus actually consists of multiple communication pathways, or lines. Each line is capable of 8 transmitting signals representing binary 1 and binary0. Over time, a sequence of binary digits can be transmitted across a single line. Taken together, several lines of a bus can be used to transmit binary digits simultaneously (in parallel). For example, an 8-bit unit of data can be transmitted over eight bus lines. Computer systems contain a number of different buses that provide pathways between components at various levels of the computer system hierarchy. A bus that connects major computer components (CPU, memory, I/O) is called a system bus. The more common computer interconnection structures are based on the use of one more system buses. Bus Structure A system bus consists, typically, of form 50 to 100 separate lines. Each line is assigned a particular meaning or function. Although there are many different bus designs, on any bus the lines can be classified into three functional groups: data, address, and control lines. In addition, there may be power distribution lines that supply power to the attached modules. The data lines provide a path for moving data between system modules. These lines collectively are called the data bus. The data bus typically consists of 8,16, or 32 separate lines, the number of lines being referred to as the width of the data bus. Since each line can carry only 1 bit at a time, the number of lines determines how many bits can be transferred at a time. The width of the data bus is a key factor in determining overall system performance. For example, if the data bus is 8 bits wide, and each instruction is 16 bits long, then the CPU must access the memory module twice during each instruction cycle. The address lines are used to designate the source of destination of the data on the data bus. For example, if the CPU wishes to read a word (8,16, or 32 bits) of data from memory, it puts the address of the desired word on the address lines. Clearly, the width of the address bus determines the maximum possible memory capacity of the system. Furthermore, the address lines are generally also used to address I/O ports. Typically, the higher – order bits are used to select a particular module on the bus, and the lower – order bits select a memory location or I/O port within the module. For example, on an 8-bit bus, address 01111111 and below might reference locations in a memory module (module 0) with 128 words of memory, and address 10000000 and above refer to devices attached to an 9 I/O module (module 1.) The control lines are used to control the access to and the use of the data and address lines. Since the data and address lines are shared by all components, there must be a means of controlling their use. Control signals transmit both command and timing information between system modules. Timing signals indicate the validity of data and address information. Command signals specify operations to be performed. Typical control lines include. · Memory Write: Causes data on the bus to be written into the addressed location. · Memory Read: Causes data from the addressed location to be placed on the bus. · I/O Write: Causes data on the bus to be output to the addressed I/O port · I/O Read: Causes data from the addressed I/O port to placed on the bus. · Transfer ACK: Indicates that data have been accepted from or placed on the bus. · Bus Request: Indicates that a module needs to gain control of the bus. · Bus Grant: Indicates that a requesting module has been granted control of the bus. · Interrupt Request: Indicates that an interrupt is pending. · Interrupt ACK: Acknowledge that the pending interrupt has been recognized. · Clock: Used to synchronize operations. · Reset: Initializes all modules The operation of the bus is as described in Figure 4.4. If one module wishes to send data to another, it must do two things: 1. Obtain the use of the bus, and 2. Transfer data via the bus. If one module wishes to request data from another module, it must do two things: 1. Obtain the use of the bus, and 2. Transfer a request to the other module over the appropriate control and address lines. It must then wait for that second module to send the data. 10 Figure 4.4: Instruction cycle state diagram 4.5 Four types of ports. There are lots of external devices that you can connect to your computer. All external devices connect to the computer’s system unit via cables and ports (where a "port" is the slot into which you plug a cable). Unless you’re using a portable computer, you probably have several external devices attached to your computer already, including a mouse, keyboard, monitor, microphone, and speakers, as in Figure 4.1. Whatever external devices you have, they're all connected to the system unit (where the actual "computing" takes place) via cables. Each cable plugs into a specific port on the system unit. The ports are usually on the back of the system unit. But they can be on front or side as well. Everything has a name, even (believe it or not) those little plugs on the back of your computer. Figure 4.5 shows examples of some ports. But your computer's ports won't necessarily be the same. USB and FireWire Ports Of all the ports on a computer, USB and IEEE 1394 (a.k.a. FireWire) get all the hype. There are several reasons for this: Both are new technologies, both provide "hot-pluggable" connectivity, both provide very high-speed data transfers. The hot-pluggable part means you can just plug in some device, like a digital camera or video camera, and start using it right away. (The older 11 ports would all require you to shut down the computer, plug in the device, restart the computer, and then install the device.). In short, both USB and FireWire are a lot more convenient than the older ports that preceded them. So what are the differences? In a nutshell, USB (Universal Serial Bus) was created as a general-purpose high-speed connection to the computer. Its high speed makes it ideal for connecting digital cameras to the computer. But it's good for lots of other devices too, like a Web cam, broadband modem, whatever. Figure 4.5: Examples of ports IEEE (Institute of Electrical and Electronics Engineers) 1394, also known commercially as FireWire, is a faster connection than USB, but not as widely used. In consumer electronics, it's 12 mostly digital video cameras that connect through a FireWire port. There are also some highspeed external disk drives and networking components that can use that port. Because FireWire devices are relatively rare, FireWire ports are also rare. Just about any computer you buy will have at least two USB ports. But it's unlikely you'd get a FireWire port if you didn't specifically order it with your PC. (Of course, you can always add a FireWire port at any time. No problem there). As though to confuse matters even more, the plugs for USB and FireWire look very much alike. Each port type, however, has its own little logo, as shown in Figure 4.5.1. As you can see just by looking at the plugs, the plug for USB will not go into a FireWire port, or vice-versa. Figure 4.5.1: USB and FireWire ports (computer side of cable) Note that Figure 4.5.1 shows how USB and FireWire ports as they look on a computer. On the device you're connecting (for example), the plug might be an entirely different size and shape. Check the manual that came with your device if you can't find the right plug. 4.6 Latest Input /Output Devices Wireless Desktop Mouse The latest wireless desktop mouse is claimed to be 20 times more sensitive than a typical optical mice, for greater accuracy and improved use on shiny surfaces – ideal for gamers, graphic design or those who simply demand maximum accuracy. It is rechargeable via the USB charge cable. Wireless technology provides a clean, uncluttered workspace free from cables. We can just plug the wireless receiver and charge cable into the extension port, and there is no 13 need to reach around your PC. It can scroll-up, scroll-down, Alt-Tab (application window switch) and Internet navigation “forward” and “back” buttons provide simple and productive short cuts for Windows use. Figure 4.6.1 shows a wireless mouse. Figure 4.6.1: A Wireless Mouse Wireless Keyboard A wireless keyboard can do more anytime, anywhere. It works with many popular PDAs, PDA/Cellular and Smart Phones. It is full-size, wireless infrared (IR) keyboard- Folds out in seconds, adjusts to ideal viewing angle, and then folds to fit in your pocket or purse. It feels like a standard keyboard. See Figure 4.6.2 Figure 4.6.2: A Wireless Keyboard Digital Scanner: A digital scanner has become a very popular input device for a PC. When a scanner is attached to the computer, the scanner can read information of color or black and white picture. The scanner sends information to the computer, which we place on the glass surface of the scanner. The computer can store this information forever, or can send it across the world by using Internet in few minutes. Microphone: By using microphone, we can record our voice in a computer. This device is very easy to use and we can record our voice with music in the computer through this device. 14 Digital Camera: Digital camera is used to draw photos. By using this input device images or photos are sent directly to PC instead of storing on a usual camera film. 4.7 Latest Secondary Storage Secondary storage, being nonvolatile, retains data even when the computer is turned off. Secondary storage is the nearest thing to permanent storage, but it will eventually wear out or be discarded due to outdated technology. It is also infinite. When one storage device runs out of space, you can replace it with another, which differs from RAM, which has a finite size. A variety of secondary storage devices are available, and they include floppy diskettes, tape storage systems, magnetic disk drive systems, optical data storage products, and removable cartridge hard drives. A well-known manufacturer of secondary storage devices is Iomega, which produces the popular Zip drive. Another Iomega secondary storage device, the Jaz drive, is no longer being produced, although Iomega continues to offer Jaz 1GB and 2GB disks and accessories. For large storage needs, Iomega offers Peerless, a removable storage product that can hold 10GB and 20GB disks. These products provide high-capacity data storage: Zip disks hold 250MB and Jaz disks hold as much as 2GB. Another secondary storage manufacturer is StorageTek, which produces drives and cartridges for secondary storage. One of the more popular secondary storage devices is the optical disc. With optical discs, a laser beam reads and writes data to a disc. Optical discs do not spin and they do not need to move read/write heads or access arms because the laser beam moves electronically. The capacity of optical disc storage is far greater than other types of storage devices. The most frequently used type of this secondary storage device is a CD-ROM. Another example of secondary storage is a magnetic tape. The tape is coated with magnetic material on which data is stored. Magnetic tapes are usually used for backup purposes. They are slower than a hard drive, but they are an inexpensive solution for data storage. Data is encoded from your computer onto a magnetically coated strip of plastic (tape). Tape drives are 15 slower because tapes are a sequential-access media. This means that to get to any specific point on the tape, the drive must go through all of the preceding points; this is why tapes are only used for long-term storage. Secondary storage devices provide two types of data access: sequential or direct. With sequential storage, the computer searches for and retrieves data in the same order it was stored. Magnetic tapes are examples of a sequential secondary storage device because they store date sequentially. Direct-access storage devices, which are also called random access, go directly to the storage location for the requested data without reading through other data in sequence. Summary: A computer is an electronic device, operating under the control of instructions stored in its own memory, which can accept data (input), process the data according to specified rules (process), produce results (output), and store and the results (storage) for future use. All general-purpose computers require the following hardware components: memory, storage device, input device, output device, and the central processing unit (CPU). The computer stores information as a string of zeros (0) and ones (1). There are four types of memory: primary memory, Read Only Memory (ROM ), Random Access Memory (RAM), Registers and Cache memory. Primary memory is also called primary storage, consists of silicon chips and can be used directly by the CPU. A bus is a communication pathway connecting two or more devices. All external devices connect to the computer’s system unit via cables and ports. Latest Input /Output Devices include the Wireless Desktop Mouse, Wireless Keyboard, Digital Scanner, Microphone and the Digital Camera. Secondary Storage includes floppy diskettes, tape storage systems, magnetic disk drive systems, optical data storage products, and removable cartridge hard drives. 16 Exercises. Fill in the blanks: 1. ……… The heart of the computer, this is the component that actually executes instructions. 2. The capacity of ……. storage is far greater than other types of storage devices. 3. ……… was created as a general-purpose high-speed connection to the computer. 4. All external devices connect to the computer’s system unit via cables and ……. 5. The ……… are used to control the access to and the use of the data and address lines. 6. The …… typically consists of 8,16, or 32 separate lines, the number of lines being referred to as the width of the data bus. 7. The advantage of ……… is that the CPU does not have to use the motherboard’s system bus for data transfer. 8. ……. is also used to store instructions that tell the CPU how to work with its parts. These instructions are usually called drivers. 9. …….. can also hold programs that are directly accessed by the CPU. 10. One ……… equals about 1000 MB Answers: 1. Central processing unit (CPU): 2. optical disc 3. USB (Universal Serial Bus) 4. ports. 5. control lines 6. data bus 7. cache memory 8. RAM 9. ROM 10. gigabyte 17