In a computer system memory is a physical device, that is used to
store, retain, acquire and retrieve data and information. Primary
memory used to store data only in a execution time.
The memory device contains different cells, every cell contains a
unique location. Data and information are stored in these unique
locations.
It stores all types of data like raw data (given input by the user),
intermediate results and final results are stored in memory. It may
be or may not be store data permanently. There are mainly 2 types
of primary memory. However, if we considered Cache Memory, it is
of 3 types.
RAM > Random Access Memory
RAM (Random Access Memory), contains one or multiple memory
modules that store data temporarily.
It is also called volatile memory because data get erased when the
computer is turned off. It holds data and instruction frequently
during processing. When we are launching the software, then it is
loaded into RAM.
Why it is called RAM?
It randomly select any location of memory to store and retrieve
data.
What is RAM used for?
Random Access Memory (RAM) is the most important
component in the computer system, for determining a
system’s performance. It gives uses a place to store and
retrieve data on short-term basis.
Types of Random Access Memory (RAM)
DRAM
DRAM stands for Dynamic RAM, It is the most important part of RAM
used in computers. It has a better performance and is a more
energy-efficient memory unit. It consist of a transistor and capacitor.
There is a faster dual data rate(DDR) in DRAM. New versions of DDR
are DDR2, DDR3, and DDR4. New versions are of better
performance and more energy-efficient than.
SRAM
It stands for Static RAM, It is also one common type of RAM used in a
computer system. It bigger in size and is costly having six transistors
in each cell.
It is only used for data cache within a CPU itself or as RAM in the
high-speed server system.
It is a semiconductor memory, highly used in electronics, microprocessors, and others using
computing for general purposes. This type of memory gains its name from the fact that data is
held statically.
While the data in the SRAM memory does not need to be refreshed dynamically, it is still
volatile, meaning that when the power is removed from the memory device, the data is not
held, and will disappear.
Difference between SRAM
and DRAM
RAM DRAM
It Stands for Static RAM. It stands for dynamic RAM.
The refreshing circuit is needed.
Does not require a refreshing circuit. It loses data or instruction when the
computer is turned off.
It stores voltage as a bit. It stores bit as the charge.
It is more expensive. It is cheaper in cost.
DRAM uses capacitors and very few
SRAM uses transistors and latches.
transistors.
It is widely used on the processor or
The DRAM is placed on the
kept between the main memory and
motherboard.
processor
DRAM is available in a larger
SRAM is of a smaller size. (e.g. 1 MB to
storage capacity. ( e.g. 1GB to 16
16 MB)
GB)
SRAM has lower access time, which is DRAM has a higher access time. It
faster compared to DRAM. is slower than SRAM.
ROM > Read Only Memory
ROM is a primary memory. It stores some standard processing programs to operate the PC.
Processers only read the content of ROM but cannot change the content.
It is also called a flash memory chip, that contains a small amount of
memory which may be permanent or semi-permanent data.
Types of Read-Only Memory (ROM):
PROM
It stands for programmable read-only memory. In this memory,
data can be written only once and will remain there forever.
It can retain its content when the computer is turned off. PROM is
manufactured in an empty state and then programmed later using
PROM Programmer or burner.
EPROM
It stands for Erasable programmable read-only memory, In this
memory can be erased by exposing it to ultraviolet light. Ultraviolet
light clears its contents, marking it possible to reprogrammed
memory.
EEPROM
It stands for Electrically erasable programmable read-only
memory, Same as EPROM but it erases content by exposing it to
electrical charge and then can be reprogrammed.
It retains its content when the power is turned off. It is like flash
memory. However, It requires data to be written and erased one
byte at a time. This makes it faster than flash memory.
Difference between RAM and
ROM
RAM ROM
ROM is a non-volatile memory because it
RAM is a volatile memory.
can retain data.
Data stored can be retrieved and Stored data can only be read.
altered.
RAM is used to store data that the CPU
It stores the instructions required during
needs for current instruction
the bootstrap of the computer system.
processing.
It is a high-speed memory. It is much slower in comparison to RAM
The CPU can access the data stored on
The CPU can not access the data.
it.
Higher capacity with large size. Less capacity with Small size.
The data stored is easily accessible. The data stored is not as easily accessible.
RAM is used as CPU Cache, Primary ROM is used as firmware by
Memory. microcontrollers.
Cache Memory
Cache memory is the fastest memory type that is kept
between RAM and CPU. It holds addresses of all the frequently
requested data and instructions, which can be available immediately
when needed to the CPU.
Cache Memory
It is used to hold those part of data and program which are most
frequently used by the CPU. Cache is divide into three parts (L1, L2,
and L3) depending upon system architecture.
Cache has a high-speed storage area that is used during reading
and writing processes from the disk.
Buffer Memory
Buffer memory is used to adjust the difference in speed between
two processes/devices that exchange or use data.
Buffer is a normal storage area on RAM for temporary storage. It is
mostly used for input/output instructions. It works in these areas
(RAM) where the CPU can store data temporarily. It can be part of
the primary memory or some other area like a hard disk.
buffer memory
Difference between Buffer
and Cache
Buffer Cache
Buffer is used to adjusting the A cache is a smaller and fastest memory
difference in speed between two component in the computer which can
processes that exchange or use hold the address of the frequently running
data. programs.
It is used during reading and writing
It is used for input/output
processes from the disk in a computer
processes.
system.
It is a normal storage area on ram It is a high-speed storage area for
for temporary storage. temporary storage.
It is made from DRAM. It is made from SRAM.
It does not increase accessing It increases the accessing speed of the
time. CPU.
The CPU and Its Connections
Control Unit (CU)
The control unit, abbreviated CU, directs the flow of operations within the
processor. It can communicate with all of the other components of the
processor and computer and directs the action. It is responsible for
decoding the commands sent to it and passing instructions along in the
processor. This component is responsible for sending the
"Fetch command, decodingthe instruction, and sending commands on
how to execute the instruction.
Arithmetic Logic Unit (ALU) and Floating
Processing Unit (FPU)
The ALU and FPU do all of the math that makes up the core of almost
every computer program (whether you know it or not). ALUs are used to
do math on integers, including addition, subtraction, multiplication, and
comparison, as well as logical operations (which we will discuss later).
FPUs are used to do math on decimals and numbers in scientific notation.
There may be other special mathematics units as well in some processors,
but these are the most common types. We will learn more about HOW the
ALU does some of its math in a later unit. Most of the steps in
the Execute section of they cycle happen here.
Registers
In our previous section, we mentioned CPU registers as tiny memory
circuits that live directly in the CPU to hold the data being used
right now but the processor. There are three types of registers you should
understand. NOTE: The IB exam explicitly states that only the MDR and
MAR will be tested, but its hard to understand how processors work
without thinking about all five register types below.
1. General Purpose Registers
Registers that can hold one piece of data, usually 32 or 64 bits in
size, for a short amount of time as directed by a program directly.
These are used to temporarily hold values until the ALU can get
around to performing operations on them, usually for no more than
a few millionths of a second.
2. MAR - Memory Address Register
These registers hold only one thing - an address in memory where a
piece of data will either be retrieved or stored. An address is simply
a number that tells the computer where to go in the memory to find
a piece of data. The MAR doesn't ever hold the data itself, only the
location where it will be found!
3. MDR - Memory Data Register
These registers hold the actual data pulled from memory or that will
soon be put back into memory at the spot stored in the MAR.
Combined with the MAR, they work as a buffer, a temporary storage
place for data between the memory and the processor; this is
necessary to make it possible for the memory and processor to work
somewhat independently.
4. CIR - Current Instruction Register This register holds the data
needed for the current instruction. It is copied from the MDR at the
appropriate time.
5. The Accumulator This register holds the result of the current
operation in the ALU until is told where to put it (another register, or
in the MDR to go to memory)
Cache and RAM
These were already addressed a bit in Section 1.2. All of the data that will
be used by the processor during its operation, including the instructions
for the program currently being run, are stored in the primary memory,
a.k.a. the cache and RAM combo.
Buses
A bus is a dedicated physical connection inside a computer whose
purpose is to carry data very quickly between components of a computer,
with as few separate wires as possible. Think of it like a highway traveled
by buses that can drop passengers (data) off at any of several separate
stops. The data bus, address bus, control bus, and I/O bus carry
information between the important elements of the computer as shown.
The data bus carries data, the address bus carries information about
where the data should be stored, and the control bus carries information
about how, when, and where to move the data. The I/O bus carries
information from input and output devices, after passing through a
standalond separate chip called the I/O chip.
IMPORTANT QUESTIONS:
Q1. Outline the role of the memory data register in the machine
execution cycle.
Q2. Outline the purpose of the memory address register (MAR) in the
central processing unit (CPU).
Q3. State the part of the central processing unit (CPU) that is
responsible for carrying out calculations.
FLASHCARDS
Central Processing Unit (CPU)
Control Unit (CU)
Arithmetic Logic Unit (ALU)
Floating Point Unit (FPU)
register
data bus
MAR (Memory Address Register)
MDR (Memory Data Register)
address bus
IMPORTANT LINKS FOR MORE
QUESTION AND ANSWERS
https://ib.compscihub.net/paper-1/topic-2