Anda di halaman 1dari 80

CSEN102 – Introduction to Computer Science

Lecture 11:
Technical Realization of the Boolean Logic

Prof. Dr. Slim Abdennadher, Assoc. Prof. Dr. Georg Jung


georg.jung@guc.edu.eg
German University Cairo, Department of Media Engineering and Technology

January 2, 2011

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 1 / 18


2011 New Year

Happy New Year

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 2 / 18


Synopsis Synopsis

Synopsis

All boolean functions can be expressed by a boolean expression


or a truth table

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 3 / 18


Synopsis Synopsis

Synopsis

All boolean functions can be expressed by a boolean expression


or a truth table
You should be able to transcribe a truth table into an expression
and vice versa

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 3 / 18


Synopsis Synopsis

Synopsis

All boolean functions can be expressed by a boolean expression


or a truth table
You should be able to transcribe a truth table into an expression
and vice versa
You should be able to transform a boolean expression using the
axioms (to simplify!)

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 3 / 18


Synopsis Synopsis

Synopsis

All boolean functions can be expressed by a boolean expression


or a truth table
You should be able to transcribe a truth table into an expression
and vice versa
You should be able to transform a boolean expression using the
axioms (to simplify!)
You should be able to prove equivalence or boolean functions

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 3 / 18


Synopsis Synopsis

Synopsis

All boolean functions can be expressed by a boolean expression


or a truth table
You should be able to transcribe a truth table into an expression
and vice versa
You should be able to transform a boolean expression using the
axioms (to simplify!)
You should be able to prove equivalence or boolean functions
All boolean expressions can be realized using logical gates

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 3 / 18


Synopsis Synopsis

Synopsis

All boolean functions can be expressed by a boolean expression


or a truth table
You should be able to transcribe a truth table into an expression
and vice versa
You should be able to transform a boolean expression using the
axioms (to simplify!)
You should be able to prove equivalence or boolean functions
All boolean expressions can be realized using logical gates
And, Or, and Not

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 3 / 18


Computer organization The ingredients

New chapter

How to build a computer.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 4 / 18


Computer organization The ingredients

Collecting the essential building blocks

We have:

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 5 / 18


Computer organization The ingredients

Collecting the essential building blocks

We have:
The theory of boolean functions and binary numbers

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 5 / 18


Computer organization The ingredients

Collecting the essential building blocks

We have:
The theory of boolean functions and binary numbers
We can express numbers (integer, floating point, . . . ), characters,
media, and other data through binary numeric representation

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 5 / 18


Computer organization The ingredients

Collecting the essential building blocks

We have:
The theory of boolean functions and binary numbers
We can express numbers (integer, floating point, . . . ), characters,
media, and other data through binary numeric representation
We can formally describe how to manipulate the data through
boolean expressions

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 5 / 18


Computer organization The ingredients

Collecting the essential building blocks

We have:
The theory of boolean functions and binary numbers
We can express numbers (integer, floating point, . . . ), characters,
media, and other data through binary numeric representation
We can formally describe how to manipulate the data through
boolean expressions
With any bistable device we can build a technical representation of
boolean functions

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 5 / 18


Computer organization The ingredients

Collecting the essential building blocks

We have:
The theory of boolean functions and binary numbers
We can express numbers (integer, floating point, . . . ), characters,
media, and other data through binary numeric representation
We can formally describe how to manipulate the data through
boolean expressions
With any bistable device we can build a technical representation of
boolean functions
Transistors can be used to represent the essential boolean
operations

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 5 / 18


Computer organization The ingredients

Collecting the essential building blocks

We have:
The theory of boolean functions and binary numbers
We can express numbers (integer, floating point, . . . ), characters,
media, and other data through binary numeric representation
We can formally describe how to manipulate the data through
boolean expressions
With any bistable device we can build a technical representation of
boolean functions
Transistors can be used to represent the essential boolean
operations
With the essential operations, any boolean function can be
encoded as a circuit

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 5 / 18


Computer organization The ingredients

Collecting the essential building blocks

We have:
The theory of boolean functions and binary numbers
We can express numbers (integer, floating point, . . . ), characters,
media, and other data through binary numeric representation
We can formally describe how to manipulate the data through
boolean expressions
With any bistable device we can build a technical representation of
boolean functions
Transistors can be used to represent the essential boolean
operations
With the essential operations, any boolean function can be
encoded as a circuit
With integrated circuits we can fit large numbers of transistors
(currently about 2 billion, end of 2010) into a single device.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 5 / 18


