MICROPROCESSOR AND MICROCONTROLLER

INTRODUCTION TO MICROPEOCESSOR

MICROPROCESSOR BASICS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Assume that a code contains all the instructions of 1 bytes. In the execution of this code, the program counter was decremented erroneously after the decoding of an every instruction. Then
A
only one instruction will be executed repeatedly
B
no instruction will be executed
C
the two instructions will be executed repeatedly
D
atleast two instructions will be executed repeatedly
E
atmost two instructions will be executed repeatedly
Explanation: 

Detailed explanation-1: -For this purpose, there is a special register in the CPU called the instruction counter. After each instruction is performed, the CPU automatically updates the instruction counter with the address of the next instruction to be performed.

Detailed explanation-2: -The register which stores the address of the next instruction is called the program counter. Usually after each instruction is executed, the program counter increases by one (hence the use of the word counter) so that it contains the address of the next instruction.

Detailed explanation-3: -Data bus-carries the data between the processor and other components. The data bus is bidirectional .

Detailed explanation-4: -The CPU is designed to understand a set of instructions-the instruction set. It fetches the instructions from the main memory and executes them. This is done repeatedly from when the computer is booted up to when it is shut down. The CPU fetches the instructions one at a time from the main memory into the registers.

There is 1 question to complete.