0% found this document useful (0 votes)
222 views

Assignment 3 2023 New Update

1. The document contains 15 multiple choice questions about microprocessors and microcontrollers. 2. The questions cover topics like addressing modes, instruction formats, flag registers, stack pointers and subroutine instructions. 3. Detailed solutions are provided for each question explaining the logic and steps to arrive at the correct answer.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
222 views

Assignment 3 2023 New Update

1. The document contains 15 multiple choice questions about microprocessors and microcontrollers. 2. The questions cover topics like addressing modes, instruction formats, flag registers, stack pointers and subroutine instructions. 3. Detailed solutions are provided for each question explaining the logic and steps to arrive at the correct answer.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

NPTEL Online Certification Courses

Indian Institute of Technology Kharagpur

Microprocessors And Microcontrollers


Assignment 3- Week 3
TYPE OF QUESTION: MCQ
Number of questions: 15 Total mark: 15 X 1 = 15
______________________________________________________________________________

QUESTION 1:
If ‘n’ denotes the number of clock cycle and ‘T’ denotes the clock period at which the
microprocessor is running, then the duration of execution of loop once can be denoted by

a. n+T
b. n–T
c. n*T
d. n/T

Correct Answer: c

Detailed Solution:

______________________________________________________________________________

QUESTION 2:
The contents of accumulator after the execution of following instructions will be
MVI A, B7H
ORA A
RAL

a. 6EH
b. 6FH
c. EEH
d. EFH

Correct Answer: a

Detailed Solution:
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 3:
Match List-I and List-II and select the correct answer

List I List II
A. Immediate Addressing 1. LDA 30FF
B. Implicit Addressing 2. MOV A, B
C. Register Addressing 3. LXI H, 2050
D. Direct Addressing 4. RRC

a. A-3, B-4, C-2, D-1

b. A-1, B-4, C-2, D-3

c. A-3, B-2, C-4, D-1

d. A-1, B-2, C-4, D-3

Correct Answer: a

Detailed Solution:

_____________________________________________________________________________
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 4:

How many times will the following loop be executed?

XRA A

MVI C, 05H

LOOP: DCR C

JNZ LOOP

a. Once
b. Five times
c. Infinite times
d. Depends on the initial value of A

Correct Answer: b

Detailed Solution:

QUESTION 5:
If a microprocessor uses a 5MHz clock. The duration of one T state is

a. 1 𝝻s
b. 0.333 𝝻s
c. 0.2 𝝻s
d. 2 𝝻s

Correct Answer: c

Detailed Solution: 1 /(5 * 106 s)


NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 6:
What is the status of the zero flag and the contents of the accumulator after execution of the
following 8085 assembly code? Assume that contents of all other registers and memory
locations are unknown.

MVI A, 65H

MVI B, 32H

CMP B

a. 0, 65H

b. 1, 65H

c. 0, 33H

d. 1, 00H

Correct Answer: a

Detailed Solution:

Contents of the accumulator is unchanged after execution of CMP (compare) instruction


______________________________________________________________________________

QUESTION 7:
How many bytes does the following set of instructions occupy?
MVI A, 35H
MVI B, 23H
ADD B
a. Three bytes
b. Six bytes
c. Five bytes
d. Four bytes

Correct Answer: c
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

Detailed Solution:

MVI is an instruction with immediate data and it occupies two bytes of memory, one for the
opcode and the other one for the immediate data. Thus, the first two instructions occupy four
bytes of memory.

However, ADD B is an instruction with register as an operand and it occupies one byte of
memory. Thus, the total amount of memory occupied by the given set of instructions is five
bytes.

______________________________________________________________________________

QUESTION 8:
For the 8085 assembly language program given below, the content of the accumulator after the
execution of the program is

3000 MVI A, 45H

3002 MOV B, A

3003 STC

3004 CMC

3005 RAR

3006 XRA B

a. 00H

b. 45H

c. 67H

d. E7H

Correct Answer: C

Detailed Solution:
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 9:
In 8085 microprocessor, which mode of addressing does the instruction CMP M use?

a. Direct addressing

b. Register addressing

c. Indirect addressing

d. Immediate addressing

Correct Answer: C
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

Detailed Solution: Compare memory with accumulator ( CMP M) : This is a 1-byte instruction.
It compares the data in the register or memory with the contents of accumulator. It uses
indirect addressing mode.

QUESTION 10:
Between DCR and DCX instructions, the status flags are affected by

a. Only DCR
b. Only DCX
c. Both DCR and DCX
d. Neither DCR nor DCX

Correct Answer: A

Detailed Solution:

QUESTION 11:
After the execution of the given statements, determine the status of flag register content.
MVI A, #0BFH
ADI A, #1BH

a. 11010001
b. 01011011
c. 01000000
d. 10100001

Correct Answer: C

Detailed Solution:

MOI A, #0BFH ( BFH is move in register A)


ADI A, #1BH ( Adding 1BH with accumulator content)

BF 10111111

+1B 00011011
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

DA 11011010

CY =0 , as there is no carry after MSB

AC = 1 , as there is carry after 4 bits

P = 0 , as their odd number of 1.

The status of PSW is 01000000.

______________________________________________________________________________

QUESTION 12:
The clock frequency of 8085 microprocessor is 5 MHz. If the time required to execute an
instruction is 1.4 𝝻s, then the number of T- states needed for executing the instruction is

a. 1
b. 6
c. 7
d. 4

Correct Answer: c

Detailed Solution:
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

______________________________________________________________________________

______________________________________________________________________________

QUESTION 13:
What are the states of the Auxiliary Carry (AC) and Carry Flag (CY) after executing the
following 8085 program?

MVI H, 5DH
MVI L, 6BH
MOV A, H
ADD L

a. AC = 0 and CY = 0
b. AC = 1 and CY = 1
c. AC = 1 and CY = 0
d. AC = 0 and CY = 1

Correct Answer: c
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

Detailed Solution: First we load 5D in L register but we have not stored it to the
accumulator So, when we load 6B in L register, it overwrites 5D in L register and the
same value 6BH is copied to accumulator
Now A = 6BH
L = 6BH
ADD L i.e. A = A + L
It will generate internal carry i.e. B + B = 22 i.e. 22 – 16 = 6
adding 2 to 6 + 6 => we get 14 => D
Hence answer is D6
Since there is internal carry only, no final carry as 14 < 16
So, Auxiliary carry flag(AC) = 1
Carry Flag(CY) = 0

QUESTION 14:
Contents of the stack pointer (SP) after executing following instructions?
LXI SP, 3FFFH
PUSH B
HLT
a. SP = 3FFDH
b. SP = 4000H
c. SP = 4001H
d. SP = 3FFEH

Correct Answer: a

Detailed Solution:

contents of the SP decremented by two after executing PUSH instruction.

QUESTION 15:
The 8085 has two instructions for dealing with subroutines
a. PUSH and RET
b. CALL and RET
c. PUSH and CALL
d. None of the above
Correct Answer: b
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

Detailed Solution:

************END*******

You might also like