Computer organization The ingredients

Collecting the essential building blocks


We (kind of) have:

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 6 / 18


Computer organization The ingredients

Collecting the essential building blocks


We (kind of) have:
Instructions as a concept to extend the idea of boolean functions.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 6 / 18


Computer organization The ingredients

Collecting the essential building blocks


We (kind of) have:
Instructions as a concept to extend the idea of boolean functions.

Organize the input of a boolean function as nstruction and operators

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 6 / 18


Computer organization The ingredients

Collecting the essential building blocks


We (kind of) have:
Instructions as a concept to extend the idea of boolean functions.

Organize the input of a boolean function as nstruction and operators

Clocking as a mean to structure execution of the instruction-based


boolean functions.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 6 / 18


Computer organization The ingredients

Collecting the essential building blocks


We (kind of) have:
Instructions as a concept to extend the idea of boolean functions.

Organize the input of a boolean function as nstruction and operators

Clocking as a mean to structure execution of the instruction-based


boolean functions.

A periodic signal synchronizes the evaluation of the functions


The results of the evaluation influence the next cycle.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 6 / 18


Computer organization The ingredients

Collecting the essential building blocks


We (kind of) have:
Instructions as a concept to extend the idea of boolean functions.

Organize the input of a boolean function as nstruction and operators

Clocking as a mean to structure execution of the instruction-based


boolean functions.

A periodic signal synchronizes the evaluation of the functions


The results of the evaluation influence the next cycle.

A store, which means a circuit that acts as a solid state


representation of a value

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 6 / 18


Computer organization The ingredients

Collecting the essential building blocks


We (kind of) have:
Instructions as a concept to extend the idea of boolean functions.

Organize the input of a boolean function as nstruction and operators

Clocking as a mean to structure execution of the instruction-based


boolean functions.

A periodic signal synchronizes the evaluation of the functions


The results of the evaluation influence the next cycle.

A store, which means a circuit that acts as a solid state


representation of a value

s q’

r q
Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 6 / 18
The Von Neumann Architecture Computer organization

Computer Organization
The study of computers as collections of subsystems that
performs tasks such as

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 7 / 18


The Von Neumann Architecture Computer organization

Computer Organization
The study of computers as collections of subsystems that
performs tasks such as
instruction processing

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 7 / 18


The Von Neumann Architecture Computer organization

Computer Organization
The study of computers as collections of subsystems that
performs tasks such as
instruction processing
information storage

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 7 / 18


The Von Neumann Architecture Computer organization

Computer Organization
The study of computers as collections of subsystems that
performs tasks such as
instruction processing
information storage
data transfer

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 7 / 18


The Von Neumann Architecture Computer organization

Computer Organization
The study of computers as collections of subsystems that
performs tasks such as
instruction processing
information storage
data transfer
input and output

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 7 / 18


The Von Neumann Architecture Computer organization

Computer Organization
The study of computers as collections of subsystems that
performs tasks such as
instruction processing
information storage
data transfer
input and output
The level of abstraction above the digital logic level, but below the
operating system level.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 7 / 18


The Von Neumann Architecture Computer organization

Computer Organization
The study of computers as collections of subsystems that
performs tasks such as
instruction processing
information storage
data transfer
input and output
The level of abstraction above the digital logic level, but below the
operating system level.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 7 / 18


The Von Neumann Architecture Computer organization

Designing Computers

All computers more or less are based on the same basic design,
the Von Neumann Architecture.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 8 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

Model for designing and building computers, based on the


following three characteristics:

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 9 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

Model for designing and building computers, based on the


following three characteristics:
1 The computer consists of four subsystems:

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 9 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

Model for designing and building computers, based on the


following three characteristics:
1 The computer consists of four subsystems:
Memory

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 9 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

Model for designing and building computers, based on the


following three characteristics:
1 The computer consists of four subsystems:
Memory
Arithmetic Logic Unit (ALU)

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 9 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

Model for designing and building computers, based on the


following three characteristics:
1 The computer consists of four subsystems:
Memory
Arithmetic Logic Unit (ALU)
Control Unit

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 9 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

Model for designing and building computers, based on the


following three characteristics:
1 The computer consists of four subsystems:
Memory
Arithmetic Logic Unit (ALU)
Control Unit
Input/Output System (I/O)

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 9 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

