MICROPROCESSOR AND MICROCONTROLLER

INTRODUCTION TO MICROPEOCESSOR

MICRO PROCESSOR AND MICRO CONTROLLER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
If we push data onto the stack then the stack pointer
A
increases with every push
B
decreases with every push
C
increases & decreases with every push
D
none of the mentioned
Explanation: 

Detailed explanation-1: -Explanation: If we push elements onto the stack then the stack pointer increases with every push of element. Explanation: On power up register bank 0 is selected which has memory address from 00H-07H.

Detailed explanation-2: -PUSH Operation The PUSH means pushing or inserting an element into the stack. The PUSH operation always increments the stack pointer and the POP operation always decrements the stack pointer.

Detailed explanation-3: -The Stack Pointer (SP) register is used to indicate the location of the last item put onto the stack. When you PUT something ONTO the stack (PUSH onto the stack), the SP is decremented before the item is placed on the stack.

There is 1 question to complete.