03 VonNeumannModel
03 VonNeumannModel
Model
The Stored Program Computer
1943: ENIAC
• Presper Eckert and John Mauchly -- first general electronic computer.
• Hard-wired program -- settings of dials and switches.
System Bus
External Units
Von Neumann Model - Components
System
CENTRAL Bus
PROCESSING UNIT
Input Units Output Units
(MICROPROCESSOR OR CPU)
CENTRAL MEMORY
(RAM)
Mass memories
Von Neumann Model - Components
Microprocessor or CPU
It executes the program instructions and supervises the operation of the entire machine.
System Bus
Random Access Memory (RAM)
It is the memory where the data being processed (open documents) and the instructions of the
running program are stored; this is temporary or volatile memory that is completely erased
when the computer is turned off.
Hard Disk
it is the computer's permanent memory unit, where all documents, data and programs are
stored. It is used as storage memory (for this reason it is also called mass memory).
Von Neumann Model - Components
All the devices that interconnect a computer (in the broadest sense) with the outside are
generically called as Peripherals or Input/Output Peripheral Devices (or I/O, or Input/Output).
System Bus
Some devices are input only, because they transfer data from the outside (such as the
mouse and keyboard), others are output only (such as monitors and audio speakers), and
others are both input and output at the same time (such as discs or touch screens).
The most common devices are:
o Keyboard, Mouse, Monitor, and CD-Rom - almost always present;
o Printer and Audio (speakers, microphone) - often present, but not essential for the
operation of the machine;
o Network (with direct connection, or through a Modem).
Furthermore, there may be: Recorder, Scanner, Video Camera, etc.
To be connected to a computer, some I/O devices require the presence of an additional
hardware component (expansion card) installed on the same computer.
A monitor usually requires the presence of a video card and speakers require a sound card
Von Neumann Model
System Bus
External Units
Main memory organization
The central memory is organized as a set of registers of the same size,
each of the which is identified through a progressive number, said
address.
Read/
addresses data
Write
BUS
Main memory - operations
ROM Memory
Some programs and data are vital for a computer to work.
These programs and data must be permanently stored, even
when the power supply is NOT provided. Once stored, they
do not have to be modified or deleted.
e.g. the bootstrap programs
Infinity capacity
Infinity speed
Evidence:
Control Unit
Arithmetic-
Logical Unit
First
Level Second Main
Cache Level Memory
(on chip Cache (DRAM)
cache) (SRAM)
registers
Von Neumann Model - The Bus
BUS
External Units
Von Neumann Model - The Bus
It implements a communication channel between the various units
of a computer.
In general, a single data transmission a time can be possible
between two units called:
master takes the bus control and starts the transmission
slave that is enabled by the master.
The bus consists of a line set used to transmit signals. The line set
includes:
• Data lines
• Address lines Master Slaves
• Control lines
Control Line
Address Line
Data Line
Von Neumann Model - CPU
External Units
CPU (Central Processing Unit)
Function:
it executes the programs stored in the main memory by
retrieving the instructions, and the corresponding data,
interpreting and executing them one by one
registers
Decode instruction
The Control Unit is
responsible for cycling
Evaluate address performing the
necessary phases for
executing the
Fetch operands from memory instruction sequence of
a program
Execute operation
Store result
Arithmetic-Logical Unit
• General registers
• Special registers
Special registers are
•Program Counter (PC)
not directly accessible
•Memory Address Register (MAR) by instructions
• Memory Data Register (MDR)
•Instruction Register (IR)
CPU - connection with the system
Arithmetic
Control
Logical
Internal components of a CPU are Unit
Unit
interconnected using internal
connections.
Program Instruction
The CPU is connected to the rest of Counter Register
the system through the BUS
(address, data and control lines). Register A Register B
BUS
CPU-Memory transfer
Read Read
address
BUS
data
0 01101101
Control Arithmetic
Unit Logical 1 10010110
Unit
2 00111010
3 11111101
Program Instruction
Counter Register
1022 00010001
Register TO Register B
1023 10101001
Mem. Addr. Mem. Data
Register Register
Read Read
address
BUS
data
CPU-Memory transfer - Writing
Write Write
address
BUS
data
0 01101101
Arithmetic
Control 1 10010110
Logical
Unit
Unit
2 00111010
3 11111101
Program Instruction
Counter Register
1022 11001100
Register A Register B
1023 10101001
Mem. Addr. Mem. Data
Register Register
address
BUS
data
Execution of an instruction - Example
Let's consider the following instruction:
ADD (1021),(1022),1023
which means
”add the values stored in the memory registers having address
1021 and 1022 and memorize the result in the register having
address 1023”
Let’s suppose that the instruction is stored on the memory
register having address 3.
0 01101101
Arithmetic
Control
Logical 1 10010110
Unit
Unit
2 00111010
3 11111101
PC 00000011 IR
1021 11001100
A B 10101001
1022
MAR 00000011 MDR 1023 00000000
Read
address
BUS
data
FETCH phase
0 01101101
Arithmetic
Control
Logical 1 10010110
Unit
Unit
2 00111010
3 11111101
PC 00000110 11111101 IR
1021 11001100
A B 1022 10101001
MAR 00000011 11111101 MDR 1023 00000000
address
BUS
data
OPERAND ASSEMBLY phase
0 01101101
Arithmetic
Control
Logical 1 10010110
Unit
Unit
2 00111010
3 11111101
PC 00000110 IR
1021 11001100
A B 10101001
1022
MAR 11111101 MDR 1023 00000000
Read
address
BUS
data
OPERAND ASSEMBLY phase
0 01101101
Arithmetic
Control 1 10010110
Logical
Unit
Unit 2 00111010
3 11111101
PC 00000110 11111101 IR
1021 11001100
A 11001100 B 1022 10101001
MAR 11111101 11001100 MDR 1023 00000000
address
BUS
data
OPERAND ASSEMBLY phase
Arithmetic 0 01101101
Control
Logical 1 10010110
Unit
Unit
2 00111010
3 11111101
PC 00000110 IR
1021 11001100
A 11001100 B
1022 10101001
MAR 11111110 MDR 1023 00000000
Read
address
BUS
data
OPERAND ASSEMBLY phase
0 01101101
Arithmetic
Control
Logical 1 10010110
Unit
Unit
2 00111010
3 11111101
PC 00000110 11111101 IR
1021 11001100
A 11001100 10101001 B
1022 10101001
MAR 11111101 10101001 MDR 1023 00000000
address
BUS
data
EXECUTE phase
0 01101101
Arithmetic
Control
Logical 1 10010110
Unit
Unit
2 00111010
3 11111101
PC 00000110 11111101 IR
1021 11001100
A 11001100 01110101 B
1022 10101001
MAR MDR 1023 00000000
address
BUS
data
STORE phase
0 01101101
Arithmetic
Control
Logical 1 10010110
Unit
Unit
2 00111010
3 11111101
PC 00000110 11111101 IR
1021 11001100
A 11001100 01110101 B
1022 10101001
MAR 11111111 01110101 MDR 1023 00000000
Write
address
BUS
data
STORE phase …and then?
Arithmetic 0 01101101
Control
Logical 1 10010110
Unit
Unit
2 00111010
3 11111101
PC 00000110 11111101 IR
1021 11001100
A 11001100 01110101 B
1022 10101001
MAR 11111111 01110101 MDR 1023 01110101
Write
address
BUS
data
Clock
time
External Units
Mass memory
mercoledì 6 giugno 12
Hard disk - Organization
arm heads
actuator disks
External Units
Calculator and external units - Connections
Input/output activities are performed by using external units:
• keyboard
• mouse
• monitor
Problem:
• printer
Many devices of the
• scanner same type offered by
different manufacturers.
• microphones/speakers
How to manage the
• cam
connection with the
•… calculator?
Need of standard
Calculator and external units - Connections
The connection between computer and external units happens
through standard connections (peripheral ports). Manufacturers
must produce their products in compliance with these
specifications.
The connection between computer and external units provides a
bidirectional flow of data bytes. This flow can be serial or parallel,
according to the characteristics of the channel used for the transfer.
0100100
Serial
parallelism: 1 bit
0 0
0
Parallel 1 1 1
parallelism: 8 bit
0
7 7
N N
o mass
o
Input And Output ports
The I/O doors are generally localized on the rear side of a calculator and are
used for connecting each kind of external device the same calculator supports
(monitor, keyboard, mouse, etc.). The disposition of the doors may vary from
calculator to calculator.
Typically, the following ports are located on the motherboard:
• PS/2 port
– Traditionally used for connecting mouse and keyboard. They are obsolete!
• Serial port
– Traditionally used for devices that do not require fast data flow.
• Parallel port
– Traditionally used for printers, but in general it is suitable for devices that
require a faster data flow with respect to the capacity of the serial port.
• USB port (Universal Serial Bus)
– Being universal, it can be used to connect any kind of device to a
computer. USB technology further allows to create "chains" of devices all
connected to a single port (until to 127). Furthermore, It allows the hot
connection (Meaning even when the computer is already switched on). On
the contrary, devices that do not support USB technology must be connected
to a switched off computer for being correctly used.
Parallel port (LPTx:)
PS/2 Port
Serial interface introduced by IBM For connecting mouse and keyboard.
6-pins Connector.
Universal Serial Bus interface (USB)
It is a serial interface designed for:
• connecting more peripherals at the same time
• realizing “hot swap” connections
• ensuring high transfer speed
Characteristics:
• U n t i l to 127 units connected on the same connection (using hub)
• Maximum speed: 12 Mbit/sec (USB 1.1) 480 Mbit/sec (USB 2.0)
• Ideal for connecting mouse, scanner, printer, modem, …
FireWire Interface (IEEE1394)
It is a standard serial interface like USB, but with better performance:
• Contemporary connection to more peripherals
• “hot swap” connections
• high transfer speed: until to 400 Mbits/sec
• suitable for interfacing peripherals requiring a wide band (cameras digital, VCR,etc.)
Additional ports
Input Output
Keyboard Monitor
Mouse Printer
Scanner Plotter
Cam Speakerset
Microphone ….
…
1 1 0 10
0 1 1 01
from the 0 1 0 01 towards
outside ADC the
memory
• Function Keys: the line in high (Esc, F1, F2, etc.) are keys used for issuing
commands. Their real function depends on the current running program. F1 key is
commonly used for HELP function.
• The main group: these keys correspond to those of a typical typewriter (letters,
numbers, symbols and punctuation). In addition, there are some Ctrl (Control) and Alt
(Alternate) modifier keys which along with the capital key can be used to change the
functions of some other keys. (Also in this case the real effect depends on the
current running program).
• The SHIFT keys (⇧) or the CAPS LOCK key (⇪) can be also used to enter the
characters in uppercase in a temporary or permanent way, respectively. The SHIFT
key makes it possible to activate the second function expected just for the keys that
offer two options.
• The Italian keyboard also owns the Alt Gr key, which is used just for the keys
that offer three options.
• Numeric Keypad: it corresponds to the keys on the right side. They are a replica of
the numeric keys that are organized as a calculator. The first key (Block Num or Num
lock) is used to enable or disable the numeric keypad.
• Cursor keys: between the alphanumeric keys and the numeric keypad, there are
some keys that are used to move the cursor on the screen and to scroll the pages.
Devices Of Input: The mouse
• It is a device used to move the cursor on the screen according to
the its movement on the surface of the desk on which it is located.
The movement on the desk can be acquired by using a rotating ball
or a led-camera system (optical mouse)
• The mouse is connected to the computer using a cable or can be
wireless. It can be equipped from two to five buttons.
• The left button is the principal, and it is used to:
– operate a choice (by pointing the cursor on the screen and doing click)
– to select or drag an object
– Start up a program by doing a double click on the corresponding icon.
• The right button makes it available a command list on the screen
containing rapid and appropriate actions according to both the
position on the screen and the context in which it is used.
• Other peripherals similar to the mouse are:
– Track ball
– Touch pad
Devices Of Input: the scanner
•It is an input device capable of
acquiring Images from a paper
support and of transferring them
into the calculator memory in
order to be processed and/or
inserted into a document.
•Sometimes, it is used together with
a specific software, called
OCR(Optical Character
Recognition) which makes it
possible to obtain the electronic
format corresponding to the text
contained into a paper document.
Information representation - types
‘A’ letter ASCII
Q W E R T Y code
10000001
A S D F G H
tastiera
bit map
0 0 1 0 0
0 1 0 11 0
0 1 0 1 0
1 11 11 11 1
SCANNER
1 0 0 0 11
11 0 0 0 1
Output device - Operations
Output peripherals are used to obtain a representation
directly understandable by humans starting from the coded
digital information stored in the computer memory.
00110
from 10100
00001 outside
memory DAC