Sie sind auf Seite 1von 15

Christian Jacob

Chapter 2 Anatomy of a computer


2.1 2.2 Layers of Virtual Machines The Register Machine Model
2.2.1 2.2.2 2.2.3 2.2.4 Main components of a von Neumann computer architecture CPU and RAM Execution of Machine Instructions Machine Language

2.3 2.4

Hardware Components of a Computer References

Chapter Overview

Page 2

Chapter 2: Anatomy of a Computer

Christian Jacob

2.1

Layers of Virtual Machines


Physical Representation

Applications

Boolean Circuits Register Machine ...

Operating System many layers inbetween

First

Back

TOC

Prev Next

Last

Page 3

Chapter 2: Anatomy of a Computer

Christian Jacob

2.2

The Register Machine Model

2.2.1 Main components of a von Neumann computer architecture

Control Unit

Input Unit

Memory

Output Unit

ALU
Burks, Goldstine, von Neumann (Princeton, 1946/47)
First Back TOC The Register Machine Model Prev Next Last

Page 4

Chapter 2: Anatomy of a Computer

Christian Jacob

Von Neumann Architecture The computer architecture is problem-independent. Universal Computer: - Arithmetic Logical Unit Memory Control Unit Input / Output Unit Program and data both reside in memory. Each memory location has an address, through which its contents can be accessed. In general, program commands are stored in consecutive memory locations. There are jump commands. There are conditional jumps. The binary number system is used.

First

Back

TOC

The Register Machine Model

Prev Next

Last

Page 5

Chapter 2: Anatomy of a Computer

Christian Jacob

2.2.2 CPU and RAM

Data bus transports data from RAM to the CPU for processing

RAM
Random Access Memory
Data bus transports the processed data to RAM, so it can be displayed, output, or stored on disk

CPU
Central Processing Unit

RAM contains data and instructions (programs) how to process the data

The CPU processes data

First

Back

TOC

The Register Machine Model

Prev Next

Last

Page 6

Chapter 2: Anatomy of a Computer

Christian Jacob

2.2.2 Arithmetic Logical Unit (ALU)

Data

Result

RAM ALU

Register 1

Register 2

4
Addition +

Control Unit

9
Accumulator

First

Back

TOC

The Register Machine Model

Prev Next

Last

Page 7

Chapter 2: Anatomy of a Computer

Christian Jacob

ALU / RAM Performance: 1. The data to be processed arrives from RAM and is held in registers. 2. A signal from the Control Unit indicates which arithmetic or logical operation to perform. 3. The ALU performs the operation and places the result in the accumulator. 4. The results are usually sent to RAM so that they can be output or stored on disk.

First

Back

TOC

The Register Machine Model

Prev Next

Last

Page 8

Chapter 2: Anatomy of a Computer

Christian Jacob

2.2.3 Execution of Machine Instructions


Load jump address Load data address Fetch opcode and mod

Instruction Pointer

Program address 1

Increment instruction pointer

Memory Addressing

Control Unit

RAM

ALU

Accu

Load/store data Load instruction

Load constant

Address / Operator Constant Instruction Register


Prev Next Last

First

Back

TOC

The Register Machine Model

Page 9

Chapter 2: Anatomy of a Computer

Christian Jacob

2.2.4 Machine Language


Elementary operations: - data transfer - program control - arithmetic and logic operations - move operations - interrupt handling Binary command representation Regular structure of all the commands

First

Back

TOC

The Register Machine Model

Prev Next

Last

Page 10

Chapter 2: Anatomy of a Computer

Christian Jacob

Command formats: - 1-address command


Operation Address of Operand 2

- 2-address command
Operation
Address of Operand 1 & Result

Address of Operand 2

- 3-address command
Operation Address of Operand 1 Address of Operand 2 Address of Result

First

Back

TOC

The Register Machine Model

Prev Next

Last

Page 11

Chapter 2: Anatomy of a Computer

Christian Jacob

Machine Language Example


Opcode dual hex. Description of the Operation Mnemo.

0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1100 1101 1110 1111
First Back

0 1 2 3 4 5 6 7 8 9 A C D E F
TOC

Halt. End of program execution Load operand to accumulator Store accumulator at designated address Add operand to accumulator Subtract operand from accumulator Multiply operand with accumulator Divide accumulator by operand Unconditional jump Jump if accumulator = 0 Jump if accumulator > 0 Jump if accumulator < 0 Stack commands Jump to subroutine Return from subroutine Index commands
The Register Machine Model

HLT LOA STI ADD SUB MUL DIV JMP JEZ JGZ JLZ JSR RET Prev Next Last

Page 12

Chapter 2: Anatomy of a Computer

Christian Jacob

Example: The word 0011 0100 1001 1101 in a memory cell can be a decimal number: 13469 a command:

0011

100

10011101

- 0011: - 0: - 100: - 10011101:

add operand to accumulator one word command constant operand (immediate operand) 15710

Add 157 to the contents of the accumulator.

First

Back

TOC

The Register Machine Model

Prev Next

Last

Page 13

Chapter 2: Anatomy of a Computer

Christian Jacob

2.3

Hardware Components of a Computer


Central Components: - CPU - Main memory (RAM) Peripheral Devices Input devices - Keyboard - Pointing devices: mouse, trackpads, trackballs, pens, joysticks - Scanners, optical character readers (OCR) - Microphone

First

Back

TOC

Hardware Components of a Computer

Prev Next

Last

Page 14

Chapter 2: Anatomy of a Computer

Christian Jacob

Output devices - Monitor (+ special-purpose processor: video card) - Printer - Speakers (+ special-purpose processor: sound card) Input-output devices - Floppy disk drive (capacity: 1.44M to 2.88M, M = Mega Byte) - Hard disk drive (capacity: > 20G, G = Giga Byte) - Optical storage devices (CD-ROM, DVD) - Modem - Connections to Local Area Networks (LANs) - Connections to Wide Area Networks (WANs) Input and output drivers (= software to interface to external devices)

First

Back

TOC

Hardware Components of a Computer

Prev Next

Last

Page 15

Chapter 2: Anatomy of a Computer

Christian Jacob

2.4

References
G. Blank and R. Barnes, The Universal Machine, Boston, MA: WCB/ McGraw-Hill, 1998. Chapters 1.3 and 8.

First

Back

TOC

References

Prev Next

Last

Das könnte Ihnen auch gefallen