Computer Organization

A computer can be viewed at four levels of abstraction:

Each level can be viewed as an abstract machine consisting of:

1. An instruction set (IS)

2. A data set (DS)

3. A processor unit (PU)

4. A memory unit (MU)

5. An optional user interface (UI)

IS consists of all possible instructions the machine can execute.

Instructions manipulate data, the MU, and the PU.

DS consists of all possible data that can be stored in MU and manipulated by IS.

PU executes the instructions in IS.

MU stores the data in DS.

A virtual machine is an abstract machine implemented in software. A physical machine is implemented in hardware.

The Hardware Level

Examples

PC, Mac, Mainframe

IS

Machine language instructions is binary word consisting of several fields:

The opcode encodes the operation to be performed. The operands contain the addresses in memory where the inputs to the operations are stored. Typical hardware level operations include arithmetic, logic, and MU read and write.

DS

Hardware level data consists of binary words of lengths 1 (bit), 8 (byte), 16, 32, 64, etc. These words can be interpreted as Booleans, characters, and numbers.

PU

The PU perpetually execute the fetch-execute cycle:

1. Fetch the next instruction from the MU
2. Fetch the required data from MU
3. Execute the instruction
4. Store the result in MU
5. goto 1

MU

The MU can be viewed as a large array of cells. Each cell contains one byte. Each cell has a unique address, which is its distance from the beginning of the array. Cells can be read and written.

UI

None

The Operating System Level

The OS level adds to the hardware level

Examples

Windows and UNIX

IS

DS

files

PU

MU

the file system = a tree of directories and files

UI

Shells and desktops

The Programming Level

Examples

Java, C, C++, LISP

IS

A rich collection of instructions for data and sequence control.

DS

A rich collection of primitive and programmer defined data types

PU

language processor = Interpreter or compiler

MU

named variables

UI

An IDE?

The Application Level

Examples

word processors, browsers, spread sheets, etc.

IS

Listed under the application menus

DS

documents and pieces of documents

PU

MU

UI