Microprocessors and Microcontrollers MCQ Quiz - Objective Question with Answer for Microprocessors and Microcontrollers - Download Free PDF

Last updated on Jul 10, 2025

Latest Microprocessors and Microcontrollers MCQ Objective Questions

Microprocessors and Microcontrollers Question 1:

How does the 8051 microcontroller access external memory?

  1. By using direct addressing
  2. By using immediate addressing
  3. By using register addressing
  4. By using indirect addressing through DPTR

Answer (Detailed Solution Below)

Option 4 : By using indirect addressing through DPTR

Microprocessors and Microcontrollers Question 1 Detailed Solution

Explanation:

The 8051 microcontroller accesses external memory primarily through indirect addressing using the Data Pointer (DPTR).

Here's why:

  • DPTR (Data Pointer): The DPTR is a 16-bit register in the 8051 that holds the 16-bit address of the external memory location to be accessed.

  • MOVX Instruction: The 8051 uses special instructions like MOVX (Move External) to read from or write to external data memory. For example, MOVX A, @DPTR moves data from the external memory location pointed to by DPTR into the accumulator.

  • Indirect Addressing: This method is called indirect addressing because the instruction doesn't directly specify the memory address but rather uses the content of a register (DPTR) as the address.

While the 8051 also has direct, immediate, and register addressing modes, these are primarily for accessing internal memory (RAM, SFRs) or for immediate data operations, not for accessing external memory.

Therefore, the correct option is: By using indirect addressing through DPTR

Microprocessors and Microcontrollers Question 2:

Which ports are mainly utilised for address and data lines when interfacing external RAM with the 8051 microcontroller?

  1. Port 1 and Port 3
  2. Port 2 and Port 3
  3. Port 0 and Port 3 
  4. Port 0 and Port 2

Answer (Detailed Solution Below)

Option 4 : Port 0 and Port 2

Microprocessors and Microcontrollers Question 2 Detailed Solution

The correct answer is option 4

Explanation:

When interfacing external RAM with the 8051 microcontroller, the 8051 needs to output address and data signals to the external memory.

The 8051 uses:

  • Port 0: Multiplexed lower 8 bits of address (A0–A7) and data bus (D0–D7).
    (This is why an external latch is needed to demultiplex address & data.)

  • Port 2: Outputs the higher 8 bits of address (A8–A15) directly.

Microprocessors and Microcontrollers Question 3:

The Address of the Accumulator register in the 8051 Microcontroller is _____.

  1. 0E0h
  2. 92h
  3. 0B0h
  4. 82h

Answer (Detailed Solution Below)

Option 1 : 0E0h

Microprocessors and Microcontrollers Question 3 Detailed Solution

Explanation:

The Accumulator Register in the 8051 Microcontroller

Definition: The accumulator register in the 8051 microcontroller is a special-purpose register used extensively in arithmetic, logical, and data transfer operations. It acts as an intermediary for computation and is integral to the functioning of the microcontroller. The accumulator is denoted by the symbol "A" and is widely used in instructions for performing operations such as addition, subtraction, logical comparisons, and data transfers.

Address of the Accumulator Register: The accumulator register in the 8051 microcontroller has a specific address within the Special Function Register (SFR) memory space. The correct address for the accumulator register is 0E0h. This hexadecimal address is reserved for the accumulator in the microcontroller's architecture.

Explanation of Correct Option:

Option 1: 0E0h

The accumulator register in the 8051 microcontroller is located at the address 0E0h. This address falls within the SFR memory space, which ranges from 80h to FFh in the 8051 architecture. The SFRs are a specific set of memory locations used to control and monitor the microcontroller's operations. The accumulator register, being a core part of the 8051's functionality, is assigned to the address 0E0h for direct access during computations and instructions.

The accumulator is involved in almost every arithmetic and logical operation performed by the microcontroller. For instance, when an addition operation is executed, one operand is typically stored in the accumulator, and the result is also stored there. This makes the accumulator a pivotal element in the microcontroller's operation.

Microprocessors and Microcontrollers Question 4:

The 8051 Microcontroller is packaged in a _____ pin DIP.

  1. 42
  2. 45
  3. 40
  4. 35

Answer (Detailed Solution Below)

Option 3 : 40

Microprocessors and Microcontrollers Question 4 Detailed Solution

The correct answer is option 3

Concept:

  • 8051 is an 8-bit (data bus) microcontroller built with 40 pins DIP (dual inline package).
  • 8051 has internal RAM (128 Bytes) and ROM (4K Bytes).
  • Of the 128-byte internal RAM, only 16 bytes are a bit-addressable. The rest must be accessed in byte format.
  • Additional Information

    The Block Diagram of an 8051 microcontroller is as shown:

    In an 8051 microcontroller,

  • Internal RAM (data memory) - 128 bytes
  • Internal memory (code memory) - 4 kB (ROM)
  • Timer/counter - 2
  • No. of interrupt - 5
  • I/O pins - 32
  • Serial port - 1

