8051 MCQ's
8051 MCQ's
MCQ’s
1
NR Classes, Pune (BCS / BCA Call 9730381255)
c) 3
d) 4
7. MOV A, @ R1 will
a) copy R1 to the accumulator
b) copy the accumulator to R1
c) copy the contents of memory whose address is in R1 to the accumulator
d) copy the accumulator to the contents of memory whose address is in R1
8. The following program will receive data from port 1, determine whether bit 2 is high,
and then send the number FFH to port 3:
READ: MOV A,P1
ANL A,#2H
CJNE A,#02H,READ
MOV P3,#FFH
a) True
b) False
9. When the 8051 is reset and the line is HIGH, the program counter points to the first
program instruction in the
a) internal code memory
b) external code memory
c) internal data memory
d) external data memory
10. An alternate function of port pin P3.4 in the 8051 is
a) Timer 0
b) Timer 1
c) Interrupt 0
d) Interrupt 1
11. The I/O ports that are used as address and data for external memory are
a) ports 1 and 2
b) ports 1 and 3
c) ports 0 and 2
d) ports 0 and 3
12. Microcontrollers often have
a) CPUs
b) RAM
c) ROM
d) All of the above
13. 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
2
NR Classes, Pune (BCS / BCA Call 9730381255)
END
a) 100
b) 200
c) 20000
d) 2000
14. To initialize any port as an output port what value is to be given to it?
a) 0xFF
b) 0x00
c) 0x01
d) A port is by default an output port
15. Which of the following registers are not bit addressable?
a) SCON
b) PCON
c) A
d) PSW
16. Which instruction is used to check the status of a single bit?
a) MOV A,P0
b) ADD A,#05H
c) JNB PO.0, label
d) CLR P0.05H
17. Which operator is the most important while assigning any instruction as register
indirect instruction?
a) $
b) #
c) @
d) &
18. The total external data memory that can be interfaced to the 8051 is:
a) 32K
b) 64K
c) 128K
d) 256K
19. The contents of the accumulator after this operation
MOV A,#0BH
ANL A,#2CH
will be
a) 11010111
b) 11011010
c) 00001000
d) 00101000
20. Which of the following instructions will move the contents of register 3 to the
accumulator?
a) MOV 3R, A
b) MOV R3, A
c) MOV A, R3
3
NR Classes, Pune (BCS / BCA Call 9730381255)
d) MOV A, 3R
21. Which of the following commands will move the number 27H into the accumulator?
a) MOV A, P27
b) MOV A, #27H
c) MOV A, 27H
d) MOV A, @27
22. This program code will read data from port 0 and write it to port 2, and it will stop
looping when bit 3 of port 2 is set
STAT: MOV A,P0
MOV P2,A
JNB P2.3, STAT
a) True
b) False
23. What is the difference between the 8031 and the 8051?
a) The 8031 has no interrupts.
b) The 8031 is ROM-less.
c) The 8051 is ROM-less
d) The 8051 has 64 bytes more memory.
24. The I/O port that does not have a dual-purpose role is
a) Port 0
b) Port 1
c) Port 2
d) Port 3
25. To interface external EPROM memory for applications, it is necessary to demultiplex
the address/data lines of the 8051.
a) True
b) False
26. The special function registers can be referred to by their hex addresses or by their
register names
a) True
b) False
27. The contents of the accumulator after this operation
MOV A,#2BH
ORL A,00H
Will be
a) 1B H
b) 2B H
c) 3B H
d) 4B H
28. The following command will rotate the 8 bits of the accumulator one position to the
left
RL A
a) True
b) False
4
NR Classes, Pune (BCS / BCA Call 9730381255)
29. Which of the following comes under the indexed addressing mode?
a) MOVX A, @DPTR
b) MOVC @A+DPTR,A
c) MOV A,R0
d) MOV @R0,A
30. Which instructions have no effect on the flags of PSW?
a) ANL
b) ORL
c) XRL
d) All of the mentioned
31. 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
32. What is the function of the TMOD register?
a) TMOD register is used to set different timer’s or counter’s to their appropriate modes
b) TMOD register is used to load the count of the timer
c) Is the destination or the final register where the result is obtained after the operation
of the timer
d) Is used to interrupt the timer
33. What is the maximum delay that can be generated with the crystal frequency of
22MHz?
(Hint: For generating the maximum delay we have to multiply the maximum number
of counts with the time period required to execute one machine cycle(
65536*1/22MHz))
a) 2978.9 sec
b) 0.011 msec
c) 11.63 sec
d) 2.97 msec
34. Auto reload mode is allowed in which mode of the timer?
a) Mode 0
b) Mode 1
c) Mode 2
d) Mode 3
35. What steps are followed when we need to turn on any timer?
a) load the count, start the timer, keep monitoring it, stop the timer
b) load the TMOD register, load the count, start the timer, keep monitoring it, stop the
timer
c) load the TMOD register, start the timer, load the count, keep monitoring it, stop the
5
NR Classes, Pune (BCS / BCA Call 9730381255)
timer
d) none of the mentioned
36. TF1, TR1, TF0, TR0 bits are of which register?
a) TMOD
b) SCON
c) TCON
d) SMOD
37. What is the difference between UART and USART communication?
a) they are the names of the same particular thing, just the difference of A and S is there
in it
b) one uses asynchronous means of communication and the other uses synchronous
means of communication
c) one uses asynchronous means of communication and the other uses asynchronous
and synchronous means of communication
d) one uses angular means of the communication and the other uses linear means of
communication
38. When an interrupt is enabled, then where does the pointer moves immediately after
this interrupt has occurred?
a) to the next instruction which is to be executed
b) to the first instruction of ISR
c) to the first location of the memory called the interrupt vector table
d) to the end of the program
39. What are the contents of the IE register, when the interrupt of the memory location
0x00 is caused?
a) 0xFFH
b) 0x00H
c) 0x10H
d) 0xF0H
40. After RETI instruction is executed then the pointer will move to which location in the
program?
a) next interrupt of the interrupt vector table
b) next instruction of the program after the IE instruction
c) next instruction after the RETI in the memory
d) none of the mentioned
41. How many rows and columns are present in a 16*2 alphanumeric LCD?
a) rows=2, columns=32
b) rows=16, columns=2
c) rows=16, columns=16
d) rows=2, columns=16
42. How many data lines are there in a 16*2 alphanumeric LCD?
a) 16
b) 8
c) 1
d) 0
6
NR Classes, Pune (BCS / BCA Call 9730381255)
43. Which pin of the LCD is used for adjusting its contrast?
a) pin no 1
b) pin no 2
c) pin no 3
d) pin no 4
44. Which instruction is used to select the first row first column of an LCD?
a) 0x08
b) 0x0c
c) 0x80
d) 0xc0
45. When is the function of the WR pin?
a) its active high input used to inform ADC0804, about the end of conversion
b) its active low input used to inform ADC0804, about the end of conversion
c) its active low input used to inform ADC0804, about the start of conversion
d) its active high input used to inform ADC0804, about the start of conversion
46. 8 input DAC has ________
a) 8 discrete voltage levels
b) 64 discrete voltage levels
c) 124 discrete voltage levels
d) 256 discrete voltage levels
47. How can we control the speed of a stepper motor?
a) by controlling its switching rate
b) by controlling its torque
c) by controlling its wave drive 4 step sequence
d) can’t be controlled
48. The largest value that can be loaded in an 8 bit register is?
a) 11111111H
b) FH
c) FFH
d) 00H
49. Is an assembly language a high level language?
a) Yes
b) No
c) Can’t be said
d) None of the mentioned
50. What should be done if we want to double the baud rate?
a) change a bit of the TMOD register
b) change a bit of the PCON register
c) change a bit of the SCON register
d) change a bit of the SBUF register
7
NR Classes, Pune (BCS / BCA Call 9730381255)
For Video Tutorials
8
NR Classes, Pune (BCS / BCA Call 9730381255)