Egurukulrajasthan Android App
Chapter
3 Memory
Organisation
Computer organisation is the way in which the components are built in computers whereas Computer
architecture is the science of integrating those components to achieve a level of functionality and performance
this chapter we shall study a high level view of computer architecture that may be concerned with how the
central processing unit (CPU) acts and how it uses computer memory.
Computer Architecture is the field of study of selecting and interconnecting hardware components to create
computers that satisfy functional performance and cost goals. It refers to those attributes of the computer
system that are visible to a programmer and have a direct effect on the execution of a program.
Computer Architecture concerns with machine Organization, interfaces, application, technology, measurement
& simulation that Includes:
• Instruction set
• Data formats
• Principle of Operation
• Features (organization of programmable storage, registers used, interrupts mechanism, etc.)
In short, it is the combination of Instruction Set Architecture, Machine Organization and the related hardware.
Interconnection of Units
CPU sends data, instructions and information to the components inside the computer as well as to the peripherals
and devices attached to it. Bus is a set of electronic signal pathways that allows information and signals to
travel between components inside or outside of a computer.
The features and functionality of a bus are as follows
• A bus is a set of wires used for interconnection, where each wire can carry one bit of data.
• A computer bus can be divided into two types; internal bus and external bus.
• The internal bus connects components inside the motherboard like, CPU and system memory. It is also
called the system bus.
• The external bus connects the different external devices; peripherals, expansion slots, I/O ports and drive
connections to the rest of computer. It is also referred to as the expansion bus.
• The command to access the memory or the I/O device is carried by the control bus.
• The address of I/O device or memory is carried by the address bus. The data to be transferred is carried
by the data bus.
www.rajteachers.com
Egurukulrajasthan Android App
Memory Organisation 35
Instruction Cycle
The instruction cycle represents the sequence of events that takes place as an instruction is read from memory
and executed.
A simple instruction cycle consists of the following steps
• Fetching the instruction from the memory.
• Decoding the instruction for operation.
• Executing the instruction.
• Storing in memory.
Instructions Format
Computer understand instructions only in terms of 0s and 1s, which is called the machine language. A computer
program is a set of instruction that describe the steps to be performed for carrying out a computational task.
The processor must have two inputs; instructions and data.
The instruction tell the processor what actions are needed to be performed on the data. An instruction is divided
into two parts; operation (op-code) and operand.
The op-code represents action that the processor must execute and the operand defines the parameters of the
action and depends on the operation.
Memory Hierarchy
The hierarchical arrangement of storage in current computer architectures is called the memory hierarchy. It is
designed to take advantage of memory locality in computer programs. Each level of the hierarchy is of higher
speed and lower latency, and is of smaller size, than lower levels.
Following diagram shows memory hierarchy in a modern computer system
Registers
in the CPU
Cache
Main memory
Disk cache
Magnetic disk
Optical disk Magnetic tape
Faster Bigger
Speed Capacity
www.rajteachers.com
Egurukulrajasthan Android App
36 Memory Organisation
Memory OrganiSation
Computer memory is the storage space in computer where data is to be processed and instructions required
for processing are stored. The memory is divided into large number of small parts. Each part is called cell.
Each location or cell has a unique address, which varies from zero to memory size minus one.
some important definitions –
Accumulator and general and special purpose registers:
A CPU contains a number of register to store data temporarily during the execution of a program. The number
differ from processor to processor. Registers are classified as follows :
General Purpose Registers : These registers store data and intermediate results during the
execution of a program.
Accumulators : It is most efficient in data movement, arithmetic and logical operation. It has some
special features that the other general purpose registers do not have. After the execution of arithmetic and
logical instructions, the result is placed in the accumulator. All data transfer between the CPU and device/
port are performed through the accumulator.
Special Purpose Registers : A CPU contains a number of special purpose registers for different purpose.
These are
(i) Program Counter (PC) : The program counter keeps track of the address of the instruction
which is to be executed next. So it holds the address of the memory location, which contains the next
instruction to be fetched from the memory. Its contents is automatically incremented after an instruction
has been fetched.
(ii) Stack Pointer (SP) : The stack is a sequence of memory location defined by the user. It is used
to save the contents of a register if it is required during the execution of a program. the stack pointer
holds the address of the last occupied memory location of the stack.
(iii) Instruction Register : It holds an instruction until it is decoded. Some computers have two
types of instruction registers, and so they can fetch and save the next instruction while the execution
of the previous instruction is going on.
(iv) Memory Address Register : The memory address register holds the address of the next
memory location where the next instruction is to be executed. While the first instruction is being
executed, the address of the next memory location is held by it. The computer’s CPU uses the address
bus to communicate which memory address it wants to access, and the memory controller reads the
address and then puts the data stored in that memory address back onto the address bus for the CPU to
use.
Memory- Memory is made up of large number of cells.
(v) Memory Data Address : The memory data register (MDR) is the register of a computer’s control
unit that contains the data to be stored in the computer storage (e.g. RAM), or the data after a fetch from
the computer storage. It acts like a buffer and holds anything that is copied from the memory ready for
the processor to use it.
Memory is primarily of three types:
1. Cache Memory
2. Primary Memory/Main Memory
3. Secondary Memory
www.rajteachers.com
Egurukulrajasthan Android App
Memory Organisation 37
1. Cache Memory
CPU is much faster than memory. The problem comes when the CPU issues a memory request, it will not get
the data it need for many CPU cycles. The slower the memory the more cycles the CPU will have to wait.
This problem can be overcome by introducing a small and very fast memory near the CPU. The small, fast
memory is called. Cache memory is a very high speed semiconductor memory, which can speed up CPU. It
acts as a buffer between the CPU and main memory.
It is used to hold those parts of data and program which are most frequently used by CPU. The parts of data and
programs are transferred from disk to cache memory by operating system, from where CPU can access them.
Advantage :
• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.
• It stores the program that can be executed within a short period of time.
• It stores data for temporary use.
Disadvantage :
• Cache memory has limited capacity.
• It is very expensive
Buffer : It is a temporary physical storage used to hold data during execution of process from one place to
another.
2. Primary Memory (Main Memory)
Primary memory holds only those data and instructions on which computer is currently working. It has limited
capacity and data gets lost when power is switched off.
It is generally made up of semiconductor device. These memories are not as fast as registers. The data and
instructions required to be processed earlier reside in main memory.
It is divided into two subcategories: RAM and ROM.
Characteristic of Primary Main Memory
• These are semiconductor memories.
• It is known as main memory.
• Usually volatile memory.
• Data is lost in case power is switched off.
• It is working memory of the computer.
• Faster than secondary memories.
• A computer cannot run without primary memory.
COMPARISON BETWEEN RAM & ROM
Description RAM ROM
Definition Random Access Memory or Ram is a Read-only memory or ROM is also a form
form of data storage that can be accessed of data storage that can not be easily altered
randomly at any time, in any order and or reprogrammed. Stores instructions that are
from any physical location, allowing quick not necessary for rebooting up to make the
access and manipulation. computer operate when it is switched off.
They are hard wired.
Stands for Random Access Memory Read-only memory.
www.rajteachers.com
Egurukulrajasthan Android App
38 Memory Organisation
Use RAM allows the computer to read data ROM stores the program required to initially
quickly to run applications. It allows boot the computer. It only allows reading.
reading and writing.
Volatility RAM is volatile i.e. its contents are lost It is non-volatile i.e. its contents are retained
when the device is powered off. even when the device is powered off.
Types The two main types of RAM are The types of ROM include PROM, EPROM
static RAM and dynamic RAM. and EEPROM.
(i) RAM (Random Access Memory)
There are two types of Random Access Memory or RAM, each has its own advantages and disadvantages
compared to the other.
A. SRAM (Static RAM)
B. DRAM (Dynamic RAM)
Comparison between SRAM (Static Random Access Memory) and DRAM (Dynamic
Random Access Memory):
SRAM DRAM
Definition It is a type of RAM. SRAM essentially uses It is also a type of RAM. DRAM makes use of
latches to store charge. capacitors to store bits in the form of charge.
Speed Faster Slower
Size Bigger Smaller
Cost More expensive per bit Less expensive per bit
Capacity Less 5 to 10 times more than SRAM
(same
technology)
Applications Generally in smaller applications like CPU Commonly used as the main memory in
cache memory and hard drive buffers personal computers
Types Asynchronous SRAM Fast Page Mode DRAM
Synchronous SRAM Extended Data Out DRAM
Pipeline Burst SRAM Burst EDO DRSSM
Synchronous DRAM
Power Less More
Consumption
(ii) ROM (Read Only Memory)
ROM has further classified into three types.
Each type has unique characteristics, but all types of ROM memory have two things in common they are:-
• Data stored in these chips is non-volatile i.e it is not lost when power is removed.
• Data stored in these chips is either unchangeable or requires a special operation to change.
A. Programmable Read-Only Memory (PROM) : This form of ROM is initially blank. The user or
manufacturer can write data/program on it by using special devices. However, once the program or data is
written in PROM chip, it cannot be changed. If there is an error in writing instructions or data in PROM,
the error cannot be erased. PROM chip becomes unusable.
www.rajteachers.com
Egurukulrajasthan Android App
Memory Organisation 39
B. Erasable Programmable Read-Only Memory (EPROM) : This type of ROM can have its contents
erased by ultraviolet light and then reprogrammed by user/manufacturer. This procedure can be carried
out many times; however, the constant erasing and rewriting will eventually render the chip useless.
C. Electrically Erasable Programmable Read-Only Memory (EEPROM) : This type of ROM works in
a similar way to Flash memory in that it can its contents can be ‘flashed’ for erasure ad then written to
without having to remove the chip from its environment. EEPROMs are used to store a computer system’s
BIOS, and can be updated without returning the unit to the factory. In many cases, BIOS updates can be
carried out by computer users wishing a BIOS update.
Flash Memory
Flash memory is an example of quite a recent type of storage technology known as solid state devices.
This type of portable storage has become very popular because of its low price and high storage capacity
compared to its rivals, e.g. floppy disk.
Solid state devices are regarded as being robust and reliable because they have no moving parts with the data
stored in semiconductor chips. This technology already exists in the form of flash memory used to store the
Basic Input/Output System (BIOS) of a motherboard.
Unlike ROM, flash memory can be read form and written to and unlike RAM does not require power to retain
its data. Although these devices typically cannot hold as much data as hard disks, CD-ROMs and DVDs, the
storage capacity is continually increasing.
Virtual Memory
Virtual memory is a technique that allows the execution of processes which are not completely available in
memory. The main visible advantage of this scheme is that programs can be larger than physical memory.
Virtual memory is the separation of user logical memory from physical memory.
This separation allows an extremely large virtual memory to be provided for programmers when only a
smaller physical memory is available. Following are the situations, when entire program is not required to
be loaded fully in main memory. User written error handling routines are used only when an error occured
in the data or computation. Certain options and features of a program may be used rarely. Many tables are
assigned a fixed amount of address space even though only a small amount of the table is actually used.
3. Secondary Memory (Auxillary Memory)
The size of the main memory is very small if large data need to be stored in it. Further, the main memory is
volatile in nature i.e. the contents are lost when power supply is stopped. To overcome these another memory
is used in a computer system called secondary memory or the auxiliary memory. This is large as well as non-
volatile in nature. This type of memory is also known as external memory or non-volatile. It is slower than
main memory. These are used for storing Data/Information permanently.
CPU directly does not access these memories, instead they are accessed via input-output routines. Contents
of secondary memories are first transferred to main memory and then CPU can access it. For example, disk,
CD-ROM, DVD, etc.
Characteristics of Secondary Memory
• These are magnetic and optical memories.
• It is known as backup memory.
• It is non-volatile memory.
• Data is permanently stored even if power is switched off.
• It is used for storage of the data in the computer.
• Computer may run without secondary memory.
• Slower than primary memories.
www.rajteachers.com
Egurukulrajasthan Android App
40 Memory Organisation
Storage Devices
Storage devices are also called storage media. It is a hardware device that can hold information. Two main
storage devices are used in computers. The primary storage device also known as RAM and the secondary
storage device such as a computer hard drive. Secondary storage can be either internal or external storage.
Storage device is required by the computer to save any settings or additional information.
Following are the different types of computer Storage Devices/Secondary memories –
Secondary Memory devices includes:
A. Magnetic Disks : Magnetic disks play two roles in computer systems:
• Long-term, nonvolatile storage for files, even when no programs are running
• A level of the memory hierarchy below main memory used as a backing store for virtual memory
during program execution
A magnetic disk consists of a collection of platters (generally 1 to 12), rotating on a spindle at 3,600 to
15,000 revolutions per minute (RPM). These platters are metal or glass disks covered with magnetic
recording material on both sides, so 10 platters have 20 recording surfaces. The disk surface is divided
into concentric circles, called tracks. Each track in turn is divided into sectors. A sector is the smallest
unit that can be read or written.
B. Optical Disks : Optical disks are another type of secondary memory. Many types of optical disks are
available in the market like CD(Compact disks), DVD (Digital versatile disks) etc. CD-R are write once
CDs i.e. data can be written to them only once. CD-RW on the other hand are rewritable CDs i.e. data
can be written and erased many times. Similar variations DVD-R and DVD-RW are also available in the
market.
C. Magnetic Tape : Magnetic tape is a long and narrow strip of plastic that thin magnetic material is coated
on. Nearly all recording tape is of this type, whether used for recording audio or video or computer data
storage.
Magnetic tape recording uses magnetic tape which moves on a recording head. Electrical signals are fed
to the recording head, inducing a pattern of magnetization similar to the signal. A playback head can then
pick up the changes in magnetic field from the tape and convert it into an electrical signal.
D. Floppy diskette : A Floppy Disk Drive is a computer disk drive that helps a user to save data to removable
diskettes. 8 inch disk drives were first made available in 1971, which were later replaced with 3 ½ inch
floppy disk drives. Due to the limited capacity and reliability of floppy diskettes in many computers they
are no longer used with floppy disk drives . They are being replaced with CD-R, other writable discs, and
flash drives.
E. CD-ROM disc : Compact Disc-Read Only Memory, CD-ROM drives or optical drives are CD players
inside computers that can have speeds in the range from 1x and beyond, and have the capability of playing
audio CDs and computer data CDs.
F. CD-R and CD-RW disc : It is also called as a CD writer, CD-WO (Write once), WORM (Write Once
Read Many) drive. CD-R is used for CD-Recordable and is a writable disc and drive that is capable of
having information written to the disc once and then having that disc read many times after that. If the
data is not written to the disc properly, has errors, or has the incorrect information that disc or portions
of that disc cannot be erased and is often jokingly referred to as a coaster.
G. Recordable DVD (Digital video Disk) drives : These DVD drives are alternatively referred to as a DVD
writer, recordable DVD drives. The recordable DVD drives are capable of creating DVD discs. They
are different from recordable CD drives as they have many different competing standards for creating
DVD discs. For example, DVD-R, DVD-RW, DVD + R, DVD + RW, DVD + R DL (DVD + R9), and
DVD-RAM are all different competing standards.
www.rajteachers.com
Egurukulrajasthan Android App
Memory Organisation 41
(i) DVD-R DVD-R is called as Digital Versatile Disc-Recordable. DVD-R has features similar to CD-
R, where the drive is capable or recording once to a disc and then read many times after it has been
created. DVD-R is an approved standard by DVD Forum and the drives are capable of recording to
DVD-R discs. These discs are also known as DVD-5 and DVD -10. DVD-R discs are compatible
with most stand alone DVD players and computer DVD-ROM drives.
(ii) DVD-RW (DVD-R/W) These are called as Digital Versatile Disc-Read/Write. DVD-RW is an
approved standard by DVD Forum.It is based on a technology that enables a user to read and write
to a DVD-RW or DVD-R disc several times. DVD-RW discs are compatible with most stand-alone
DVD players and computer DVD-ROM drives.
H. Jump drive and USB flash drive : USB flash drive is a portable drive that is as small as the size of your
thumb. Other such portable drives include data stick, pen drive, keychain drive ,thumb drive .It connects
to the computer USB port. Flash drives are available in different sizes such as 256MB, 512MB, 1GB,
5GB, and 16GB . They can easily store and transfer information.
A flash drive is used by inserting it onto the front or back of USB port or hub. After inserting the flash
drive , open the My Computer , you can see as “Removeable Disk”, “Flash drive”, or as the manufacturer’s
name. When the drive has been identified , data can be copied onto the flash drive by a simple copy paste
or just dragging and dropping onto the flash drive icon.
I. Hard Drive : It is called as the hard disk drive. It is represented sometimes by its short name as HD
or HDD. It is the computer’s main storage area that permanently stores the data on to the computer. It
consists of one or more hard drive platters inside of air sealed casing. The hard drives are contained in
an internal drive bay at the front of the computer . They connect to the mother board using ATA, SCSI
or a SATA cable .
J. Memory card : These are referred to as a flash memory card or a memory card . The memory card type
of storage media is used in digital cameras, digital camcorders, handheld computers,printers , MP3 players
and cell phones. They can store a huge number of pictures, videos, music, and other data. MicroSD flash
memory card is one such example of a memory card . There are a number of different types of memory
cards in the market that vary in size, compatibility, and storage capacity.
K. Memory stick : Sony Memory Stick was first invented by Sony in October 1998 . It is a flash memory
card used with Sony digital cameras . This flash memory card is used with other Sony products also. The
capacity of the Memory Sticks range from sizes of 4MB to 256GB . They can have maximum capacity
of 2TB, although till now the sticks of this capacity have not been produced .
Tape cassette
A tape cassette is magnetically thin coated piece that is wrapped with plastic around wheels. These are
capable of storing data. Tape is far cheaper than other storage mediums but is much slower than the jump
drives , memory sticks etc . Tapes are not much in use these days for faster and more reliable solutions like
disc drives, hard drives, and flash drives.
L. Zip Diskette : Zip Diskette are made out of a much harder plastic and are much bigger than the standard
floppy diskette. Zip drive is a medium capacity removable floppy disk storage system. Zip drives are not
much in use because of need of mass portable storage .
M. Blue ray disk : Blu-ray (not Blue-ray) also known as Blu-ray Disc (BD), is the name of a new optical
disc format jointly developed by the Blu-ray Disc Association (BDA), a group of the world’s leading
consumer electronics, personal computer and media manufacturers (including Apple, Dell, Hitachi, HP,
JVC, LG, Mitsubishi, Panasonic, Pioneer, Philips, Samsung, Sharp, Sony, TDK and Thomson). The
format was developed to enable recording, rewriting and playback of high-definition video (HD), as well
as storing large amounts of data. The format offers more than five times the storage capacity of traditional
DVDs and can hold up to 25GB on a single-layer disc and 50GB on a dual-layer disc. This extra capacity
combined with the use of advanced video and audio codecs will offer consumers an unprecedented HD
experience.
www.rajteachers.com
Egurukulrajasthan Android App
42 Memory Organisation
Secondary Memory Device and their storage Method and capacity.
Secondary memory Device Storage Method Capacity
Floppy disk (5.25 inch) Magnetic 1.2 MB
Hard Disk Magnetic upto 1 T B
CD-ROM optical 640 MB to 680 MB
DVD-ROM optical 4.7 GB to 17 GB
Pen-Drive solid state 1 GB to 512 GB
Magnetic Tape Magnetic upto 1 TB
Memory Management Table
Approximate/Actual Values
Unit Abbreviation Approximate Actual
Bit b (common 'b') 0 or 1
Byte B (Capital 'B') 8 bites
Kilobytes KB 1000 bytes 1024 bytes
Megabte MB All 1 million bytes 1024 KB
upper
Gigabyte GB 1 billion bytes 1024 MB
cases
Terabyte TB 1 trillion bytes 1024 GB
Petabyte PB 1015 Bytes 1024 TB
Exa Byte EB 1018 Bytes 1024 PB
Zetta Byte ZB 1021 Bytes 1024 EB
Yotta Byte YB – 1024 ZB
Bronta Byte BB – 1024 YB
Important Measurement :
1 Bit = Binary digit
The term ‘Bit’ is short for Binary digit.
1 Nibble = 4 Bits
8 bits = 1 Byte = 2 Nibble
www.rajteachers.com