Microprocessors and Microcontrollers Question 5:

The Port ______ in the 8051 microcontroller has no dual functions.

  1. 1
  2. 2
  3. 3
  4. 0

Answer (Detailed Solution Below)

Option 1 : 1

Microprocessors and Microcontrollers Question 5 Detailed Solution

Detailed Solution: Port 1 in the 8051 Microcontroller

The 8051 microcontroller, a popular choice in embedded systems, has several ports, each with its own unique functionalities. Understanding the capabilities and limitations of these ports is critical for designing efficient and reliable systems. In this detailed analysis, we will delve into the features of the ports in the 8051 microcontroller, particularly focusing on Port 1, and explain why it is the correct answer to the question regarding dual functions.

Introduction to 8051 Microcontroller Ports

The 8051 microcontroller consists of four parallel I/O ports: Port 0, Port 1, Port 2, and Port 3. Each of these ports can be used for various input and output operations, and some of them have dual functions.

  • Port 0: This is a dual-purpose port. When used for external memory interfacing, it acts as a multiplexed address and data bus. In other applications, it can be used as a general-purpose I/O port.
  • Port 1: This port is unique in the sense that it does not have any dual functions. It is exclusively used for general-purpose I/O operations, which makes it simple and straightforward to use.
  • Port 2: Similar to Port 0, Port 2 also serves dual purposes. While it can be used for general I/O operations, it also functions as the high-order address bus in external memory interfacing.
  • Port 3: This is a highly versatile port with multiple dual functions. In addition to being a general-purpose I/O port, it can handle several control signals like interrupts, serial communication signals, timer inputs, and read/write control signals for external memory.

Top Microprocessors and Microcontrollers MCQ Objective Questions

The Size of internal RAM of 8051 Microcontroller is?

  1. 128 Bytes
  2. 256 Bytes
  3. 16 Bytes
  4. 64 Bytes

Answer (Detailed Solution Below)

Option 1 : 128 Bytes

Microprocessors and Microcontrollers Question 6 Detailed Solution

Download Solution PDF

Architecture of 8051 Microcontroller

  • It is an 8-bit microcontroller.
  • It is built with 40 pins DIP (dual inline package), 4kb of ROM storage and 128 bytes of RAM storage, and 2 16-bit timers.
  • It consists of four parallel 8-bit ports, which are programmable and addressable as per the requirement. An on-chip crystal oscillator is integrated into the microcontroller having a crystal frequency of 12 MHz.
  • The system bus connects all the support devices to the CPU.
  • The system bus consists of an 8-bit data bus, a 16-bit address bus, and bus control signals.
  • All devices like program memory, ports, data memory, serial interface, interrupt control, timers, and the CPU are interfaced together through the system bus.

In 8051, Pin number 30 is used:

  1. To control the signal to enable the external memory
  2. To control the demultiplexing address and data bus
  3. for I/O ports
  4. for the interface of external devices

Answer (Detailed Solution Below)

Option 2 : To control the demultiplexing address and data bus

Microprocessors and Microcontrollers Question 7 Detailed Solution

Download Solution PDF

8051 microcontroller is a 40-Pin DIP (dual in-line package).

  • PIN 30 is called ALE (address latch enable). It is used to control the demultiplexing of address and data bus.
  • PIN 31 is called external Access Enable (EAE) Pin and used for external program memory access.
  • PIN 29 is called program store enable (PSEN) Pin and is used to read external program memory.
  • PIN 18 and 19 are used to control clock pulse generated by a quartz crystal oscillator.


Important Points:

PIN Diagram of 8051 Microcontroller.

NOTE: PORT 0 to 3, all bidirectional input / output pins.

8051 can access up to ______ of program memory and ______ of external data memory.

  1. 64 KB, 32 KB
  2. 32 KB, 64 KB
  3. 64 KB, 64 KB
  4. 16 KB, 64 KB

Answer (Detailed Solution Below)

Option 3 : 64 KB, 64 KB

Microprocessors and Microcontrollers Question 8 Detailed Solution

Download Solution PDF

A maximum of 64 KB of Program Memory (ROM) and Data Memory (RAM) each can be interface with the 8051 Microcontroller.

Specification of 8051:

  • 4 KB bytes on-chip program memory (ROM)
  • 128 bytes on-chip data memory (RAM)
  • 4 register banks
  • 128 user-defined software flags
  • 8-bit bidirectional data bus
  • 16-bit unidirectional address bus
  • 32 general-purpose registers each of 8-bit
  • 16-bit Timers (usually 2, but may have more or less)
  • Three internal and two external Interrupts
  • Four 8-bit ports,(short model have two 8-bit ports)
  • 16-bit program counter and data pointer

