























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Chanchal Mahanthapa delivered this lecture at Chandra Shekhar Azad University of Agriculture and Technology for Programming and Computer Architecture. It includes: Data, Manipulation, Program, Execution, CPU, JUMP, Instruction, Fetch, Execute, Decode
Typology: Slides
1 / 31
This page cannot be seen from the preview
Don't miss anything!
























docsity.com
A computer follows a program stored inits memory by copying the instructionsfrom memory into the CPU as needed.
Once in the CPU, each instruction isdecoded and obeyed.
The order in which the instructions arefetched from the memory corresponds tothe order in which the instructions arestored in the memory unless there is aJUMP instruction.
docsity.com
Fetch:
◦
Each instruction is two bytes long, fetchprocess involves retrieving the contents of thetwo memory cells from the main memory.
◦
CPU places the instruction received from thememory in its instruction register and thenincrements the program counter by two.
◦
The counter contains the address of the nextinstruction stored in the memory.
◦
Thus the program counter will be ready forthe next fetch.
docsity.com
Decode:
◦
The instruction now in the instructionregister, the CPU decodes the instruction,which involves breaking the operand field intoits proper components based on theinstruction’s op-code.
Execute:
◦
CPU then executes the instruction byactivating the appropriate circuitry toperform the requested task.
docsity.com
B258:
◦
JUMP to the instruction at address 58 if the contentsof register 2 is the same as that of register 0.
◦
We will start by comparing the values in register 2and 0.
◦
If the contents are different bits, the execution stepterminates and the next machine cycle begins.
◦
If the contents are equal than the machine places thevalue 58 in its program counter during the executestep.
◦
Next fetch step finds 58 in the program counter, soinstruction at that address will the next instruction tobe fetched and executed.
docsity.com
docsity.com
We first need to put the programsomewhere in the memory.
For our example, suppose the program isstored in consecutive addresses, startingat address A0(hexadecimal).
With the program stored in this manner, we can cause the machine to execute itby placing the address(A0) of the firstinstruction in the program counter andstarting the machine.
docsity.com
The program stored in main memory ready forexecution
docsity.com
docsity.com
Notice that, in our machine, instructionsare 16bits(two bytes) long.
Thus entire instruction to be fetchedoccupies the memory cells at bothaddress A0 and A1.
CPU is designed to take this into accountso it retrieves the content of both cellsand places the bit pattern received in theinstruction register which is 16 bit long.
docsity.com
At the end of the fetch step of the firstmachine cycle, the program counter andinstruction register contain the followingdata:
◦
Program Counter:A
◦
Instruction Register: 156C
docsity.com
docsity.com
Operating System Architecture
To understand the composition of atypical operating system we need to firstconsider the complete spectrum ofsoftware found within a typical computersystem.
Then we will concentrate on theoperating system itself.
docsity.com
Microsoft Window’s operating systems
◦
Group of programs called “Accessories” and“Administrative Tools”.
These are called
application and utility classes.
Machine software categories:
◦
Application Software
◦
System Software
docsity.com