Tuesday, May 3, 2011

SUMMARY

Modern computers implement the von Neumann architecture, or stored program computer design. Program
instructions and data are both stored in main memory. The components of the computer design are the CPU
(including the control unit and the ALU), memory, and input/output.
Computers operate in base-2 arithmetic. Any number base can be used for computation and, just as humans
find 10 fingers a convenient basis for computation, machine builders find 2-state (on–off) devices easy to build and
convenient for computation. We discussed the simple math facts for binary math, and showed how subtraction is
accomplished using 2’s-complement addition. We also discussed the concept of the computer word, and the
implications of computer word sizes of different numbers of bits.
Data are encoded in different ways, depending on the type of data. We described integer, floating-point and
character encodings. The program interprets the bit pattern in a computer word depending on what it expects to
find in that memory location. The same bit pattern can be interpreted in different ways when the program
expects one data type or another. The programmer is responsible for insuring that the program correctly
accesses its data.
The CPU consists of two parts. The control unit is responsible for implementing the steady cycle of
retrieving the next instruction, decoding the bit pattern in the instruction word, and executing the instruction

The arithmetic and logic unit (ALU) is responsible for performing mathematical, logical, and comparison
functions.
The instruction set of a computer is the list of primitive operations that the computer hardware is wired to
perform. Modern computers have between 50 and 200 machine instructions, and instructions fall into the categories
of data movement, arithmetic operations, logical operations, control transfer, I/O, and comparisons. Most
programmers today write in higher-level languages, and so are isolated from direct experience of the machine
instruction set, but at the hardware level, the machine instruction set defines the capability of the computer.
Main memory provides random access to data and instructions. Today all manufacturers measure memory
with a count of 8-bit bytes. Most machines, regardless of 16-bit, 32-bit, or 64-bit word size, also offer byte
addressability.
Since access to memory takes longer than access to registers on the CPU itself, modern designs incorporate
cache memory near the CPU to provide a copy of the contents of a section of main memory in order to obviate
the need to read from main memory so frequently. Cache memory entails complexity to manage cache
coherency, but it typically results in speedup of average memory access time by 50 percent.
Input and output functions today are based on I/O controllers, which are small special-purpose computers
built to control the details of the I/O device, and provide a local memory buffer for the information being
transferred in or out. Computers today use an interrupt system to allow the CPU to process other work while
I/O occurs under the supervision of the I/O controller. When the transfer is complete, the I/O controller notifies
the CPU by generating an interrupt.
A further improvement in I/O efficiency is direct memory access (DMA). A DMA controller is another
special-purpose computer within the computer, and it shares access to main memory with the CPU. With
DMA, the CPU does not even get involved in moving the data into or out of main memory. Once the CPU tells
the DMA controller where the data reside and how much data to transfer, the DMA controller takes care of the
entire task, and interrupts only when the entire task is complete.

No comments:

Post a Comment