The 8051 can handle ______ interrupt sources.

  1. 3
  2. 4
  3. 6
  4. 5

Answer (Detailed Solution Below)

Option 4 : 5

Microprocessors and Microcontrollers Question 9 Detailed Solution

Download Solution PDF

Explanation:

An interrupt is an event that occurs randomly in the continuation of something depending upon call priority, you decide whether to neglect or attend it.

8051 architecture handles 5 interrupt sources, out of which two are internal (Timer interrupts), two are external and one is a serial interrupt. Each of their interrupts has its vector address.

The highest interrupt priority upon reset in 8051 is external interrupt 0.

Priority

Interrupt source

Interrupt Bit / flag

1

External Interrupt 0

INT 0

2

Timer Interrupt 0

TF 0

3

External Interrupt 1

INT 1

4

Timer Interrupt 1

TF 1

5

Serial Interrupt

TI / RI

Hence option (4) is the correct answer.

As per 8051 interrupt priority, the lowest priority interrupts are not served until the microcontroller is finished with higher priority interrupts.

Which of the following are the two 16 bit SFRs of Microcontroller 8051?

  1. PC, DPTR
  2. SP, PSW
  3. SP, DPTR
  4. PC, SP

Answer (Detailed Solution Below)

Option 1 : PC, DPTR

Microprocessors and Microcontrollers Question 10 Detailed Solution

Download Solution PDF

Microcontroller 8051:

  • Microcontrollers are embedded inside devices to control the action and feature of a product or equipment.
  • So they can also be referred to as embedded controllers. They run one specific program and are dedicated to a single task.
  • They are low power devices with dedicated input devices and small LED or LCD display outputs.
  • Microcontroller 8051 is designed by Intel in 1981.
  • It is an 8-bit microcontroller. It is built with 40 pins DIP (Dual inline package), 4 KB of ROM storage and 128 bytes of RAM storage, two 16-bit times.
  • It consists of four parallel 8-bit parts, which are programmable as well as addressable as per the requirement.

 

Features of 8051 Microcontroller:

  •  4 KB on-chip program memory (ROM)
  •  128 bytes on-chip data memory (RAM)
  •  Four register lanks
  •  8-bit bidirectional data bus
  •  16-bit unidirectional address bus
  •  32 general purpose registers each of 8-bit
  •  16 bit timers

 

Applications of microcontroller 8051:

  •  Automobiles
  •  Aeronautics
  •  Space
  •  Robotics
  •  Electronics
  •  Defence application
  •  Mobile communication
  •  Rail transport
  •  Industrial processing
  •  Medical application

 

SFR’s (special function registers):

  • There are 21 SFR’s (special function registers) in microcontroller 8051. The SFR is the upper area of addressable memory, from address OX80 to OXff.
  • These SFR’s contain all peripherally related register like P0, P1, P2, P3, timers or counters, serial part and interrupt related registers.
  • DPTR – Data pointer is the 8051’s only user-accessible 16 bit (2 - byte) register. DPTR is meant for pointing to data. It is used by the 8051 to access external memory using the address indicated by DPTR. It is used to stone 2-byte value.
  • 16-bit data pointer is physically the combination of DPL (Data Pointer Low) and DPH (Data Pointer High) SFRs.
  • The data pointer can be used as a single bit (16-bit) register (as DPTR) or two 8-bit registers as DPL and DPH.

 

PSW (Program status word register)

  • It is an 8-bit register.
  •  It is also referred to flag register.
  •  It contains status bits that reflect the current CPU state.
  •  Although PSW register is 8-bit wide, only 6-bits of it are used by the 8051 microcontroller. The two unused bit are user-definable flags.

 

Stock pointer (SP):

  • The register used to access the stack is known as stock pointer register.
  •  It is 8-bits wide and can take value of 00 to FFH.
  •  When 8051 is initialized, the SP register contains the value of 07H which means the RAM location 08 is the first location used for the stock
  •  It tells the location focus where the nth value is to be removed from the stock.
  •  When a value is pushed onto the stack, the value of SP is incremented and then the value is stored at the resulting memory location.
  •  When a value is popped off the stock, the value is returned from the memory location indicated by SP, and then the value of SP is decremented.

 

PC (Program counter):

  • It is a two byte (16-bit) address which tells the 8051 where the next instruction to execute can be found in the memory.
  • PC starts at 0000H when 8051 initializes and is incremented every time after an instruction is executed.
  • PC is not always incremented by 1 since same instructions may require 2 or 3 bytes, in such cases, PC will be incremented by 2 or 3.
  • Branch, Jump and Interrupt operations load the PC with an address other than the next sequential location.

 

Note:

Registers

Bits

DPTR

16 bits

PC

16 bits

SP

8 bits

PSW

8 bits