Model for designing and building computers, based on the


following three characteristics:
1 The computer consists of four subsystems:
Memory
Arithmetic Logic Unit (ALU)
Control Unit
Input/Output System (I/O)
2 Stored program concept: Program is stored in memory during
execution.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 9 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

Model for designing and building computers, based on the


following three characteristics:
1 The computer consists of four subsystems:
Memory
Arithmetic Logic Unit (ALU)
Control Unit
Input/Output System (I/O)
2 Stored program concept: Program is stored in memory during
execution.
3 Sequential execution of instructions.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 9 / 18


The Von Neumann Architecture Computer organization

The Von Neumann Architecture

von Neumann Architecture

Memory

Control ALU

Input Output

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 10 / 18


The Von Neumann Architecture Computer organization

Memory

Memory is the functional unit that stores and retrieves instructions


and data being executed.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 11 / 18


The Von Neumann Architecture Computer organization

Memory

Memory is the functional unit that stores and retrieves instructions


and data being executed.
Memory also called RAM (Random Access Memory)

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 11 / 18


The Von Neumann Architecture Computer organization

Memory

Memory is the functional unit that stores and retrieves instructions


and data being executed.
Memory also called RAM (Random Access Memory)
consists of many memory cells (storage units) of a fixed size. Each
cell has an address associated with it: 0,1, . . .

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 11 / 18


The Von Neumann Architecture Computer organization

Memory

Memory is the functional unit that stores and retrieves instructions


and data being executed.
Memory also called RAM (Random Access Memory)
consists of many memory cells (storage units) of a fixed size. Each
cell has an address associated with it: 0,1, . . .
A memory access is a read (fetch) or a write (store). A cell is the
minimum unit of access (fetch/store a complete cell).

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 11 / 18


The Von Neumann Architecture Computer organization

Memory

Memory is the functional unit that stores and retrieves instructions


and data being executed.
Memory also called RAM (Random Access Memory)
consists of many memory cells (storage units) of a fixed size. Each
cell has an address associated with it: 0,1, . . .
A memory access is a read (fetch) or a write (store). A cell is the
minimum unit of access (fetch/store a complete cell).
All accesses to memory are to a specified address.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 11 / 18


The Von Neumann Architecture Computer organization

Memory

Memory is the functional unit that stores and retrieves instructions


and data being executed.
Memory also called RAM (Random Access Memory)
consists of many memory cells (storage units) of a fixed size. Each
cell has an address associated with it: 0,1, . . .
A memory access is a read (fetch) or a write (store). A cell is the
minimum unit of access (fetch/store a complete cell).
All accesses to memory are to a specified address.
The time it takes to fetch/store a cell is the same for all cells.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 11 / 18


The Von Neumann Architecture Computer organization

Memory

Memory is the functional unit that stores and retrieves instructions


and data being executed.
Memory also called RAM (Random Access Memory)
consists of many memory cells (storage units) of a fixed size. Each
cell has an address associated with it: 0,1, . . .
A memory access is a read (fetch) or a write (store). A cell is the
minimum unit of access (fetch/store a complete cell).
All accesses to memory are to a specified address.
The time it takes to fetch/store a cell is the same for all cells.
When the computer is running, both program and data are stored
in the memory.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 11 / 18


The Von Neumann Architecture Computer organization

RAM Organization

Need to distinguish between the address of a memory cell and the


content of memory cell
Address Content

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 12 / 18


The Von Neumann Architecture Computer organization

RAM Organization

Need to distinguish between the address of a memory cell and the


content of memory cell
Address Content
Cell Size or Memory Width: How many bits in each cell, typically
one byte (i. e., 8 bits).

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 12 / 18


The Von Neumann Architecture Computer organization

RAM Organization

Need to distinguish between the address of a memory cell and the


content of memory cell
Address Content
Cell Size or Memory Width: How many bits in each cell, typically
one byte (i. e., 8 bits).
Computers with a cell size of 8 bits use multiple memory cells to
store a single data value.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 12 / 18


The Von Neumann Architecture Computer organization

RAM Organization

Need to distinguish between the address of a memory cell and the


content of memory cell
Address Content
Cell Size or Memory Width: How many bits in each cell, typically
one byte (i. e., 8 bits).
Computers with a cell size of 8 bits use multiple memory cells to
store a single data value.
Address Width: How many bits used to represent each address. It
determines the maximum memory size or address space.
If address width is N bits, then address space is:
?

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 12 / 18


