Professional Documents
Culture Documents
Chapt. 7
ITEC 1011
Introduction
The Little Man Computer (LMC) is cute,
but
Real computers
Memory is separate from the CPU
Data are in binary (not decimal)
ITEC 1011
Central
Processing
Unit
Components of a CPU
ALU (arithmetic and logic unit)
Perform arithmetic and logic operations
Arithmetic: add, subtract, multiply, divide, etc.
Logic: AND, OR, NOT, Shift, etc.
Control unit
Interprets instructions
Controls the flow of information within the CPU
Works with a program counter (address of next instruction)
Input/output interface
Provides mechanism for input and output of data
Many variations possible
p. 166
ITEC 1011
LMC Counterparts
ALU
Input/output
interface
123
456
00
01
02
03
04
05
123
500
199
500
399
Control unit
95
96
97
98
99
789
123
05
Program counter
p. 167
ITEC 1011
Memory
Control unit
Program counter
ITEC 1011
Registers
A register is a single storage location within the CPU
Unlike memory, which is outside the CPU
Examples of registers:
Accumulator (ACC)
Program counter (PC)
Instruction register (IR)
Memory address register (MAR)
Memory data register (MDR)
Status register
ITEC 1011
Memory Unit
Memory cell
bit 0
bit 1
0
1
2
3
4
Address decoder
n bits
bit n - 1
m-1
2n-1
m bits
p. 170
ITEC 1011
Memory Capacity
2n x m
n address bits = 2n addresses
m data bits
m is the width of the data path
Typical values:
n: 16, 17, 18, 19, 20, 21, 22, etc.
m: 8, 16, 32, 64
ITEC 1011
Question
Q: How many bits of memory are contained
in a memory unit with 512KB of memory?
A: 512 = 29, K = 210, B = byte = 8 = 23
29 x 210 x 23 = 222 = 4,194,304
ITEC 1011
Skip answer
ITEC 1011
Answer
ITEC 1011
Memory Implementations
RAM random access memory
Static RAM
Dynamic RAM
p. 175
ITEC 1011
Fetch-Execute Cycle
Two steps, or cycles, in the execution of
every instruction
Fetch fetch the code for the instruction from
memory and place it in the IR (instruction
register)
Execute execute the instruction
Execute
time
ITEC 1011
Fetch
PC MAR
MDR IR
IR[address] MAR
Execute
A MDR
PC + 1 PC
ITEC 1011
time
Fetch
PC MAR
MDR IR
IR[address] MAR
Execute
A + MDR A
PC + 1 PC
ITEC 1011
time
Buses
Definition: a collection of wires with a
common purpose
Each wire is called a line
Typically, buses carry information from one
place to another
bus
Printer
Mouse
Ports
Keyboard
Modem
CPU
RAM
Disk
controller
Graphics
card
Monitor
Sound
card
Speakers
Network
card
Computer
ITEC 1011
Types of Buses (1 of 3)
Point-to-point
Serial
port
Control
unit
ITEC 1011
Modem
ALU
Types of Buses (2 of 3)
Multipoint
Computer
Computer
Computer
CPU
Disk controller
ITEC 1011
Computer
Memory
Video controller
Types of Buses (3 of 3)
Daisy chain
Device controller
Device
Device
Device
Terminator
ITEC 1011
I/O Device
ITEC 1011
Motherboard
Many
configurations
possible
Data Bus
Carries data between the CPU and memory or I/O
devices
Bi-directional
Data transferred out of the CPU for write operations
Data transferred into the CPU for read operations
ITEC 1011
Address Bus
Carries an address from the CPU to Memory or
I/O devices
Unidirectional
The address is always supplied by the CPU
(There is one exception to this, which well discuss later.)
ITEC 1011
Control Bus
ITEC 1011
/RD (read)
/WR (write
CLK (clock)
/IRQ (interrupt request)
etc.
Memory Maps
The usage of memory space on a system is
commonly depicted in a memory map
The height of the map is determined by the
number of addresses
The width of the map is usually 8 bits
E.g.,
a system with a capacity of 216 bytes
ITEC 1011
Memory
Map
7 6 5 4 3 2 1 0
FFFF
Data bit
position
Hexadecimal
address
ITEC 1011
0002
0001
0000
Introduction to Information Technologies
The bottom
of memory
E.g.,
a memory map for a system with a capacity of 2 24 bytes with
two 1 MB RAM modules residing consecutively at the bottom
of memory
ITEC 1011
Memory
Map
FFFFFF
14 MB
empty
224 bytes = 16 MB
capacity
200000
1FFFFF
100000
0FFFFF
1 MB RAM
1 MB RAM
000000
ITEC 1011
Answer
ITEC 1011
Answer
Answer
Memory
Map
7FFFFFFF
1,952 MB
empty
231 bytes = 2 GB
capacity
06000000
05FFFFFF
04000000
03FFFFFF
Note:
2 GB = 2,048 MB
02000000
01FFFFFF
00000000
ITEC 1011
32 MB RAM
32 MB RAM
32 MB RAM
ITEC 1011
Thank you
ITEC 1011