Fetch.
Fetching
Machine cycle
fetch
A machine code program. Machine code is the native language of the machine and the only language actually understood by the machine. However, program instructions can be written using a high-level programming language that the computer can translate into machine code using another machine code program called a compiler.
• The processor fetches the instruction from memory • Program counter (PC) holds address of the instruction to be fetched next • PC is incremented after each fetch • Fetched instruction loaded into instruction register
Program is a set of instruction whereas process is program in execution. Program is passive entity whereas process is active entity .Program has single instance whereas process has several instances.For eg.several notepad windows can be opened but same program is executed behind each window. Program is dependent on logic used whereas process is dependent on program.
The only part of a program a computer understands is each instruction as it is presented to the instruction decoder. It understands the instruction by an intricately designed logic circuit and/or microprogram configured by a human computer hardware engineer. This engineer had to fully understand the instruction set of the machine to teach it to understand the instructions one at a time at runtime.
The process by which program code is converted into machine language is called?
Assembly is signficantly shorter and easier to remember than the equivilant machine instructions. Assembly instructions are human readable characters, for which a direct translation exists to the binary machine code instructions. Pseudo example: add <- assembly instruction 1010101010 <- machine instruction
when we execute a program, the starting address is loaded in the program counter. Then for each instruction the processor goes through fetch-decode-execute states. At the fetch state the instruction code is fetched then decoded to understand what exactly has to be done. Then finally it executes that instruction. This process goes on till it reaches the end of the program.
define program i. program means set of instruction which are required for a particular type of task is called program ii. set of instruction or commands which are given for the computer to do different activity or jobs or works is called program define programming the process of creating/modifying a program; some people's job, others' hobby
computer is electronic machine which understand binary language & the set of logical instruction is called program or application