8051 microcontroller MCQ
8051 microcontroller MCQ
1. ANL instruction is used _______
a) to AND the contents of the two registers
b) to mask the status of the bits
c) all of the mentioned
d) none of the mentioned
Answer: all of the mentioned
2. CJNE instruction makes _______
a) the pointer to jump if the values of the destination and the source address are equal
b) sets CY=1, if the contents of the destination register are greater then that of the source register
c) sets CY=0, if the contents of the destination register are smaller then that of the source register
d) none of the mentioned
Answer: none of the mentioned
3. XRL, ORL, ANL commands have _______
a) accumulator as the destination address and any register, memory or any immediate data as the source address
b) accumulator as the destination address and any immediate data as the source address
c) any register as the destination address and accumulator, memory or any immediate data as the source address
d) any register as the destination address and any immediate data as the source address
Answer: accumulator as the destination address and any register, memory or any immediate data as the source address
4. “DJNZ R0, label” is ________ byte instruction.
a) 2
b) 3
c) 1
d) Can’t be determined
Answer: 2
5. JZ, JNZ, instructions checked content of _______ register.
a) DPTR
b) B
c) A
d) PSW
Answer: DPTR
6. 8051 series has how many 16 bit registers?
a) 2
b) 3
c) 1
d) 0
Answer: 2
7. LCALL instruction takes
a) 2 bytes
b) 4 bytes
c) 3 bytes
d) 1 byte
Answer: 3 bytes
8. AT89C2051 has RAM of:
a) 128 bytes
b) 256 bytes
c) 64 bytes
d) 512 bytes
Answer: 128 bytes
9. How are the status of the carry, auxiliary carry and parity flag affected if the write instruction
MOV A,#9C
ADD A,#64H
a) CY=0,AC=0,P=0
b) CY=1,AC=1,P=0
c) CY=0,AC=1,P=0
d) CY=1,AC=1,P=1
Answer: CY=1,AC=1,P=0
10. How are the bits of the register PSW affected if we select Bank2 of 8051?
a) PSW.5=0 and PSW.4=1
b) PSW.2=0 and PSW.3=1
c) PSW.3=1 and PSW.4=1
d) PSW.3=0 and PSW.4=1
Answer: PSW.3=0 and PSW.4=1
11. On power up, the 8051 uses which RAM locations for register R0- R7
a) 00-2F
b) 00-07
c) 00-7F
d) 00-0F
Answer: 00-07
12. Find the number of times the following loop will be executed
MOV R6,#200 BACK:MOV R5,#100 HERE:DJNZ R5, HERE DJNZ R6,BACK END
a) 100
b) 200
c) 20000
d) 2000
Answer: 20000.
13. Calculate the jump code for again and here if code starts at 0000H
MOV R1,#0 MOV A,#0 MOV R0,#25H AGAIN:ADD A,#0ECH JNC HERE HERE: INC R1 DJNZ R0,AGAIN MOV R0,A END
a) F3,02
b) F9,01
c) E9,01
d) E3,02
Answer: E9,01
14. If SUBB A,R4 is executed, then actually what operation is being applied?
a) R4+A
b) R4-A
c) A-R4
d) R4+A
Answer: A-R4
15. A valid division instruction always makes:
a) CY=0,AC=1
b) CY=1,AC=1
c) CY=0,AC=0
d) no relation with AC and CY
Answer: CY=0,AC=0
16. DAA command adds 6 to the nibble if:
a) CY and AC are necessarily 1
b) either CY or AC is 1
c) no relation with CY or AC
d) CY is 1
Answer: either CY or AC is 1
17. What is the meaning of the instruction MOV A,05H?
a) data 05H is stored in the accumulator
b) fifth bit of accumulator is set to one
c) address 05H is stored in the accumulator
d) none of the mentioned
Answer: address 05H is stored in the accumulator
18. What is the time taken by one machine cycle if crystal frequency is 20MHz?
a) 1.085 micro seconds
b) 0.60 micro seconds
c) 0.75 micro seconds
d) 1 micro seconds
Answer: 0.60 micro seconds
19. Do the two instructions mean the same?
1) BACK: DEC R0 JZ BACK
2) BACK: DJNZ RO, BACK
a) yes
b) no
c) cant be determined
d) yes and the second one is preferred
Answer: yes and the second one is preferred
20. When the call instruction is executed the topmost element of stack comes out to be
a) the address where stack pointer starts
b) the address next to the call instruction
c) address of the call instruction
d) next address of the stack pointer
Answer: the address next to the call instruction
21. When we add two numbers the destination address must always be.
a) some immediate data
b) any register
c) accumulator
d) memory
Answer: accumulator
22. In 8 bit signed number operations, OV flag is set to 1 if:
a) a carry is generated from D7 bit
b) a carry is generated from D3 bit
c) a carry is generated from D7 or D3 bit
d) a carry is generated from D7 or D6 bit
Answer: a carry is generated from D7 or D6 bit
23. In unsigned number addition, the status of which bit is important?
a) OV
b) CY
c) AC
d) PSW
Answer: CY
24. Which instructions have no effect on the flags of PSW?
a) ANL
b) ORL
c) XRL
d) All of the mentioned
Answer: All of the mentioned
25. Are PUSH and POP instructions are a type of CALL instructions?
a) yes
b) no
c) none of the mentioned
d) cant be determined
Answer: no
26. 8051 microcontrollers are manufactured by which of the following companies?
a) Atmel
b) Philips
c) Intel
d) All of the mentioned
Answer: All of the mentioned
27. When 8051 wakes up then 0x00 is loaded to which register?
a) PSW
b) SP
c) PC
d) None of the mentioned
Answer: PC
28. When the microcontroller executes some arithmetic operations, then the flag bits of which register are affected?
a) PSW
b) SP
c) DPTR
d) PC
Answer: PSW
29. How many bytes of bit addressable memory is present in 8051 based microcontrollers?
a) 8 bytes
b) 32 bytes
c) 16 bytes
d) 128 bytes
Answer: 16 bytes
30. If we push data onto the stack then the stack pointer
a) increases with every push
b) decreases with every push
c) increases & decreases with every push
d) none of the mentioned
Answer: increases with every push
Comments
Post a Comment