Lec 07 23102023 122733pm

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

Computing Fundamentals

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)

 CPU is considered as the brain of the computer.


 CPU performs all types of data processing operations. It stores data, results, and instructions
(program).
 It controls the operation of all parts of the computer.
CPU itself has the following three components −
1. ALU (Arithmetic Logic Unit)
2. Memory Unit
3. Control Unit
Memory or Storage Unit
 This unit can store instructions, data, and intermediate results.
 It is also known as internal storage unit or the main memory or the primary storage or Random
Access Memory (RAM).
 Functions of the memory unit are −
1. It stores all the data and the instructions required for processing.
2. It stores intermediate results of processing.
3. It stores the final results of processing before these results are released to an output device.
4. All inputs and outputs are transmitted through the main memory.
Control Unit
This unit controls the operations of all parts of the computer but does not carry out any actual data
processing operations.

Functions of this unit are −


1. It is responsible for controlling the transfer of data and instructions among other units of a
computer.
2. It manages and coordinates all the units of the computer.
3. It obtains the instructions from the memory, interprets them, and directs the operation of the
computer.
4. It communicates with Input/Output devices for transfer of data or results from storage.
5. It does not process or store data.
ALU (Arithmetic Logic Unit)

This unit consists of two subsections namely,


1. Arithmetic Section
2. Logic Section
Arithmetic Section
Function of arithmetic section is to perform arithmetic operations like addition, subtraction,
multiplication, and division. All complex operations are done by making repetitive use of the
above operations.
Logic Section
Function of logic section is to perform logic operations such as comparing, selecting, matching,
and merging of data.
Overall: Functionalities of a Computer
In a very broad sense, any digital computer carries out the following five functions −
Step 1 − Takes data as input.
Step 2 − Stores the data/instructions in its memory and uses them as required.
Step 3 − Processes the data and converts it into useful information.
Step 4 − Generates the output.
Step 5 − Controls all the above four steps.
Memory
Types of Memories
1. Cache Memory
2. Primary Memory/Main Memory
3. Secondary Memory
Cache Memory
 It is used to hold those parts of data and program which are most frequently used by the CPU.

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 −

Static RAM (SRAM)


Dynamic RAM (DRAM)
Static RAM (SRAM)
 Memory retains its contents as long as power is being supplied.
 data is lost when the power gets down.

Characteristic of Static RAM……

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…..

Slower as compared to SRAM


Used as RAM
Less expensive
Difference SRAM and DRAM
SRAM DRAM
SRAM cells are constructed using flip-flops DRAM cells consist of a capacitor and a transistor.
SRAM is faster than DRAM DRAM has longer access times
SRAM consumes more power as it uses transistors DRAM consumes less power due to its simpler cell
to store data. structure, but it needs periodic refreshing.
SRAM is more expensive DRAM is more cost-effective and widely used as the
main memory in most computers.
SRAM is commonly used in cache memory DRAM is used as the main system memory in
computers.
NVRAM
 Nonvolatile (sometimes written as "non-volatile") storage (NVS) - also known as nonvolatile
memory or nonvolatile random access memory (NVRAM).
Is a form of static RAM whose contents are saved when a computer is turned off or loses its
external power source.
NVS is implemented by providing static RAM with backup battery power.
Secondary Memory
This type of memory is also known as external memory or non-volatile.
It is slower than the main memory.
These are used for storing data/information permanently.
Data is permanently stored even if power is switched off.
MROM (Masked ROM)

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)

You might also like