Microprocessors MCQ Quiz - Objective Question with Answer for Microprocessors - Download Free PDF
Last updated on Jun 24, 2025
Latest Microprocessors MCQ Objective Questions
Microprocessors Question 1:
In an 8085 microprocessor based system the active low chip select signal of the 2K*8 RAM is connected to the address line A15. The RAM address lines are connected to A10 - A0. What is the highest address which accesses a location in the RAM?
Answer (Detailed Solution Below)
Microprocessors Question 1 Detailed Solution
Concept:
The size of the RAM is 2K × 8, meaning it has 2K = 2048 locations. This requires 11 address lines (since 211 = 2048), which are connected to A10 to A0.
The chip select is active-low and connected to address line A15. For the RAM to be selected, A15 must be 0.
Calculation:
Total address lines in 8085 = 16 (A15 to A0)
Since only A10 to A0 go to RAM, and A15 must be 0 (for active-low chip select), the remaining upper address bits A14 to A11 can be any combination (i.e., 0000 to 1111).
To get the highest possible address within RAM: set A15 = 0 (active), A14 to A11 = 1111, and A10 to A0 = 11111111111
\( \text{Address} = 0\text{FFF} + 7FF = 7FFF_H \)
Final Answer:
Option 2) 7FFFH
Microprocessors Question 2:
In a microprocessor, wait status are used to
Answer (Detailed Solution Below)
Microprocessors Question 2 Detailed Solution
Explanation:
Microprocessors are typically designed to operate at very high speeds, often exceeding the speed at which external components like memory or peripherals can operate.
When the processor attempts to access these slower components, it may need to pause or "wait" until the components are ready to complete the operation.
During these pauses, the microprocessor enters a wait state, during which it temporarily suspends its execution cycle. Once the memory or peripheral device signals that it is ready, the microprocessor resumes its operation.
Importance of Wait States:
- Ensures Data Integrity: Wait states allow proper synchronization between the microprocessor and slower devices, ensuring that data is accurately transferred and processed.
- Facilitates Compatibility: By accommodating slower memory and peripheral devices, wait states enhance the compatibility of the microprocessor with a wide range of external components.
- Prevents Overruns: Without wait states, the microprocessor might attempt to access data before the slower devices are ready, leading to data overruns or errors.
Applications: Wait states are widely used in microprocessors and microcontrollers for interfacing with:
- Slow-speed memory devices such as EPROMs and DRAMs.
- Peripheral devices like I/O ports, ADCs (Analog-to-Digital Converters), and timers.
- Communication interfaces such as UARTs (Universal Asynchronous Receiver-Transmitters).
Hence the correct option is 4
Microprocessors Question 3:
In a microprocessor, the register to hold address of next instruction to be fetched is
Answer (Detailed Solution Below)
Microprocessors Question 3 Detailed Solution
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.
Microprocessors Question 4:
Assuming carry flag is initially '0' and both registers A and B has values 50 H, how many times the NOP instruction will be executed if following code is executed in 8085 microprocessor?
BACK : NOP
ADD B
RLC
JNC BACK
HLT
Answer (Detailed Solution Below)
Microprocessors Question 4 Detailed Solution
Concept:
This problem involves understanding the effect of the ADD
, RLC
(Rotate Left), and JNC
(Jump if No Carry) instructions on the accumulator (register A) and the carry flag in the 8085 microprocessor.
Given:
Initial values:
A = 50H = 0101 0000 (binary)
B = 50H
Carry flag = 0
Code Execution:
Label: BACK → NOP
Just a No Operation instruction. It is executed every time the loop begins.
ADD B
A = A + B = 50H + 50H = A0H = 1010 0000 (binary)
Carry flag remains 0 because sum is within 8-bit range (≤ FFH)
RLC (Rotate Left Accumulator)
A = A0H = 1010 0000
RLC rotates bits left and MSB goes to LSB and also to Carry.
So: 0100 0001 = 41H
Carry = MSB of A0H = 1
Now A = 41H, Carry = 1
JNC BACK
This instruction jumps to BACK only if Carry = 0.
But Carry = 1 now, so it will NOT jump, and proceeds to next instruction.
HLT
Halts the program.
Conclusion:
Since the loop was executed only once before carry became 1, the NOP
instruction is executed only once.
Microprocessors Question 5:
What will be the content in register A, after execution of following code in 8051? (Suffix H denotes hexadecimal number)
CLR A
MOV RO, #77H
CPL A
XRL A, RO
MOV A, RO
Answer (Detailed Solution Below)
Microprocessors Question 5 Detailed Solution
Explanation:
Step-by-Step Execution:
1. CLR A:
The "CLR A" instruction clears the accumulator register A, setting its content to 00H. After this instruction, the value of register A becomes:
A = 00H
2. MOV R0, #77H:
The "MOV R0, #77H" instruction moves the immediate value 77H into register R0. Now, the value of register R0 becomes:
R0 = 77H
3. CPL A:
The "CPL A" instruction complements the contents of register A bit by bit. Since A = 00H (all bits are 0), complementing it will result in FFH (all bits are 1). After this instruction, the value of register A becomes:
A = FFH
4. XRL A, R0:
The "XRL A, R0" instruction performs a bitwise XOR operation between the contents of register A and register R0. XOR operation rules are as follows:
- 0 XOR 0 = 0
- 0 XOR 1 = 1
- 1 XOR 0 = 1
- 1 XOR 1 = 0
Currently:
A = FFH (binary: 11111111)
R0 = 77H (binary: 01110111)
Performing XOR, we get:
11111111 (A)
01110111 (R0)
Result: 10001000 (binary) = 88H
After this instruction, the value of register A becomes:
A = 88H
5. MOV A, R0:
The "MOV A, R0" instruction moves the contents of register R0 into register A. Now, the value of register A becomes:
A = 77H
The correct answer is: Option 3: 77H
Top Microprocessors MCQ Objective Questions
What is the size of internal data memory in an 8051 microcontroller?
Answer (Detailed Solution Below)
Microprocessors Question 6 Detailed Solution
Download Solution PDF- 8051 is an 8-bit 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 bit-addressable. The rest must be accessed in byte format.
Notes:
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
The main purpose of Accumulator register of 8085 is
Answer (Detailed Solution Below)
Microprocessors Question 7 Detailed Solution
Download Solution PDFRegisters in 8085 are primarily used to store temporary data.
General Purpose Registers:
- There are six 8-bit registers B, C, D, E, H, L. Each register contains 8 flip-flops hence, each register can store a maximum of 8 bit (1 Byte) of data.
- For storing data greater than 8 bits, these registers are used in pairs. There are three register pairs: BC pair, D – E pair, HL pair
- Each register pair can store a maximum of 16 bits of data (2 Byte).
Accumulator:
- It is an 8-bit register that contains 8 flip-flops. It can store a maximum of 8 bits of data.
- The importance of the accumulator is that, in most of the 8-bit arithmetic and logical operations, the microprocessor will always take the first 8-bit number from the accumulator.
Temporary Registers:
- There are three 8-bit registers W, X, and Z.
- Each register can store a maximum of 8 bits of data.
- These registers cannot be used or accessed by the programmer.
- These registers can be used only by the microprocessor for executing its operation i.e., the microprocessor will use these registers for the temporary storage of data.
- For storing 16-bit data W – Z pair can be used by the microprocessor.
What is the content of accumulator of 8085 microprocessor after the execution of XRI F0 H instruction?
Answer (Detailed Solution Below)
Microprocessors Question 8 Detailed Solution
Download Solution PDF- XRI F0H is used to complement the upper four bits of the accumulator in 8085.
- XRI 0FH is used to complement the lower four bits of the accumulator in 8085.
- ANI F0H is used to clear the lower four bits of the accumulator in 8085.
- ANI 0FH is used to clear the upper four bits of the accumulator in 8085.
Which of the following are temporary registers in 8085?
Answer (Detailed Solution Below)
Microprocessors Question 9 Detailed Solution
Download Solution PDFRegisters in 8085:
Registers are a type of computer memory used to quickly accept, store, and transfer data and instructions that are being used immediately by the processor.
Types of registers:
1.) General purpose registers:
- The 8085 has six general-purpose registers to store 8-bit data; these are identified as- B, C, D, E, H, and L.
- These can be combined as register pairs – BC, DE, and HL, to perform some 16-bit operation.
- These registers are used to store or copy temporary data, by using instructions, during the execution of the program.
2.) Specific purpose registers:
a.) Accumulator:
- The accumulator is an 8-bit register (can store 8-bit data) that is the part of the arithmetic and logical unit (ALU).
- After performing arithmetical or logical operations, the result is stored in accumulator.
- Accumulator is also defined as register A.
b.) Flag registers:
- These registers change their values as per the result of arithmetic operation.
- The 5 flag registers are: Sign flag, Carry flag, Auxiliary flag, Parity flag, Zero flag.
3.) Temporary registers:
- W and Z are two 8-bit temporary registers of 8085 microprocessor, which is not accessible to the user.
- They are exclusively used for the internal operation by the microprocessor.
4.) Memory registers:
- There are two 16-bit registers used to hold memory addresses: Stack pointer and Program counter
8085 microprocessors has ________ individual flags during arithmetic and logic operations.
Answer (Detailed Solution Below)
Microprocessors Question 10 Detailed Solution
Download Solution PDFThere is an 8-bit flag register out of which only 5 bits are used
D7 |
D6 |
D5 |
D4 |
D3 |
D2 |
D1 |
D0 |
Sign Flag |
Zero Flag |
× |
Auxiliary Carry Flag |
× |
Parity Flag |
× |
Carry Flag |
How many dual-purpose ports are there in the 8051 microcontroller?
Answer (Detailed Solution Below)
Microprocessors Question 11 Detailed Solution
Download Solution PDFPorts in 8051:
- There are 4 ports in 8051 IC (Port 0, Port 1, Port 2 and Port 3); 32 pins function as I/O port lines and 24 of these lines are dual-purpose (P0, P1, P3).
- Each can operate as I/O, or as a control line or part of the address or data bus.
- Eight lines in each port can be used in interfacing to parallel devices like printers, DAC, etc., or each line the port can be used in interfacing to single bit devices like LED’s, switches, transistors, solenoid, motors, and loudspeakers.
Important:
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
What is the length of SP (stack pointer)?
Answer (Detailed Solution Below)
Microprocessors Question 12 Detailed Solution
Download Solution PDFStack Pointer:
- The stack pointer in the 8085 microprocessor is a 16-bit register that stores the address of the top of stack memory.
- The value of the stack pointer is decremented by 2 in the PUSH operation.
- It will increment by 2 in POP operation.
In 8085 microprocessor, the first machine cycle of every instruction is:
Answer (Detailed Solution Below)
Microprocessors Question 13 Detailed Solution
Download Solution PDFInstruction cycle in 8085 microprocessor
The time required to execute and fetch an entire instruction is called the instruction cycle.
The seven Machine Cycle in 8085 Microprocessor are :
1.) Opcode Fetch Cycle:
In this Machine Cycle in 8085, the processor places the contents of the Program Counter on the address lines, and through the reading process, reads the opcode of the instruction.
2.) Memory Read Cycle:
The 8085 executes the memory read cycle to read the contents of R/W memory or ROM.
In this Machine Cycle in 8085, the processor places the address on the address lines from the stack pointer, general-purpose register pair, or program counter, and through the reading process, reads the data from the addressed memory location.
3.) Memory Write Cycle:
The 8085 executes the memory write cycle to store the data in data memory or stack memory.
The processor places the address on the address lines from the stack pointer or general-purpose register pair and through the writing process, stores the data in the addressed memory location.
4.) I/O Read:
The I/O Read cycle is executed by the processor to read a data byte from the I/O port or from the peripheral, which is I/O, mapped in the system.
5.) I/O Write:
The microprocessor uses the I/O Write machine cycle for sending a data byte to the I/O port or to the peripheral in I/O mapped I/O systems.
6.) Interrupt Acknowledge Cycle:
In response to the INTR signal, 8085 executes an interrupt acknowledge machine cycle to read an instruction from the external device.
7.) Bus Idle Cycle:
Bus cycle of 8085 is used to access memory, peripheral devices (Input/Output devices), and Interrupt controller.
Carry flag is not affected after the execution of
Answer (Detailed Solution Below)
Microprocessors Question 14 Detailed Solution
Download Solution PDFADD: Add Register to Accumulator
Description: The content of the operand (register or memory) are added to the contents of the accumulator and the result is stored in the accumulator. If the operand is a memory location, that is indicated by the 16-bit address in the HL register.
Flags: All flags are modified to reflect the result of the addition.
INR: Increment Register Pair by 1
Description: The contents of the designated register/memory are incremented by 1 and the results are stored in the same place. If the operand is a memory location, it is specified by the contents of HL register pair.
Flags: S, Z, P, AC are modified to reflect the result of the operation. CY is not modified.
SBB: Subtract Source and Borrow from Accumulator
Description: The contents of the operand (register or memory) and the Borrow flag are subtracted from the contents of the accumulator and the results are placed in the accumulator. The contents of the operand are not altered; however, the previous Borrow flag is reset.
Flag: All flags are altered to reflect the result of the subtraction.
Important:
Different arithmetic instructions and the flags affected are mentioned below:
Instruction |
S |
Z |
AC |
P |
Cy |
INR, DCR |
Yes |
Yes |
Yes |
Yes |
No |
DAD |
No |
No |
No |
No |
Yes |
ADD, ADC, SUB, SBB, DAA |
Yes |
Yes |
Yes |
Yes |
Yes |
RAL, RLC, RAR, RRC |
No |
No |
No |
No |
Yes |
At the output, the content of A is:
MOV A,#33H
ORL A,#01H
ANL A,#10H
Answer (Detailed Solution Below)
Microprocessors Question 15 Detailed Solution
Download Solution PDFConcept:
- MOV A,#33H: This command will store the hexadecimal data 33H in the accumulator.
- ORL A,#01H: This command will OR the hexadecimal data 01H with accumulator data and store the resultant data in the accumulator.
- ANL A,#10H: This command will AND the hexadecimal data 10H with accumulator data.
Calculation:
- During OR operation, if any of the two inputs will be high, then the output will be high.
- During AND operation, if any of the two inputs will be low, then the output will be low.