Microprocessors · Digital Electronics
22 questions · asked in 13 of 26 years (2001–2026)
MCQ 20 · NAT 21-mark 18 · 2-mark 4
2001Questions per year2026
Questions 1–5 of 22
In a given 8-bit general purpose micro-controller there are following flags.
C-Carry, A-Auxiliary Carry, O-Overflow flag, PParity ( 0 for even, 1 for odd) R0 and R 1 are the two general purpose registers of the microcontroller.
After execution of the following instructions, the decimal equivalent of the binary sequence of the flag pattern [CAOP] will be
MOV R0, +0x60
MOV R1, +0x46
ADD R0, R 1
C-Carry, A-Auxiliary Carry, O-Overflow flag, PParity ( 0 for even, 1 for odd) R0 and R 1 are the two general purpose registers of the microcontroller.
After execution of the following instructions, the decimal equivalent of the binary sequence of the flag pattern [CAOP] will be
MOV R0, +0x60
MOV R1, +0x46
ADD R0, R 1
Answer: 2
loads and loads . Then adds them:
Flags:
Carry (C): no carry out of bit 7, so .
Auxiliary carry (A): the low nibbles are , so there is no carry from to and .
Overflow (O): both operands are positive (bit 7 = 0) but the result has bit 7 = 1, so a signed overflow happened and .
Parity (P): the result has four 1s, which is even, so .
Flag pattern
Answer: 2
Flags:
Carry (C): no carry out of bit 7, so .
Auxiliary carry (A): the low nibbles are , so there is no carry from to and .
Overflow (O): both operands are positive (bit 7 = 0) but the result has bit 7 = 1, so a signed overflow happened and .
Parity (P): the result has four 1s, which is even, so .
Flag pattern
Answer: 2
An 8085 microprocessor accesses two memory locations (2001 H) and (2002H), that contain 8-bit numbers 98H and B1H respectively. The following program is executed:
LXI H, 2001 H
MVIA, 21H
INX H
ADD M
INX H
MOV M, A
HLT
At the end of this program, the memory location 2003H contains the number in decimal (base 10) form ________
LXI H, 2001 H
MVIA, 21H
INX H
ADD M
INX H
MOV M, A
HLT
At the end of this program, the memory location 2003H contains the number in decimal (base 10) form ________
Answer: 210
Program trace and conversion to decimal:
An output device is interfaced with 8-bit microprocessor 8085A. The interfacing circuit is shown in figure
The interfacing circuit makes use of 3 Line to 8 Line decoder having 3 enables lines . The address of the device is
The interfacing circuit makes use of 3 Line to 8 Line decoder having 3 enables lines . The address of the device is
Answer: (B)
The decoder outputs are selected by . The device is on output 2, so .
The decoder must also be enabled. is active high and comes from an AND gate with inputs and , so and .
and are active low. They are connected to and , so and are needed. means a memory cycle, so the device is memory-mapped and uses a full 16-bit address. An 8-bit address such as 50H or A0H would need .
The decoder must also be enabled. is active high and comes from an AND gate with inputs and , so and .
and are active low. They are connected to and , so and are needed. means a memory cycle, so the device is memory-mapped and uses a full 16-bit address. An 8-bit address such as 50H or A0H would need .
| A15 | A14 | A13 | A12 | A11 | A10 … A0 |
|---|---|---|---|---|---|
| 0 | 1 | 0 | 1 | 0 | 0 … 0 |
A10 to A0 are not decoded. Take them as 0, and the address is 0101 0000 0000 0000 = 5000H.
Answer: (B)In an 8085 microprocessor, the following program is executed
At the end of program, register A contains
At the end of program, register A contains
Answer: (A)
XRA A clears A to 00H and also clears the carry flag CY. Then B = 04H and A = 03H (MVI does not change the flags). So the loop starts with , , and it runs 4 times, because DCR B lowers B from 4 to 0 and JNZ repeats while B is not zero.
RAR rotates A right through the carry: CY moves into bit 7, and bit 0 moves into CY.
Trace of A and CY after each RAR:
1st: , CY = 1, B = 03
2nd: , CY = 1, B = 02
3rd: , CY = 0, B = 01
4th: , CY = 0, B = 00, so JNZ does not jump and HLT stops the program.
Answer: (A)
In 8085A microprocessor, the operation performed by the instruction LHLD 2100H is
Answer: (C)
LHLD addr (Load H and L Direct) takes the byte at the given address and puts it in L. It takes the byte at the next address and puts it in H:
,
The 8085 uses little-endian order, so the lower byte sits at the lower address.
Options (A) and (D) show the immediate value 2100H being loaded, as LXI H does. Option (B) has the byte order the wrong way round.
Correct answer: (C)Keep practising