Lec 07 23102023 122733pm
Lec 07 23102023 122733pm
Lec 07 23102023 122733pm
Instruction cycle
The machine cycle is a 3 process cycle that includes reading and interpreting the machine
language, executing the code and then storing that code.
Three steps of Instruction cycle
1. Fetch - The control unit requests instructions from the main memory that is stored at a
memory’s location as indicated by the program counter (also known as the instruction
counter).
2. Decode - Received instructions are decoded in the instruction register. This involves breaking
the operand field into its components based on the instruction’s operation code (opcode).
3. Execute - This involves the instruction’s opcode as it specifies the CPU operation required.
The program counter indicates the instruction sequence for computer. These instructions are
arranged into the instructions register and as each are executed, it increments the program
counter so that the next instruction is stored in memory. Appropriate circuitry is then
activated to perform the requested task.
As soon as instructions have been executed, it restarts the machine cycle that begins the
fetch step.
CPU
CPU (Central Processing Unit)
Advantages
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.
Disadvantages
Cache memory has limited capacity.
It is very expensive.
Primary Memory (Main Memory)
Primary memory holds only those data and instructions on which the computer is currently
working.
It has a limited capacity and data is lost when power is switched off.
It is divided into two subcategories…
1. RAM and
2. ROM.
RAM types
RAM is of two types −
Faster
Used as cache memory
Expensive
Dynamic RAM (DRAM)
DRAM is used for most system memory as it is cheap and small.
All DRAMs are made up of memory cells, which are composed of one capacitor and one
transistor.
Characteristics of Dynamic RAM…..
The very first ROMs were hard-wired devices that contained a pre-
programmed set of data or instructions
PROM (Programmable Read Only
Memory)
PROM is read-only memory that can be modified only once by a user. The user
buys a blank PROM and enters the desired contents using a PROM program.
It can be programmed only once and is not erasable.
EPROM (Erasable and Programmable
Read Only Memory)
It can be erased and re-used. By shining an intense ultraviolet light through a
window that is designed into the memory chip help to erase data
EEPROM (Electrically Erasable and
Programmable Read Only Memory)