01 how does computer execute a program
DESCRIPTION
Computer Engineering (1st year , 1st Semester)TRANSCRIPT
01 How does Computer Execute a Program?
ByDarshit ShahPandit Deendayal Petroleum University
IndexSystemArchitecture of CPUBasic Tasks Performed By CURAMTypes of RAMROMTypes of ROMMotherboardComponents of Motherboard.Exit
SystemWe are part of different Systems.Every systems have few things in common.
◦Input◦Process◦Output
Example: Our Human Body◦Input: Food◦Process: at stomach◦Output: Energy to Body/Blood/etc.
Computer System
INPUT PROCESS OUTPUT
KEYBOARD C.P.U. MONITOR
C.P.U.KEYBOARD
MONITORC.U.
A.L.U.
Cache Memory
Primary Memory
ROMRAM Auxiliary Memory
Floppy DisksHard Disk
CD/Pen Drive
C.P.U.KEYBOARD
MONITORC.U.
A.L.U.
Cache Memory
Auxiliary Memory
Floppy DisksHard Disk
CD/Pen Drive
RAMOS ProgramsProgram Area
INPUT A,BC = A + BPRINT C
Data AreaA B C
10 20 30
Basic Tasks Performed By CUFetch the instruction (from RAM)Check for Errors:
◦Syntax Error: Grammatical Error e.g. IPUT A,B
◦Semantic Error: Incomplete Statemente.g. INPUT
Execute the Instruction(if no error found)
And Many More.
Cache MemoryInside CPUWorks at the speed of CPUAnd hence the fastest memoryCPU searches for the data in Cache Memory first. If
not found, then it will extract that data from RAM.Two types of Cache Memory:
◦L1 Level 1within CPU. (Fixed)◦L2 Level 2 On the Mother Board. (Size can be
increased or decreased)In terms of Speed: L1 > L2 > RAM > Hard DiskIn terms of Storage: L1 < L2 < RAM < Hard
Disk
ROMIt stands for Read Only Memory.It is a non-volatile memory i.e. contents of ROM
are not lost even when we switch off the computer.A backup UPS is not required.The programs (micro codes) are written for
once in ROM during manufacturing.These programs are not available to normal
programmers directly.It is used to hold programs, which are needed
frequently e.g. Code Conversion, Character Generation, Function Generation (sin(), cos(),etc)etc.
Types of ROM: PROM, EPROM, EEPROM
Types of ROMPROM: It stands for Programmable Read Only Memory. It can be programmed only once with a PROM-Writer, thereafter it
can’t be altered.EPROM: It stands for Erasable Programmable Read Only
Memory. It can be electrically programmed multiple times. Erasure is performed by exposing the chip to Ultra-Violet light
(Sunrays). It is useful for experimental projects & prototypes in which the data
may have to be changed after the chips have been programmed.EEPROM: It stands for Electrically Erasable Programmable Read
Only Memory. Now the data can be erased, and reprogrammed by applying
appropriate electrical charges. It is useful for data that needs to be read frequently but changed
only occasionally, such as a price list stored in an electronic cash register.
RAM It stands for Random Access Memory. It is a volatile memory i.e. the contents of RAM are lost
when the computer’s power is shut off.A backup UPS is desirable in order not to lose the data. It is constructed with Metal-Oxide-Semiconductor. It retains the program & data that are currently being
executed. It is called RAM because access time in RAM is
independent of the address of the word i.e. each storage location inside the memory is as easy to reach as any other location & it takes the same amount of time.
Any Program that we want to run in a computer must be loaded in the program area of RAM.
Types of RAM: Dynamic RAM, Static RAM.
Types of RAMDRAM: It stands for Dynamic Random Access
Memory.Each memory cell quickly loses its charge. So it
must be refreshed hundreds of times every seconds to prevent data from being lost.
The computer does this refreshing process itself, taking time out from other chores every few milliseconds.
It will read all RAM memory positions while they are still readable and put appropriate new charge on each capacitor.
Some DRAM memory circuits include built-in “refresh circuit” to relieve the computer.
It consumes lesser power than Static Ram.
Types of RAMStatic RAM: Static RAM is also faster,
larger & more expensive than DRAM.It is Static because it doesn’t need
to be continually refreshed.It is used in a special area of
memory called a cache.
What is Motherboard?It is the main circuit board on the
computer. Motherboard acts as a direct
channel for the various components to interact & communicate with each other.
If the CPU is compared to the human brain, then the motherboard can be compared to the nerve system.
Components of Motherboard CPU - Through the use of Socket-7 or Slot-1. Memory Chips (RAM, ROM, Cache, BIOS, CMOS etc). Buses (wires connecting devices attached to the
motherboard) Expansion Slots (where other expansion cards are
inserted. (SIMM (Single Inline Memory Module)/DIMM (Dual Inline Memory Module) Slots, PCI Slots, AGP Slots )
Power Supply Connectors.(SMPS) Ports (Parallel, Serial) Connectors (IDE-Integrated Drive Electronics for Hard
disk and floppy drive connectors) USB – (Universal Serial Bus), PS/2 – (Personal System/2)
connectors