Lec 3
Lec 3
RAM (Random Access Memory): A type of data storage used in computers that is
generally located on the motherboard. This type of memory is volatile and all
information that was stored in RAM is lost when the computer is turned off.
Volatile memory is temporary memory while ROM (read-only memory) is non-
volatile and holds data permanently when the power is turned off.
Operating System
ii) Secondary Memory: Secondary memory is where programs and data are kept
on a long-term basis. Common secondary storage devices are the hard disk and
optical disks. Eg- Hard Disks, Floppy Disk, CD/DVD Disks.
Registers
Register are used to quickly accept, store, and transfer data and instructions that
are being used immediately by the CPU. These registers are the top of the memory
hierarchy, and are the fastest way for the system to manipulate data. Registers are
used by the CPU for Performing the Operations.
Types of Registers:
1. Memory Address Register (MAR): This register holds the address of memory
where CPU wants to read or write data. When CPU wants to store some data in the
memory or reads the data from the memory, it places the address of the required
memory location in the MAR.
2. Memory Buffer Register (MBR): This register holds the contents of data or
instruction read from, or written in memory. The contents of instruction placed in
this register are transferred to the Instruction Register, while the contents of data
are transferred to the accumulator or I/O register. In other words you can say that
this register is used to store data/instruction coming from the memory or going to
the memory.
3. I/O Address Register (I/O AR): I/O Address register is used to specify the
address of a particular I/O device.
Operating System
4. I/O Buffer Register (I/O BR): I/O Buffer Register is used for exchanging data
between the I/O module and the processor.
8. Flag Register (FR): The Flag register is used to indicate occurrence of a certain
condition during an operation of the CPU. It is a special purpose register with size
one byte or two bytes. Each bit of the flag register constitutes a flag (or alarm),
such that the bit value indicates if a specified condition was encountered while
executing an instruction. For example, if zero value is put into an arithmetic
register (accumulator) as a result of an arithmetic operation or a comparison, then
the zero flag will be raised by the CPU. Thus, the subsequent instruction can check
this flag and when a zero flag is "ON" it can take, an appropriate route in the
algorithm.