The Digital ComputerPage Contents (hide) The American Heritage Dictionary defines a computer as A device that computes, especially a programmable electronic machine that performs high-speed mathematical or logical operations or that assembles, stores, correlates, or otherwise processes information. Historical DevelopmentDevelopment on the devices that led to the modern definition of a computer began in the 1940s as part of the war effort. Early electronic computing devices, such as the ENIAC (Electronic Numerical Integrator and Computer), were programmed by connecting wires to various ports or plugs. There was no concept of stored instructions. To change the actions of the computer (i.e. reprogram the computer), it had to be rewired for the new task, which could be very tedious.[1] John W. Mauchly and J. Presper Eckert, the inventors of the ENIAC, proposed a design for a new device that could store the instructions to be executed instead of having to rewire the computer for each new task. They were not, however, able to publish their idea for the EDVAC (Electronic Discrete Variable Automatic Computer) due to the war and their involvement in the topic secret ENIAC project. The initial design for the EDVAC was published instead by John von Neumann (pronounced von noy-man), who was involved in the ENIAC project, but did not have the same restrictions.[2][3] The EDVAC was ultimately constructed and delivered to the U.S. military in late 1949. The completed computer contained an ultrasonic serial memory, which had a capacity equivalent to 5.5K bytes, and a magnetic tape reader-recorder. It also contained other units similar to those used in modern computers. These included a control unit, a computational unit to perform arithmetic operations, and a dispatcher unit that received instructions from the control and memory units and directed them to other units. Although the design of the EDVAC was the first proposed stored-program computer, the British completed construction on the actual first two stored-program computers based on the design published by von Neumann. The Manchester Baby was built at the University of Manchester in June 1948. It served as a testbed device that ultimately led to the Manchester Mark I, which was placed into regular service in April 1949. The EDSAC (Electronic delay storage automatic calculator) was constructed at the University of Cambridge Mathematical Laboratory in May 1949.[2]
The architecture described by von Neumann in 1945 (in his famous paper, First Draft of a Report on the EDVAC), which led to these early computers, is today known as the von Neumann architecture. All modern stored-program computers are based on this architecture. Components of a ComputerModern stored-program digital computers include at least three characteristics of the von Neumann architecture:
ProcessorTraditionally, we refer to the processor as the central processing unit or CPU for short. The term central was introduced early in the history of digital computers when most of the processing functions were centralized on a single component or unit. Modern systems can contain single processors with multiple cores or contain multiple processors with multiple cores. Thus, the term processor is more commonly used today to reflect this change in architecture, but the term CPU is still widely used. The processor contains the digital circuitry that executes the instructions of a program. The individual instructions perform simple operations, which typically include those for arithmetic, logic, and memory access. In later chapters, you will learn about many of the instructions used by the MIPS processor and see how some of them are implemented in the hardware. As indicated earlier, the processor is comprised of several common components as described below. The arithmetic-logic unit (ALU) performs all arithmetic, logic, and bit-wise operations, which comprise the bulk of the instructions contained in a computer program. Originally, processors could only carry out integer operations. Later, a separate component, known as a floating-point unit (FPU), was included for floating-point operations. Both of these units will be discussed in more detail in later chapters. The processor contains a small number of high-speed storage elements called registers, which are used to store temporary values. The registers are wired directly to the ALU and provide fast access as instructions are being executed. Modern processors also contain several special registers used in the execution of instructions. The instruction register (IR) holds the instruction currently being executed and the program counter (PC) register keeps track of the next instruction to be executed. The control unit coordinates the activities of the other units. It decodes the instructions and sends signals to direct other units in carrying out or executing the instruction. While it is easier to view the control unit as a single well-defined component, in modern computers, the digital circuitry of the controller is distributed throughout the processor and computer. Memory SystemThe program instructions and data are stored in the memory unit. A computer's memory is constructed using semiconductor storage cells, each of which is capable of storing a single bit of information. These storage cells are grouped into larger fixed sizes, typically consisting of eight bits, that are identified by a distinct numerical address. Access to the memory unit is managed through the system bus, which is a digital communications channel that connects the various components of a computer. Accessing data in memory is many times slower than the direct access to the registers on a processor, but memory is much cheaper to construct than are the registers. Thus, the amount of memory in a computer is far greater than the number of available registers. In modern computers, programs are typically stored on a secondary storage device such as a hard drive or some type of compact disk. To be executed, however, a program must reside in the computer's memory unit, which is commonly referred to as primary storage or the main memory. As the program is executed, the processor fetches the instructions, one at time from memory and carries out the appropriate action. We will explore the memory unit and secondary storage in later chapters. Input/Output SystemComputer programs typically follow a common process: receive or input data, process it, then output the results. The input/output system manages the various input/output (I/O) devices that are used to provide input to a program and to receive the output or results from the program. Today, there are a wide variety of I/O devices. Some provide input only, such as keyboards, mice, and joysticks; some only accept output from a program, such as video terminals and printers; while others provide input and accept output, such as disk drives and network adapters. In modern computers, there is a separate controller used to manage the I/O system, which frees up the main controller and processor to perform their main tasks. The Fetch-Execute CycleThe construction and implementation of a processor can be rather complex, but the actual operation of a processor is rather simple. During the entire time a processor is on (i.e. has electricity running through it), it performs a simple routine called the fetch-execute cycle, which consists of four steps:
When a program is executed, the machine code instructions are loaded into the computer's memory and the processor is directed to begin executing the first instruction. The first step is to fetch or read the instruction from memory. The fetched instruction is then decoded to determine what operation is to be performed and what data will be used. Next, the instruction is executed or carried out using the logic circuits of the processor. After the operation completes, the entire cycle repeats again with the next instruction. As you can see, the high-level view of the operation of a processor is rather simple. The actual details, however, are a bit more complex. In the first part of this book, you will learn to write simple programs in assembly language that are assembled into machine code and executed on a MIPS processor. Later in book, you will get an up close view of the internals of a processor and learn how the processor is constructed and how instructions are actually "executed." ExampleTo illustrate the fetch-execute cycle, suppose we have a simple program that evaluates the mathematical expression a = b * 4 + a which is done using two machine code instructions 00000000101000010000000000011000 00000000000110000001100000100001 When this program is executed, the first instruction is fetched from memory and then decoded by the control unit. The control unit will discover that this instruction is a multiply operation. The equivalent instruction in assembly is mul $v0, $a1, 4 Machine code instructions are very basic and perform a single operation. Here, the value in register After the next instruction is fetched and decoded, the control unit will discover that it is an add operation, the assembly equivalent of add $a0, $a0, $v0 When executed, the instruction will add the value in register Notes
|