0% found this document useful (0 votes)
19 views3 pages

Lecture 4

Registers are small memory locations within the CPU that can be read and written very quickly. They are used to store temporary values during computation but their contents are lost when power is removed. Main memory is larger than registers and located on the motherboard, used to store both programs and data. Disk memory is much larger than main memory and can retain data when powered off but is slower to access.

Uploaded by

shikha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views3 pages

Lecture 4

Registers are small memory locations within the CPU that can be read and written very quickly. They are used to store temporary values during computation but their contents are lost when power is removed. Main memory is larger than registers and located on the motherboard, used to store both programs and data. Disk memory is much larger than main memory and can retain data when powered off but is slower to access.

Uploaded by

shikha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Unit-01/Lecture-04

Memory Register

Registers are memories located within the Central Processing Unit (CPU). They are few in number
(there are rarely more than 64 registers) and also small in size, typically a register is less than 64
bits in size.

The contents of a register can be “read” or “written” very quickly however, often an order of
magnitude faster than main memory and several orders of magnitude faster than disk memory.

Different kinds of register are found within the CPU. General Purpose Registers are available for
general use by the programmer. Unless the context implies otherwise we’ll use the term
"Register" to refer to a General Purpose Register within the CPU. Most modern CPU’s have
between 16 and 64 General Purpose Registers. Special Purpose Registers have special uses and
are either nonprogrammable and internal to the CPU or accessed with special instructions by the
programmer.

Examples of such registers include:

 Program Counter/Instruction Pointer Register (PC/IP)


 Instruction Register (IR)
 ALU Input & Output Registers
 Condition Code (Status/Flags) Register
 Stack Pointer Register (SP)

Although Register Size (the size of the Register bit-group) tends to vary according to register type,
the Word Size of an Architecture is often (but not always!) defined by the Size of the General
Purpose Registers.

In contrast to Main memory and disk memory, registers are “addressed” directly by specific
instructions or by encoding a register number within a computer instruction. At the programming
(assembly) language level of the CPU, registers are normally specified with special identifiers (e.g.
R0, R1, R7, SP, PC)
A final point, the contents of a register are lost if power to the CPU is turned off, so registers are
unsuitable for holding long-term information or information that is needed for retention after a
power-shutdown or failure. Registers are however, the fastest memories, and if exploited can
result in programs that execute very quickly.

Main Memory (RAM)

If we were to sum all the bits of all registers within CPU, the total amount of memory probably
would not exceed 5,000 bits. Most computational tasks undertaken by a computer require a lot
more memory. Main memory is the next fastest memory within a Computer and is much larger in
size.

Typical main memory capacities for different kinds of computers are:

Personal Computer 256MB

Fileserver 4GB

Database Mainframe 32GB

Computer Architectures also impose an architectural constraint on the maximum allowable RAM.
This constraint is normally equal to 2WordSize memory locations

RAM (Random Access Memory) is the most common form of Main Memory. RAM is normally
located on the motherboard and so is typically less than 12 inches from the CPU. ROM (Read Only
Memory) is like RAM except that its contents cannot be overwritten. ROM memory is often used
to store the “boot” or start-up program that a computer executes when powered on.

Although slower than register memory, the contents of any location in RAM can still be “read” or
“written” very quickly. The time to read or write is referred to as the access time and is the same
for all RAM locations.

In contrast to register memory, RAM is used to hold both program code (instructions) and data
(numbers, strings etc). Programs that are running are normally “loaded” into RAM from a disk
prior to execution by the CPU.
Locations in RAM are identified by an addressing scheme e.g. numbering the bytes in RAM from 0
onwards. The contents of RAM are lost if the power is turned off.

Disk Memory

Disk memory is used to hold programs and data over the longer term. The contents of a disk are
NOT lost if the power is turned off. Disk capacities range from 2GB to over 40 GB (40 × 109). Disks
are much slower than Register and Main memory, the access-time to data on disk is typically
between 5 and 15 milliseconds (5 × 10-3 sec), although disks can typically transfer hundreds or
thousands of bytes in one go.

Disks can be housed internally within a Computer “box” or externally. There are also many kinds
of Disk unit, e.g: Magnetic Hard Disks, Floppy Disks (V. Slow), Magneto-Optical CD Roms/Disks,
DVDs.

Disk locations are identified by special disk addressing schemes (e.g. track and sector numbers).

Fig 1.6 Registers

You might also like