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 21–22 of 22
The logic circuit used to generate the active low chip select (CS) by an 8085 microprocessor to address a peripheral is shown in figure. The peripheral will respond to addresses in the range.
Answer: (A)
The chip select is the output of a NAND gate, so goes low (the peripheral is selected) only when all four gate inputs are 1. The inputs are , , and , and the last one has an inverting bubble. So and . The lower bits to are not connected, so they can be anything.
Address bit pattern:
Address range:
Answer: (A)
Address bit pattern:
Address range:
Answer: (A)
An Intel 8085 processor is executing the program given below.
MVI A, 10H
MVI B, 10H
BACK: NOP
ADD B
RLC
JNC BACK
HLT
The number of times that the operation NOP will be executed is equal to
MVI A, 10H
MVI B, 10H
BACK: NOP
ADD B
RLC
JNC BACK
HLT
The number of times that the operation NOP will be executed is equal to
Answer: (C)
RLC rotates A left by one bit: bit 7 goes into CY and also into bit 0. So CY after RLC is the old bit 7 of A. (ADD B sets CY too, but RLC overwrites it.) JNC BACK jumps to NOP while CY = 0 and falls through to HLT when CY = 1.
Pass 1: NOP (count 1). ADD B: A = 10H + 10H = 20H = 0010 0000. RLC: old bit 7 = 0, so CY = 0 and A = 0100 0000 = 40H. JNC jumps back.
Pass 2: NOP (count 2). ADD B: A = 40H + 10H = 50H = 0101 0000. RLC: old bit 7 = 0, so CY = 0 and A = 1010 0000 = A0H. JNC jumps back.
Pass 3: NOP (count 3). ADD B: A = A0H + 10H = B0H = 1011 0000. RLC: old bit 7 = 1, so CY = 1 and A = 0110 0001 = 61H. JNC does not jump, and HLT runs.
NOP runs 3 times.
Answer: (C)
Pass 1: NOP (count 1). ADD B: A = 10H + 10H = 20H = 0010 0000. RLC: old bit 7 = 0, so CY = 0 and A = 0100 0000 = 40H. JNC jumps back.
Pass 2: NOP (count 2). ADD B: A = 40H + 10H = 50H = 0101 0000. RLC: old bit 7 = 0, so CY = 0 and A = 1010 0000 = A0H. JNC jumps back.
Pass 3: NOP (count 3). ADD B: A = A0H + 10H = B0H = 1011 0000. RLC: old bit 7 = 1, so CY = 1 and A = 0110 0001 = 61H. JNC does not jump, and HLT runs.
NOP runs 3 times.
Answer: (C)
Keep practising