Fetch.
Fetching
Machine cycle
The part of the processor that indicates which machine instruction is next in line for execution is called the Program Counter (PC). The Program Counter holds the memory address of the next instruction to be fetched and executed. After the current instruction is executed, the PC is updated to point to the subsequent instruction, ensuring the sequential flow of execution in a program.
fetch
• 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
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.
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.
When a program begins, the memory address of the first instruction is placed in a part of the microprocessor's control unit called the program counter (PC). The program counter keeps track of the address of the next instruction to be executed, ensuring the CPU can fetch and process instructions in the correct sequence. As each instruction is executed, the program counter is updated to point to the subsequent instruction in memory.
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.
Fetching an instruction refers to the process in which a computer's CPU retrieves an instruction from its memory to execute it. This is the first step in the instruction cycle, where the program counter points to the address of the instruction to be fetched. Once retrieved, the instruction is decoded and executed, allowing the CPU to perform the specified operation. This process is fundamental to how computers execute programs and manage tasks.
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
computer is electronic machine which understand binary language & the set of logical instruction is called program or application