# Microprocessors

 Question 1
The content of the registers are $R_{1} = 25H, R_{2} = 30H$ and $R_{3} = 40H$. The following machine instructions are executed.
$\text{PUSH } \{R_{1}\}$
$\text{PUSH } \{R_{2}\}$
$\text{PUSH } \{R_{3}\}$
$\text{POP } \{R_{1}\}$
$\text{POP } \{R_{2}\}$
$\text{POP } \{R_{3}\}$
After execution, the content of registers $R_{1},\:R_{2},\:R_{3}$ are
 A $R_{1}=40H,\:R_{2}=30H,\:R_{3}=25H$ B $R_{1}=25H,\:R_{2}=30H,\:R_{3}=40H$ C $R_{1}=30H,\:R_{2}=40H,\:R_{3}=25H$ D $R_{1}=40H,\:R_{2}=25H,\:R_{3}=30H$
GATE EC 2021      Instructions of 8085 Microprocessor
Question 1 Explanation:
For PUSH SP is decremented and for POP SP is incremented. \begin{aligned} \therefore \qquad [\mathrm{R} 1]&=40 \\ [\mathrm{R} 2]&=30 \\ [\mathrm{R} 3]&=25 \end{aligned}
 Question 2
In an 8085 microprocessor, the number of address lines required to access a 16 K byte memory bank is __________.
 A 16 B 14 C 12 D 15
GATE EC 2020      Basics of 8085 Microprocessor
Question 2 Explanation:
\begin{aligned}2^{n}&=N \\ n & \rightarrow \text{ Number of Address Lines} \\ N & \rightarrow \text{ Number of Memory Locations} \\ 2^{n}&=16 KB \\ &=2^{4} (2^{10}) \\ &=2^{14}\\ n&=14\end{aligned}

 Question 3
The following FIVE instructions were executed on an 8085 microprocessor.
MVI A, 33H
MVI B, 78H
CMA
ANI 32H
The Accumulator value immediately after the execution of the fifth instruction is
 A 00H B 10H C 11H D 32H
GATE EC 2017-SET-1      Microprocessor 8085 Programming
Question 3 Explanation:
\begin{aligned} \text { MVI } A, 33 H &: (A)=33 H \\ \text { MVI B, } 78 \text { H } &: \text { (B) }=78 \mathrm{H} \\ \text { ADD } \mathrm{B} &: (\mathrm{A}) \leftarrow(\mathrm{A})+(\mathrm{B})=33 \mathrm{H} \\ +78 \mathrm{H}=\mathrm{AB} &\text { H } \Rightarrow (\mathrm{A})=\mathrm{AB} \mathrm{H} \\ &\text { (A) }=10101011\\ CMA&:\text{Complement}\\ \text { Accumulator } &\Rightarrow(A) =01010100 \\ \text { ANI } 32 \mathrm{H} &:\text { (A) } \leftarrow(\text { A) AND } 32 \mathrm{H} \\ &\quad 01010100\\ &\quad 00110010\\ &\quad 10010000 \Rightarrow(A)=10 H \end{aligned}
 Question 4
The clock frequency of an 8085 microprocessor is 5 MHz. If the time required to execute an instruction is 1.4 $\mu s$, then the number of T-states needed for executing the instruction is
 A 1 B 6 C 7 D 8
GATE EC 2017-SET-1      Instructions of 8085 Microprocessor
Question 4 Explanation:
Given than,
$f_{\mathrm{CLK}}=5 \mathrm{MHz}$
Execution time $=1.4 \mu \mathrm{s}$
Execution time $=n(T-\text { state })$
$n=$ number of T-states required to execute the instruction
T- state (or) $T_{\mathrm{CLK}}=\frac{1}{f_{\mathrm{CLK}}}=0.2 \mu \mathrm{s}$
So, $\quad n=\frac{1.4 \mu \mathrm{s}}{T_{\mathrm{CLK}}}=\frac{1.4}{0.2}=7$
 Question 5
In an 8085 microprocessor, the contents of the accumulator and the carry flag are A7 (in hex) and 0, respectively. If the instruction RLC is executed, then the contents of the accumulator (in hex) and the carry flag, respectively, will be
 A 4E and 0 B 4E and 1 C 4F and 0 D 4F and 1
GATE EC 2016-SET-3      Instructions of 8085 Microprocessor
Question 5 Explanation:
RLC: Rotate accumulator left by 1 bit without carry Before RLC operation:
\begin{aligned} A &=A 7 H=(10100111)_{2} \\ C Y &=0 \end{aligned}
After RLC operation:
\begin{aligned} A &=(01001111)_{2}=4 \mathrm{FH} \\ \mathrm{CY} &=1 \end{aligned}

There are 5 questions to complete.