Question Bank
Question Bank
(8051-Based)
Basic Concepts (1–25)
1. What is a microcontroller?
A microcontroller is a small computer on a single chip. It has a CPU, memory (RAM and ROM), and
input/output (I/O) ports to control devices in embedded systems like toys, appliances, or robots.
2. How is a microcontroller different from a microprocessor?
A microcontroller has built-in memory and I/O ports, making it ideal for specific tasks in embedded
systems. A microprocessor needs external memory and I/O components, used in general-purpose
systems like PCs.
3. What are the main uses of the 8051 microcontrollers?
The 8051 is used in automation (e.g., home appliances), embedded systems (e.g., sensors), and control
systems (e.g., motor control).
4. How many I/O ports does the 8051 have?
Four 8-bit ports: Port 0, Port 1, Port 2, and Port 3 (32 I/O lines total).
5. Which port handles both address and data?
Port 0 is used for multiplexed address and data when accessing external memory.
6. How many pins are on the 8051 microcontrollers?
40 pins, including power, ground, I/O, and control pins.
7. How much RAM does the 8051 have?
128 bytes of internal RAM for data storage.
8. How much ROM does the 8051 have?
4 KB of on-chip ROM (program memory) in the standard 8051.
9. Which pin resets the 8051?
Pin 9 (RST). A high signal for two machine cycles resets the microcontroller.
10. What does the ALE pin do?
Address Latch Enable (Pin 30) separates the address from the data on Port 0 during external memory
access.
11. What is the EA pin used for?
External Access (Pin 31): When high, the 8051 uses internal ROM; when low, it uses external ROM
for code.
12. What is the PSEN pin?
Program Store Enable (Pin 29) reads program code from external ROM.
13. Which instruction moves data between registers?
The MOV instruction (e.g., MOV R0, A moves data from Accumulator to R0).
14. Which instruction adds two numbers?
The ADD instruction (e.g., ADD A, R1 adds R1 to the Accumulator).
15. Name two arithmetic instructions.
ADD (addition) and SUBB (subtract with borrow).
16. Name two logical instructions.
ANL (logical AND) and ORL (logical OR).
17. Which instruction flips the bits in the Accumulator?
CPL A (complements the Accumulator, e.g., 1010 becomes 0101).
18. What does the Stack Pointer do?
The Stack Pointer (SP) points to the top of the stack in RAM, used to store data or return addresses
temporarily.
19. What is the Stack Pointer’s value after reset?
07H (points to address 07H in RAM).
20. Which register holds immediate data?
The Accumulator (A) often holds immediate data for operations.
21. What provides the clock for the 8051?
An external crystal oscillator, typically 11.0592 MHz, connected to pins 18 and 19 (XTAL1 and
XTAL2).
22. What is the Program Counter (PC)?
A 16-bit register that holds the address of the next instruction to execute.
23. What’s the difference between on-chip and off-chip memory?
On-chip memory (RAM/ROM) is inside the 8051; off-chip memory is external and connected via ports
and control pins.
Viva Question Bank: Microcontrollers and Applications
(8051-Based)
24. What is the DPTR register?
The Data Pointer (DPTR) is a 16-bit register used to address external memory or code memory.
25. What happens when the 8051 is powered on or reset?
The Program Counter resets to 0000H, and the microcontroller starts executing code from the reset
vector.