Lecture 1
Microprocessor
Introduction
Special-purpose computers control various functions in automobiles or appliances, control manufacturing processes in industry, provide games for entertainment, and are used in navigation systems such as GPS (Global Positioning System), to name a few areas. However, the most familiar type of computer is the general-purpose computer that can be programmed to do many different types of things.
1- The Basic Computer
All computers consist of basic functional blocks that include a central processing unit (CPU), memory, and input/output ports. These functional blocks are connected together with three internal buses, as shown in the block diagram of Figure 1. The three buses are the data bus, the address bus, and the control bus. Input and output devices are connected through the input/output ports. A port is a physical interface on a computer through which data are passed to and from peripherals.
Figure 1, Basic computer block diagram.
¬
Instructions and data are stored in memory in specific locations determined by the program, a list of instructions designed to solve a specific problem. Each location has a unique address associated with it. Instructions are obtained by the CPU by placing an address on the address bus. Instructions are transferred via the data bus as they are requested by the CPU. The CPU executes the instructions sequentially; frequently, the instructions modify data stored in memory or obtained from an input device. Processed data may be stored back in memory or sent to an output device via the data bus. Signals on the control bus are generated by the CPU to coordinate all of these operations.
1.1- Central Processing Unit (CPU)
The CPU is the "brain" of the computer; it oversees everything that the computer does. The CPU is a microprocessor with associated circuits that control the running of the computer software programs. Basically, the CPU obtains (fetches) each program instruction from memory and carries out (executes) the instruction.
After completing one instruction, the CPU moves on to the next one and in most cases can operate on more than one instruction at the same time. This "fetch and execute" process is repeated until all of the instructions in a specific program have been executed. For example, an application program may require the sum of a series of numbers. The instructions to add the numbers are stored in the form of binary codes that direct the CPU to fetch a series of numbers from memory, add them, and store the sum back in memory.
¬
1.2- Memories and Storage
Several types of memories are used in a typical computer. The RAM (random-access memory) stores binary data and programs temporarily during processing. Data are numbers and other information, and programs are lists of instructions. Data can be written into and read out of a RAM at any time. The RAM is volatile, meaning that the information is lost if power is turned off or fails. Therefore, any data or program that needs to be saved should be moved to nonvolatile memory (such as a CD or hard disk) before power is removed.
The ROM (read-only memory) stores a permanent system program called the BIOS (Basic Input / Output System) and certain locations of system programs in memory. The ROM is nonvolatile, which means it retains what is stored, even when the power is off. As the name implies, the programs and data in ROM cannot be altered. Sometimes it is referred to as "firmware" because it is permanent software for a given system.
The BIOS is the lowest level of the computer's operating system. It contains instructions that tell the CPU what to do when power is first applied; the first instruction executed is in the BIOS. It controls the computer's basic start-up functions that include a self-test and a disk self-loader to bring up the rest of the operating system. In addition, the BIOS stores locations of system programs that handle certain requests from peripherals called interrupts, which cause the current processing to be temporarily stopped.
The cache memory is a small RAM that is used to store a limited amount of frequently used data that can be accessed much faster than the main RAM. The cache stores "close at hand" information that will be used again instead of having to retrieve it from farther away in the main memory. Most microprocessors have internal cache memory called level-1, or simply L1. External cache memory is in a separate memory chip and is referred to as level-2, or L2.
The hard disk is the major storage medium in a computer because it can store large amounts of data and is nonvolatile. The high-level operating systems as well as applications software and data files are all stored on the hard disk.
Removable storage is part of most computer systems. The most common types of removable storage media are the CDs, floppy disks, and Zip disks (magnetic storage media). Floppy disks have limited storage capability of about 1.4 MB (megabyte). CDs are available as CD-ROMs (Compact Disk-Read-Only Memory) and as CD-RWs (Rewritable) and can store huge amounts of data (typically 650 MB). Zip drives typically store 250 MB.
1.3- Input / Output Ports
Generally, the computer sends data to a peripheral device through an output port and receives information through an input port. Ports can be configured in software to be either an input or output port. The keyboard, mouse, video monitor, printer, and other peripherals communicate to the CPU through individual ports. Ports are generally classified as either serial ports, with a single data line, or parallel ports, with multiple data lines.
1.4- Buses
¬Peripherals are connected to the computer ports with standard interface buses. A bus can be thought of as a highway for digital signals that consists of a set of physical connections, as well as electrical specifications for the signals. Examples of serial buses are FireWire and USB (Universal Serial Bus). The most common parallel bus is simply called the parallel bus, which Connects to a port commonly referred to as the printer port (although this port can be used by other peripherals.). Another example of a parallel bus, for connecting lab instruments to a computer, is called the General Purpose Interface Bus (GPIB).
The three basic types of internal buses that interconnect the CPU with memory and storage and with input and output ports are the address bus, data bus, and control bus. These buses are usually lumped into what is called the local bus. The address bus is used by the CPU to specify memory locations or addresses and to select ports. The data bus is used to transfer program instructions and data between the CPU, memories, and ports. The control bus is used for transferring control signals to and from the CPU.
1.5- Computer Software
In addition to the hardware, another major aspect of a computer is the software. The soft-ware makes the hardware perform. The two major categories of software used in computers are system software and applications software.
System Software The system software is called the operating system of a computer and allows the user to interface with the computer. The most common operating systems used in desktop and laptop computers are Windows, MacOS, and UNIX. Many other operating systems are used in special-purpose computers and in mainframe computers.
System software performs two basic functions. It manages all the hardware and software in a computer. For example, the operating system manages and allots space on the hard disk. It also provides a consistent interface between applications software and hardware. This allows an applications program to work on various computers that may differ in hard-ware details.
The operating system on your computer allows you to have several programs running at the same time. This is called multitasking. For example, you can be using the word processor while downloading something from the Internet and printing an e-mail message.
Applications Software You use applications software to accomplish a specific job or task. Table 1 lists several types of applications software.
Table 1, Applications software.
Sequence of Operation When you first turn on your computer, this is what happens:
1. ¬BIOS from ROM is loaded into RAM and a self-test is performed to check all major components and memory. Also, the BIOS provides information about storage, boot sequence, and the like.
2. The operating system (such as Windows) on the hard disk is loaded into RAM.
3. Application programs (such as Microsoft Word) are stored on the hard disk. When you select one, it is loaded into RAM. Sometimes, only portions are loaded as needed.
4. Files required by the application are loaded from the hard disk into RAM.
5. When a file is saved and the application is closed, the file is written back to the hard disk and both the application and the file are removed from RAM.
1.6- ¬ The Computer System
The block diagram in Figure 2 shows the main elements in a typical computer system and how they are interconnected. For a computer to accomplish a given task, it must communicate with the "outside world" by interfacing with people, sensing devices, or devices to be controlled in some way. To do this, there is a keyboard for data entry, a mouse, a video monitor, a printer, a modem, and a CD drive in most basic systems. These are called peripherals.
Figure 2, Basic block diagram of a typical computer system including common
peripherals.
Refreshing Questions And Its Answers
Q1.
A1.
Q2.
A2.
What are the major elements or blocks in a computer?
Basic elements of a computer are CPU, memories, input/output ports, buses.
What is the difference between RAM and ROM?
RAM is random access memory (volatile), and ROM is read-only memory (nonvolatile).
Q3. What are peripherals?
A3. Peripherals are devices external to the computer.
Q4. What is the difference between computer hardware and computer software?
A4. Hard