WorksheetsUNIT-II INSTRUCTION SET AND PROGRAMMING
Total questions: 40
Worksheet time: 20mins
Which instruction rotates accumulator left through carry?
RL A
RR A
RLC A
RRC A
What happens when the stack overflows in 8051?
Corrupts internal RAM locations above 7FH
Resets automatically
Stops execution
Generates interrupt
In the instruction MOV A, #25H, which addressing mode is used?
Immediate
Direct
Register
Indirect
Which instruction clears the carry flag in 8051?
CLR A
CLRC A
CLC
CLR C
Which of the following is a logical instruction?
ADD
SUBB
ORL
INC
To calculate a time delay using a loop which factor is MOST important?
Clock frequency and number of machine cycles per instruction
Size of RAM
Number of I/O ports
Stack pointer value
DAA can adjust the value placed in Acc todecimal after ___________ operation
Addition
Subtraction
Multiplication
Division
After executing MUL AB where is the lower byte of the 16-bit result stored?
B register
Accumulator (A)
R0
PSW
What is the addressing mode used in "MOV A 40H"?
Immediate
Direct
Register
Indirect
Which instruction is used for exchanging contents of accumulator with register?
SWAP
XCH
XRL
MOVC
The instruction MOV A, #55H belongs to which addressing mode?
Immediate
Direct
Register
Indirect
Which instruction performs bitwise complement of accumulator?
CLR A
SETB A
CPL A
RR A
The only operation not possible in bit level is
data transfer
Jump
Logical
Arithmetic
If you need to find the smallest number among five numbers stored in internal RAM which structure is essential?
Stack operations
Loop with comparison and conditional branching
Serial communication setup
Timer initialization
Which instruction is used for an unconditional jump in
8051
SJMP
CJNE
DJNZ
JNB
What does the instruction “CPL C” do?
Clears the carry flag
Complements the carry flag
Sets the carry flag
Copies carry to accumulator
The time delay subroutine is used to
ON the load
OFF the load
Increase sppeed
Delay the operation
The instruction SETB EA is used for:
Enabling serial communication
Setting accumulator bit 0
Enabling all interrupts
Starting timer
Which register is used as stack pointer in 8051?
DPTR
PC
SP
PSW
Which of the following is
NOT
a category of 8051 instructions?
Data Transfer Instructions
Floating Point Instructions
Arithmetic Instructions
Bit Manipulation Instructions
A range of ACALL instruction is
2Kbytes
4Kbytes
64Kbytes
256 bytes
Which of the following instructions is used to jump if the accumulator is zero?
JZ label
JC label
JNZ label
JMP label
Which of the following is a data transfer instruction in 8051?
ADD
ORL
ANL
MOV
What is the purpose of the DAA instruction?
Decimal adjust after BCD addition
Divide accumulator
Decrement accumulator
Delete accumulator content
Which instruction is used to copy data from external memory to accumulator?
MOVC
MOVX
PUSH
POP
The instructions of 8051 are classified into
3 groups
5 groups
4 groups
6 groups
What will be the content of accumulator after executing: MOV A #58H followed by SWAP A?
50H
F5H
0FH
85H
For 16-bit addition using 8051 which pair of registers is commonly used to hold the higher byte?
R0 and R1
A and B
R6 and R7
DPH and DPL
Which instruction clears the accumulator?
MOV A, #FFH
SETB A
CPL A
CLR A
In 8051 which bit-addressable register allows individual bit manipulation?
PC
SP
DPTR
PSW
Which instruction increments accumulator by 1
ADD A, #01H
INC A
MOV A, #01H
CLR A
Which instruction is used for multiplication in 8051
MUL AB
MULT A, B
MULA
MULC
Which flag is affected by ADD instruction?
Carry
Overflow
Auxiliary Carry
All of these
The instruction SJMP $ does what?
Stops the program by creating an infinite loop
Skips one instruction
Terminates program
Resets microcontroller
Which instruction moves immediate data to accumulator?
MOV A, R1
MOV A, @R0
MOV A, #30H
MOV R0, A
The MOV instruction in 8051 is used for
Arithmetic addition
Logical AND operation
Transferring data between
registers/memory
Jumping to a subroutine
Which of the following is a machine control instruction?
NOP
MOV
ADD
ANL
What is the purpose of the CJNE instruction?
Compare and jump if not equal
Clear and jump
Call subroutine
Complement and exchange
What is the default value of SP after reset?
00H
08H
07H
FFH
How many addressing modes are used in 8051
4
6
8
5
