Microprocessors and Microcontrollers: Unit III: (b) 8051 Instruction Set and Programming : University Questions with Answers (Long Answered Questions) Two Marks Questions with Answers
Two Marks Questions with Answers
Q.1
What is the time taken to execute MUL instruction in 8031?
(Refer
section 15.5.4)
Q.2
Give the PSW setting for making register bank 2 as default register bank in 8051
microcontroller ?
(Refer
program 15.10.9)
Q.3
What is the operation carried out when 8051 executes the instruction MOVC A, @
A + DPTR ?
(Refer
section 15.3.2)
Q.4
Name any four bit manipulation instructions in microcontroller 8051.
(Refer
section 15.6)
Q.5
How can you perform multiplication using 8051 microcontroller ?
(Refer
section 16.5.4)
Q.6
Write the I/O related instructions in microcontroller 8051.
(Refer
section 16.3)
Q.7
What is output of the program ?
MOV
R0, A
XRL
A, #3FH
XRL
A, R0
Ans.
:
The contents of A register will be 3FH and contents of RO will be the initial
contents of A.
Q.8
Explain about the instruction DJNZ.
(Refer
section 15.8.2)
Q.9
Write an 8051 program to divide two 8-bit numbers.
(Refer
program 15.10.10)
Q.10 What are the uses of LCALL and LJUMP
instructions of 8051?
(Refer
section 15.8)
Q.11 List the different types of 8051 instructions.
(Refer
sections 15.2, 15.3, 15.4 and 15.5)
Q.12 What are the various operations performed by boolean
variable instructions of 8051 ?
(Refer
section 15.6)
Q.13
Explain DJNZ instructions of Intel 8051 microcontroller ?
Ans.
:
1 DJNZ Rn, rel : Decrement the content of the register Rn and jump if not zero.
2.
DJNZ direct, rel : Decrement the content of direct 8-bit address and jump if not
zero.
Q.14 Write a program using 8051 assembly language
to change the data 55H stored in the lower byte of the data pointer register to
AAH using rotate instruction.
Ans. MOV DPL, #55H
MOV
A, DPL
RL
A
Q.15 Specify the single instruction, which clears
the most significant bit of B register of 8051, without affecting the remaining
bits.
Ans.
: Single instruction, which clears the
most significant bit of B register of 8051, without affecting the remaining bit
is CLR B.7.
Q.16 Explain the contents of the accumulator after
the execution of the following program segments :
MOV
A, #3CH
MOV
R4, #66H
ANL
A, R4
Ans
:
A
= 3C
R4
= 66
A
= 24
Q.17 Write a program to load accumulator A, DPH and
DPL with 30H.
Ans.
:
MOV
A, #30
MOV
DPH, A
MOV
DPL, A
Q.18 Write a program to subtract the contents of R1
of BankO from the contents of R0 of Bank2.
Ans.
:
MOV
PSW, #10
MOV
A, R0
MOV
PSW, #00
SUBB
A, R1
Q.19 List the 8051 instructions that affect the
overflow flag.
Ans.
: ADD,
ADDC, DIV, MUL, SUBB
Q.20 List the 8051 instructions that always clear
the carry flag.
Ans.
: CLR
C, DIV, MUL
Q.21 List the 8051 instructions that affect all the
flags.
Ans.
: ADD, ADDC and SUBB
Q.22 What are the addressing modes supported by
8051 ?
Ans.
: The
addressing modes supported by 8051 are :
1.
Register addressing
2.
Direct byte addressing
3.
Register indirect
4.
Immediate
5.
Register specific
6.
Index
Q.23 What does the mnemonics "LCALL" and
"ACALL" stand for ?
(Refer
section 15.8.3)
Q.24 Give an example for DA instruction of 8051
microcontroller.
(Refer
section 15.5.5)
Q.25 State the functions performed by JBC and CJNE
instructions in 8051 microcontroller.
(Refer
section 15.8.2)
Q.26 Write an 8051 assembly language program to
clear the accumulator and add 3 to the accumulator 10 times.
(Refer
example 15.10.24)
Q.27 What is the operation of the given 8051
microcontroller instructions : XRL A, direct ?
(Refer
section 15.4)
Q.28 Write a program to find 2's complement using
8051.
(Refer
program 15.10.6)
Q.29 Mention any four data transfer instructions of
8051 microcontroller.
(Refer
section 15.3)
Q.30 Can single bit of a port be accessed in 8051 ?
If yes, how ? Give an example.
(Refer
section 15.6)
University Questions with Answers (Long Answered Questions)
(Regulation
2008)
May-11
Q.1
Explain the data transfer instructions and program control instructions of 8051
microcontroller.
(Refer
sections 15.3 and 15.8) [8]
Q.2
Write an assembly language program based on 8051 microcontroller instruction
set to perform four arithmetic operations on 2, 8 bit data.
(Refer
programs 15.10.4, 15.10.8, 15.10.10 and 15.10.11) [8]
Dec.-11
Q.3
Explain the different addressing modes in 8051 in detail.
(Refer
section 15.1) [8]
Dec.-12
Q.4
Write an 8051 assembly language program to copy the valule 55h into RAM memory
locations 40h to 45h using register indirect addressing with a loop.
(Refer
program 15.10.23) [8]
May-13
Q.5
Explain the different addressing modes of 8051 microcontroller.
(Refer
section 15.1) [8]
Dec.-13
Q.6
Explain the different addressing modes of 8051 microcontroller.
(Refer
section 15.1) [16]
May-14
Q.7
Explain the different operand addressing modes in 8051 microcontroller with
examples.
(Refer
section 16.1) [16]
(Regulation
2013)
May-16
Q.8
Explain the different addressing modes of 8051 microcontroller.
(Refer
section 15.1) [8]
Dec.-17
Q.9 Explain the different types of instructions
used in 8051 microcontroller.
(Refer
sections 16.2 to 15.8) [13]
Dec.-18
Q.10 Explain the various bit manipulation
instructions in 8051 with examples.
(Refer
section 15.6) [13]
Microprocessors and Microcontrollers: Unit III: (b) 8051 Instruction Set and Programming : Tag: : 8051 Instruction Set and Programming - Two Marks Questions with Answers