Professional Documents
Culture Documents
Memories
Mme F.DJIDEL 1
Introduction
Mme F.DJIDEL 2
Hardware architecture of a machine
(Von Neumann architecture)
CPU Memory
Processor Central
3 Mme F.DJIDEL
The Central Unit (UC)
• The role of the central unit (also called processor) is to
execute programs.
• The CPU is composed of an arithmetic and logic unit (ALU)
and a control unit.
- The arithmetic and logic unit performs an elementary
operation (addition, subtraction, multiplication, etc.) at each
clock top.
- The control unit controls memory operations (read/write) and
the operations to be performed by the ALU, depending on the
instruction to be executed.
• To perform operations on data and execute programs, the CU
needs a workspace. This workspace is called the central
memory.
4 Mme F.DJIDEL
2. What is a memory?
• A memory is a device capable of :
• Recording information,
• Storing it (memorizing)
• Restoring it (reading or retrieving it later).
Example of a memory :
- Main memory
- Hard disk
- Floppy disk
- Flash disk
- ..............
• The memory can be in the processor (registers), internal
(central or main memory) or external (secondary memory).
5 Mme F.DJIDEL
Registers
Cache Memory
Capacity
Central Memory
Access Time
Cost
Support Memory
Auxiliary Memory
Memory hierarchy
Mme F.DJIDEL 6
Registers: These are memory elements located in the central
processing unit (Central Processing Unity ). Characterized by high
speed, they are mainly used for storing operands and
intermediate results .
Mme F.DJIDEL 7
Cache Memory: It is a low capacity memory used as a buffer
between the CPU and central memory. It allows the CPU to make
fewer accesses to central memory, thus saving time .
Mme F.DJIDEL 8
3. Memory characteristics
3.1. The capacity of a memory
• The capacity (size) of a memory is the number (quantity) of
information that can be recorded (memorized) in this memory.
• Capacity can be expressed as:
- Bit : a bit is the basic element for representing information - - Byte : 1
Byte = 8 bits
- kilobyte (KB): 1 kilobyte (KB) = 1024 bytes = 2 10 bytes
- Megabyte (MB): 1 Megabyte (MB) = 1024 KB = 2 20 bytes
- Gigabyte (GB): Gigabyte (GB)=1024 MB = 2 30 bytes
- Terabyte (TB): 1 terabyte (TB) = 1024 GB = 2 40 bytes
- Peta -byte (PB): 1Petabytes = 1024 T bytes=2 50 bytes= 2 50 x8bits.
- Exa -bytes ( Eo ): 1Exa - bytes = 1024 P bytes=2 60 bytes= 2 60 x8bits.
- Zeta-bytes ( Zo ): 1Zeta-bytes = 1024 E bytes=2 70 bytes= 2 70 x8bits
- Y otta -bytes ( Yo ): 1Yotta-bytes = 1024 Z bytes=2 80 bytes= 2 80 x8bits.
Mme F.DJIDEL 9
• Capacity can be expressed as:
- Bit : a bit is the basic element for representing information - -
Byte : 1 Byte = 8 bits
- kilobyte (KB): 1 kilobyte (KB) = 1024 bytes = 2 10 bytes
- Megabyte (MB): 1 Megabyte (MB) = 1024 KB = 2 20 bytes
- Gigabyte (GB): Gigabyte (GB)=1024 MB = 2 30 bytes
- Terabyte (TB): 1 terabyte (TB) = 1024 GB = 2 40 bytes
- Peta byte (PB): 1 Petabytes = 1024 T bytes=2 50 bytes=
2 50 x8bits.
- Exa bytes ( Eo ): 1 Exa bytes = 1024 P bytes=2 60 bytes=
2 60 x8bits.
- Zeta bytes ( Zo ): 1 Zeta bytes = 1024 E bytes=2 70 bytes=
2 70 x8bits
- Yotta bytes ( Yo ): 1 Yotta bytes = 1024 Z bytes=2 80 bytes=
2 80 x8bits.
Mme F.DJIDEL 10
3. Memory characteristics
3.2 Memory organization
Mme F.DJIDEL 11
3. Memory characteristics
3.3.Volatility
Mme F.DJIDEL 12
3.Memory characteristics
3.4. Information access mode (read/write)
Mme F.DJIDEL 13
3. Memory characteristics
3.5 Access time : the time required to perform a read/write
operation
Speed Capacity
Registers
Cache Memory
Central Memory
Mass Memory
Mme F.DJIDEL 14
3.6 Flow rate (débit en frensh) : the quantity of
information read/written per unit of time:
expressed in bit/s, MB/s
3.7 The memory cycle : The memory cycle
represents the minimum time interval between 2
successive memory accesses .
Mme F.DJIDEL 15
3.Memory characteristics
3.8 Location of memories
Cache
Memory
Registers
Auxiliary
Central Memory
Memory
Processor
Mme F.DJIDEL 16
3. Characteristics of memories
3.9 Methods of access to information
Mme F.DJIDEL 17
Magnetic Strip
Mme F.DJIDEL 18
Hard disk HDD (Hard Disc Drive)
Mme F.DJIDEL 19
SSD hard drive (Solid State Drive)
Mme F.DJIDEL 20
Central memory
RAM: Random Access
Memory
21 Mme F.DJIDEL
Definitions and characteristics
Mme F.DJIDEL 22
Definitions and characteristics
Mme F.DJIDEL 24
Note: Memory refreshing is a process of
periodically reading information from a
computer memory and immediately rewriting it
without modification, in order to prevent the
loss of this information,
Mme F.DJIDEL 25
4. Logical view of central memory
An address
•Central memory can be seen as a large
vector (array) of words or bytes . 0000
0001100
•A memory word stores information in n bits.
0011100 0001
•a memory word contains several memory
cells . 0111100 0002
•single- bit storage memory cell . 0001100 …….
•Each word has its own address . 0001100 …….
•An address is a unique number that provides
access to a memory word. ……..
•Addresses are sequential (consecutive) Content of a
•The size of the address (the number of bits) memory box (one
depends on the capacity of the memory. word)
FFFF
26 Mme F.DJIDEL
5. Physical structure of a central memory
•MAR (Memory address register): this
CS
register stores the address of the word to
R /W
read or write.
•MBR (Memory Information Register):
stores information read from memory or D
E
information to be written to memory. V
M S
Mme F.DJIDEL 28
• Example: RAM 8X 4
0123
If R/W = 1
Reading
If R/W = 0
Mme F.DJIDEL 29
writing
Memory operations
a - Reading
-Load the address into the MAR register: MAR @
- Start the read command:
-The information is available in the MBR: MBR Memo
b - Writing
- Load into the MAR the address of the word where the writing will
take place: MAR @
-Place the information to be written in the MBR: MBR Data
-Run the write command: MBR memo
Mme F.DJIDEL 30
How to calculate the capacity of a MC?
• Let k be the size of the address bus (size of the MAR register)
• Let n be the size of the data bus (size of the MBR register or the size of a
memory word)
• We can express the capacity of the central memory either in number of
memory words or in bits (bytes, kilobytes, etc.)
– Capacity = 2 k memory words
– Capacity = 2 k * n Bits
Example :
In a memory the size of the address bus K=14 and the size of the data bus n=4.
Calculate the capacity of this memory?
31 Mme F.DJIDEL
Memory expansion
• To create large capacity memories, you can use small capacity
memories and connect them together.
Mme F.DJIDEL 32
A/Increase in address space ( number of words)
• If we want to increase the address space of a RAM, we must
connect several RAMs in parallel; for this they must have words of
the same length .
Mme F.DJIDEL 33
Example 1: making 1K x 8 RAM from 512 x 8-bit
RAM
The number of RAM required :
P=2 10 / 2 9 = 2 lines (2 RAM in parallel )
Q=8/8=1 column
• MAR of 10 bits A0……A9
• MBR of 8-bit B0...B7
Mme F.DJIDEL 34
It is the
complementary
address bit A9
that selects
which RAM
should be
activated.
If A9 = 0 it is the
first RAM which
is active
if A9 = 1 it is the
second RAM
which is active
Mme F.DJIDEL 35
Example 2: Creating 1K x 8-bit RAM from 256 x 8 RAM bits
Mme F.DJIDEL 36
Mme F.DJIDEL 37
B/ Increase in word length
CS
MBR
B 15
Mme…BF.DJIDEL
0
39
Example 2: Realise 1K x 8 RAM from 1K x 4 RAM
Mme F.DJIDEL 41
R.W.
B7 B4
Mme F.DJIDEL 42
ROM
Read Only Memory
Mme F.DJIDEL 43
• ROM (Read Only Memory) is a non-volatile, read-only permanent
memory unlike RAM.
• This type of memory is used to store information that is never
erased even when the power is turned off. However, it is slower
than RAM, it contains the first instructions necessary for the
machine to start (Bios).
• The ROM is made from diodes or small fuses. When the fuse is
intact it lets the current flow, and then represents a 1, when the
fuse is blown, the current no longer flows, we then have a 0.
• The diode when it passes current we obtain a 1 and when it is
blocked it is a 0.
Mme F.DJIDEL 44
The different types of ROM:
Mme F.DJIDEL 45
Classic ROM
Mme F.DJIDEL 46
• Example of 4 x 3 ROM
Mme F.DJIDEL 47
• Exercise
We have a one-bit full adder which adds
between 3 variables a, b and c
1. Establish TV
2. give your ROM diagram
3. Determine ROM size
Mme F.DJIDEL 48
Exercise
Realise a comparator of two numbers on 2 bits
each using a ROM
A 1A 0 B 1B 0
Comparator
S I E
Mme F.DJIDEL 49