Name of the register which stores the address of the next instruction to be executed in 8085 in microprocessor

  1. Stack pointer
  2. Accumulator
  3. Program counter
  4. Index register

Answer (Detailed Solution Below)

Option 3 : Program counter

Microprocessors and Microcontrollers Question 11 Detailed Solution

Download Solution PDF

Program counter (PC):

  • The program counter acts as a pointer to the next instruction to be executed and always contains the 16-bit address of the memory location of the next instruction
  • It is a 16-bit register as 8085 has 16 address lines
  • The program counter is updated by the processor and points to the next instruction after the processor has fetched the complete instruction.

Stack Pointer:

  • Stack Pointer is also a special purpose register that is used to point the location of the top of the stack.
  • Since location is specified using 16 bits, the stack pointer is a 16-bit register.

Accumulator: An accumulator is a register in which intermediate, arithmetic and logic results are stored.

8051 has _______ special function registers.

  1. 21
  2. 8
  3. 16
  4. 11

Answer (Detailed Solution Below)

Option 1 : 21

Microprocessors and Microcontrollers Question 12 Detailed Solution

Download Solution PDF

Explanation:

Microcontroller 8051:

  • Microcontrollers are embedded inside devices to control the action and feature of a product or equipment.
  • So they can also be referred to as embedded controllers. They run one specific program and are dedicated to a single task.
  • They are low power devices with dedicated input devices and small LED or LCD display outputs.
  • Microcontroller 8051 is designed by Intel in 1981.
  • It is an 8-bit microcontroller. It is built with 40 pins DIP (Dual inline package), 4 KB of ROM storage and 128 bytes of RAM storage, two 16-bit times.
  • It consists of four parallel 8-bit parts, which are programmable as well as addressable as per the requirement.


FR’s (special function registers):

  • There are 21 SFR’s (special function registers) in microcontroller 8051. The SFR is the upper area of addressable memory, from address OX80 to OXff.
  • These SFR’s contain all peripherally related register like P0, P1, P2, P3, timers or counters, serial part and interrupt related registers. Hence option (1) is the correct answer.

How many 16 bit registers are there in 8051?

  1. 8
  2. 1
  3. 4
  4. 2

Answer (Detailed Solution Below)

Option 4 : 2

Microprocessors and Microcontrollers Question 13 Detailed Solution

Download Solution PDF
  • 8051 microcontroller consists of four register banks, such as Bank 0, Bank 1, Bank 2, Bank 3 which are selected by the PSW (Program Status Word) register.
  • 8051 has 32 general-purpose registers and the size of each register is 8-bit.
  • It has two 16-bit registers and they are the data pointer (DTPR) and the program counter (PC).
  • The Block Diagram of an 8051 microcontroller is as shown:

    In an 8051 microcontroller:

    • Internal RAM (data memory) - 128 bytes
    • Internal memory (code memory) - 4 kB
    • Timer/counter - 2
    • No. of interrupt - 5
    • I/O pins - 32
    • Serial port - 1

The function of ALE signal in 8051 microcontroller is

  1. To extend the memory capacity
  2. To control demultiplexing the address and data bus.
  3. To distinguish between external RAM and PROM
  4. To initialize parallel port

Answer (Detailed Solution Below)

Option 2 : To control demultiplexing the address and data bus.

Microprocessors and Microcontrollers Question 14 Detailed Solution

Download Solution PDF

ALE:

The Pin 30 of 8051 microcontroller is used for ALE that is Address Latch Enable.

  • It is an active-high input control signal.
  • ALE signal is used for demultiplexing the multiplexed Address/Data bus of Port 0 during external memory interfacing.
  • In each machine cycle, there are 2 ALE pulses
  • ALE is also used to check whether the device is working or not.

Which of the following is a Non-volatile Memory

  1. RAM
  2. DRAM
  3. EEPROM
  4. Cache

Answer (Detailed Solution Below)

Option 3 : EEPROM

Microprocessors and Microcontrollers Question 15 Detailed Solution

Download Solution PDF

Non-volatile memory is the type of computer memory that can hold the saved data even if the power is off.

Few examples of non-volatile memory are EEPROM (Electrically Erasable Programmable Read-Only Memory), ROM, hard disk, floppy disk, etc.

Of the given option only EEPROM is a non-volatile memory the rest are volatile memories. 

  • SRAM (static RAM) is random access memory (RAM) that retains data bits in its memory as long as power is being supplied.
  • Inside a dynamic RAM chip, each memory cell holds one bit of information and is made up of two parts: a transistor and a capacitor.
  • As DRAM has a capacitor, it continuously leaks current. Therefore it requires frequent refresh which consumes power.
  • The volatile memories are those which hold data only for a shorter period of time.
  • Cache and main memory hold it till the power is on and do not retain it afterward. So those are volatile memories.

Hot Links: teen patti club apk teen patti classic teen patti master online