The Von Neumann Architecture Computer organization

RAM Organization

Need to distinguish between the address of a memory cell and the


content of memory cell
Address Content
Cell Size or Memory Width: How many bits in each cell, typically
one byte (i. e., 8 bits).
Computers with a cell size of 8 bits use multiple memory cells to
store a single data value.
Address Width: How many bits used to represent each address. It
determines the maximum memory size or address space.
If address width is N bits, then address space is:
2N (0, 1, . . . , 2N − 1).

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 12 / 18


The Von Neumann Architecture Computer organization

Operations on Memory

Fetch (address):

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 13 / 18


The Von Neumann Architecture Computer organization

Operations on Memory

Fetch (address):
Fetch a copy of the content of memory cell with the specified
address.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 13 / 18


The Von Neumann Architecture Computer organization

Operations on Memory

Fetch (address):
Fetch a copy of the content of memory cell with the specified
address.
Non-destructive, copies value in memory cell.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 13 / 18


The Von Neumann Architecture Computer organization

Operations on Memory

Fetch (address):
Fetch a copy of the content of memory cell with the specified
address.
Non-destructive, copies value in memory cell.
Store (address,value):

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 13 / 18


The Von Neumann Architecture Computer organization

Operations on Memory

Fetch (address):
Fetch a copy of the content of memory cell with the specified
address.
Non-destructive, copies value in memory cell.
Store (address,value):
Store the specified value into the memory cell specified by address.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 13 / 18


The Von Neumann Architecture Computer organization

Operations on Memory

Fetch (address):
Fetch a copy of the content of memory cell with the specified
address.
Non-destructive, copies value in memory cell.
Store (address,value):
Store the specified value into the memory cell specified by address.
Destructive, overwrites the previous value of the memory cell.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 13 / 18


The Von Neumann Architecture Computer organization

Input/Output Subsystem

Handles devices that allow the computer system to:


Communicate and interact with the outside world, (e. g., screen,
keyboard, printer, . . . )
Store information (mass-storage), (e. g., hard drives, floppies, CD,
tapes, . . . )

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 14 / 18


The Von Neumann Architecture Computer organization

Input/Output Subsystem

Handles devices that allow the computer system to:


Communicate and interact with the outside world, (e. g., screen,
keyboard, printer, . . . )
Store information (mass-storage), (e. g., hard drives, floppies, CD,
tapes, . . . )
Mass Storage Device Access Methods:

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 14 / 18


The Von Neumann Architecture Computer organization

Input/Output Subsystem

Handles devices that allow the computer system to:


Communicate and interact with the outside world, (e. g., screen,
keyboard, printer, . . . )
Store information (mass-storage), (e. g., hard drives, floppies, CD,
tapes, . . . )
Mass Storage Device Access Methods:
Direct Access Storage Device: All data can be accessed directly in
about the same amount of time rather than having to progress
sequentially through the data, (e. g., CD-ROMs, hard drives, . . . )

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 14 / 18


The Von Neumann Architecture Computer organization

Input/Output Subsystem

Handles devices that allow the computer system to:


Communicate and interact with the outside world, (e. g., screen,
keyboard, printer, . . . )
Store information (mass-storage), (e. g., hard drives, floppies, CD,
tapes, . . . )
Mass Storage Device Access Methods:
Direct Access Storage Device: All data can be accessed directly in
about the same amount of time rather than having to progress
sequentially through the data, (e. g., CD-ROMs, hard drives, . . . )
Sequential Access Storage Device: The device must read or move
through all information up to the point it is attempting to read or
write to, (e. g., tapes (used as backup devices))

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 14 / 18


The Von Neumann Architecture Computer organization

The Arithmetic Logic Unit Subsystem (ALU)

The ALU performs


mathematical operations (+, −, ×, /, . . .)
logic operations (=, <, >, and, or, not, . . . )

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 15 / 18


The Von Neumann Architecture Computer organization

The Arithmetic Logic Unit Subsystem (ALU)

The ALU performs


mathematical operations (+, −, ×, /, . . .)
logic operations (=, <, >, and, or, not, . . . )
In today’s computers integrated into the Central Processing Unit
(CPU).

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 15 / 18


The Von Neumann Architecture Computer organization

