Previous Table of Contents Next


A Programmer’s View

In 1970, S. S. Husson1 defined computer architecture as “the attributes of the (computer) system as seen by the programmer.” The architecture includes the set of instructions, data types, input/output (I/O) operations, and other features of the computer. We sometimes separate these and talk about instruction set architectures or I/O architectures. The total architecture includes everything a programmer needs to know to make a program work correctly.


1S. S. Husson, Microprogramming Principles and Practices, Prentice-Hall, 1970.

From a hardware perspective, a computer has five main components: input, output, memory, datapath, and control. The last two components are often combined and called the processor. The computer architecture defines which operations can be performed by these components. The processor gets instructions and data from the memory. Input hardware writes data to memory, and output hardware reads data from memory. The control hardware provides the signals to cause the operations of the datapath, memory, input, and output.

The processor is sometimes called the CPU, for central processing unit. The CPU name is being used less frequently these days because modern hardware technologies allow us to package entire processors on a single semiconductor chip. A processor on a single chip is usually called a microprocessor. Many people use the terms CPU, processor, and microprocessor interchangeably. We should, however, keep in mind that not all processors fit onto a single chip. A single processor may require a multi-chip implementation.

If two computers can execute the same instruction set, they are said to have the same instruction-set architecture. There can be, and usually are, multiple implementations of a given architecture. Thus, the Intel x862 architecture used in many PCs applies to a family of processor chips. These processor chips are realized in different technologies and they run at different speeds. The important point here is that the specific technology used to build the computer is not a part of the architecture.


2The Intel x86 CISC architecture is used in the family of single-chip processors that includes the 086, 186, 286, 386, 486, Pentium, Pentium II, and Pentium Pro.

Levels of Abstraction

Most modern computers have hardware and software structures that contain several levels. Lower-level details are hidden to offer simpler models at the higher levels. This principle of abstraction is the way hardware and software designers deal with the complexities of computers.

At the lowest level, the electronic circuit, a computer is very simple. The electronic circuit only understands two commands: on and off. The symbols we use for these commands are the numbers 1 and 0. We communicate with the machine at this level with a string of 1s and 0s. An instruction is a collection of these binary digits, or bits, that the computer understands. An instruction is, therefore, nothing more than a number in the base 2 number system, or a binary number. We call computers digital computers because the machine language uses numbers for both instructions and data.

In the early days, programmers communicated with computers using binary numbers. This was not very efficient, so a higher level of abstraction, called the assembly language, was invented. The assembly language is a symbolic form for the binary machine language of the computer. An assembler is a program that translates the symbolic form of the instruction into the binary form.

Assembly-level programming was still not a very natural notation for most programmers, so an even higher level of abstraction, called a high-level programming language, was created. There are hundreds of these languages today; a few of the better known ones are Basic, C, C++, Cobol, and RPG. The program that accepts one of these high-level programming languages and translates it into assembly-language statements is called a compiler.

Writing a program in a high-level language (HLL) illustrates how multiple levels of software abstraction work in a computer. The compiler handles the mapping between the HLL program and the assembly-language level. The assembler then translates the assembly-language instructions down to the binary machine level that the processor understands. Note that some compilers generate the binary machine language directly, eliminating the assembly level.

The compiler and assembler programs translate the HLL program into machine-language instructions before execution. This is a one-time operation, and unless the program is changed, repeating these steps is not necessary to rerun the program. Again, the reason for using these levels is to hide the details of the underlying binary machine language from the programmer to provide a simpler, more productive interface.

The same concept of multiple levels for software can also be true for hardware. Many processors, such as the Intel family, use an implementation technique called microprogramming. In a microprogrammed machine, an even lower-level instruction set is used to implement the binary machine language. Instead of using a compiler to map from the higher level to the lower level, microprogramming uses emulation. With emulation, machine instructions are fetched and executed one at a time using sequences of the lower-level instructions. No separate compile step is required to transform the machine instructions into a form acceptable to the microprogram.

Emulation is similar to a software technique known as interpretation. Here, a program, the interpreter, takes one instruction at a time and executes a sequence of equivalent lower-level instructions. Some of the newest HLLs used for network computing, such as Java, are designed to be easy to interpret. Most computer command languages are also interpretively executed. Type “dir” on the DOS screen of a PC and you will see a listing of the contents in a directory on your PC. After you press the Enter key, a command interpreter in DOS reads the command you typed and executes the sequence of instructions in the computer needed to carry out your command. Most operating systems have such a command interpreter. In a microprogrammed machine, special hardware usually has been added to help the interpretation process. The microprogram is called an emulator to identify this hardware-assisted form of interpretation.


Previous Table of Contents Next

Copyright © NEWS/400 Books