The Arithmetic Logic Unit Subsystem (ALU)

The ALU performs


mathematical operations (+, −, ×, /, . . .)
logic operations (=, <, >, and, or, not, . . . )
In today’s computers integrated into the Central Processing Unit
(CPU).
The ALU consists of

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 15 / 18


The Von Neumann Architecture Computer organization

The Arithmetic Logic Unit Subsystem (ALU)

The ALU performs


mathematical operations (+, −, ×, /, . . .)
logic operations (=, <, >, and, or, not, . . . )
In today’s computers integrated into the Central Processing Unit
(CPU).
The ALU consists of
Circuits to do the arithmetic/logic operations.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 15 / 18


The Von Neumann Architecture Computer organization

The Arithmetic Logic Unit Subsystem (ALU)

The ALU performs


mathematical operations (+, −, ×, /, . . .)
logic operations (=, <, >, and, or, not, . . . )
In today’s computers integrated into the Central Processing Unit
(CPU).
The ALU consists of
Circuits to do the arithmetic/logic operations.
Registers (fast storage units) to store intermediate computational
results.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 15 / 18


The Von Neumann Architecture Computer organization

The Arithmetic Logic Unit Subsystem (ALU)

The ALU performs


mathematical operations (+, −, ×, /, . . .)
logic operations (=, <, >, and, or, not, . . . )
In today’s computers integrated into the Central Processing Unit
(CPU).
The ALU consists of
Circuits to do the arithmetic/logic operations.
Registers (fast storage units) to store intermediate computational
results.
Bus that connects the two.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 15 / 18


The Von Neumann Architecture Computer organization

The Control Unit

Program is stored in memory as machine language instructions, in


binary
The task of the control unit is to execute programs by repeatedly:

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 16 / 18


The Von Neumann Architecture Computer organization

The Control Unit

Program is stored in memory as machine language instructions, in


binary
The task of the control unit is to execute programs by repeatedly:
Fetch from memory the next instruction to be executed.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 16 / 18


The Von Neumann Architecture Computer organization

The Control Unit

Program is stored in memory as machine language instructions, in


binary
The task of the control unit is to execute programs by repeatedly:
Fetch from memory the next instruction to be executed.
Decode it, that is, determine what is to be done.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 16 / 18


The Von Neumann Architecture Computer organization

The Control Unit

Program is stored in memory as machine language instructions, in


binary
The task of the control unit is to execute programs by repeatedly:
Fetch from memory the next instruction to be executed.
Decode it, that is, determine what is to be done.
Execute it by issuing the appropriate signals to the ALU, memory,
and I/O subsystems.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 16 / 18


The Von Neumann Architecture Computer organization

The Control Unit

Program is stored in memory as machine language instructions, in


binary
The task of the control unit is to execute programs by repeatedly:
Fetch from memory the next instruction to be executed.
Decode it, that is, determine what is to be done.
Execute it by issuing the appropriate signals to the ALU, memory,
and I/O subsystems.
Continues until the HALT instruction.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 16 / 18


The Von Neumann Architecture Computer organization

The Nacked Machine

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 17 / 18


The Von Neumann Architecture Computer organization

The Nacked Machine

Difficult to use:
Store program in RAM
Put address of first instruction in program counter (PC)
...

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 17 / 18


The Von Neumann Architecture Computer organization

The Nacked Machine

Difficult to use:
Store program in RAM
Put address of first instruction in program counter (PC)
...
Difficult to program:
Machine language instruction look like: 1110000111. . .

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 17 / 18


The Von Neumann Architecture Computer organization

Programming the Machine

Algorithms/Programs must be translated into machine-code


before they can run on the computer.

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 18 / 18


The Von Neumann Architecture Computer organization

Programming the Machine

Algorithms/Programs must be translated into machine-code


before they can run on the computer.
Instead of writing in machine code we can write our programs
using a more friendly programming language
Assembly language (next year)
Java (this term and next term)

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 18 / 18


The Von Neumann Architecture Computer organization

Programming the Machine

Algorithms/Programs must be translated into machine-code


before they can run on the computer.
Instead of writing in machine code we can write our programs
using a more friendly programming language
Assembly language (next year)
Java (this term and next term)
System software provides us with tools to translate programs into
machine code:
Assembler
Compiler

Abdennadher, Jung (GUC–MET) CSEN102 January 2, 2011 18 / 18

Anda mungkin juga menyukai