You are on page 1of 8

The 8051 Microcontroller Architecture, Interfacing &

Programming
Multiple Choice Questions
1. 8051 series has how many 16 bit registers?
a) 2
b) 3
c) 1
d) 0

2. When 8051 wakes up then 0x00 is loaded to which register?


a) PSW
b) SP
c) PC
d) None of the mentioned

3. When the microcontroller executes some arithmetic operations, then the flag
bits of which register are affected?
a) PSW
b) SP
c) DPTR
d) PC

4. 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

5. 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

6. 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

7. 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

8. 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

9. Which of the following register can be addressed as a byte?


a) P1
b) SCON
c) TMOD
d) TCON

10. Which of the following is bit-addressable register?


a) SBUF
b) PCON
c) TMOD
d) SCON

11. The higher and lower bytes of a 16-bit register DPTR are represented
respectively as
a) LDPTR and HDPTR
b) DPTRL and DPTRH
c) DPH and DPL
d) HDP and LDP

12. The register that is used for accessing external data memory is
a) DPH
b) DPL
c) DPTR
d) NONE
13. Among the four groups of register banks, the number of groups that can be
accessed at a time is
a) 1
b) 2
c) 3
d) all the four

14. The PCON register consists of


a) power mode bit
b) power idle bit
c) power ideal bit
d) power down bit and idle bit

15. SCON is serial port used for which operation?


a) Transferring data
b) Receiving data
c) Controlling
d) Controlling & Transferring

16. Which of the following is not an addressing mode of 8051?


a) register instructions
b) register specific instructions
c) indexed addressing
d) none
17. The symbol, ‘addr 16’ represents the 16-bit address which is used by the
instructions to specify the
a) destination address of CALL
b) source address of JUMP
c) destination address of call or jump
d) source address of call or jump
18. The storage of addresses that can be directly accessed is
a) external data RAM
b) internal data ROM
c) internal data RAM and SFRS
d) external data ROM and SFRS
19. The address register for storing the 8-bit addresses can be
a) R0 of the selected bank of register
b) R1 of the selected bank of register
c) Stack pointer
d) All of the mentioned
20. The addressing mode, in which the instructions has no source and
destination operands is
a) register instructions
b) register specific instructions
c) direct addressing
d) indirect addressing

21. The instruction, ADD A, #100 performs


a) 100(decimal) is added to contents of address register
b) 100(decimal) is subtracted from the accumulator
c) 100(decimal) is added to contents of an accumulator
d) none

22. In which of these addressing modes, a constant is specified in the


instruction, after the opcode byte?
a) register instructions
b) register specific instructions
c) direct addressing
d) immediate mode

23. The only memory which can be accessed using indexed addressing mode is
a) RAM
b) ROM
c) Main memory
d) Program memory

24. The data address of look-up table is found by adding the contents of
a) accumulator with that of program counter
b) accumulator with that of program counter or data pointer
c) data register with that of program counter or accumulator
d) data register with that of program counter or data pointer

25. The operations performed by data transfer instructions are on


a) bit data
b) byte data
c) 16-bit data
d) all of the mentioned

26. The logical instruction that affects the carry flag during its execution is
a) XRL A;
b) ANL A;
c) ORL A;
d) RLC A;

27. The instructions that change the sequence of execution are


a) conditional instructions
b) logical instructions
c) control transfer instructions
d) data transfer instructions

28. The control transfer instructions are divided into


a) explicit and implicit control transfer instructions
b) conditional and unconditional control transfer instructions
c) auto control and self control transfer instructions
d) all of the mentioned

29. The conditional control transfer instructions check a bit condition which
includes any bit of
a) bit addressable RAM
b) bit addressable SFRs
c) content of accumulator
d) all of the mentioned

30. All conditional jumps are


a) absolute jumps
b) long jumps
c) short jumps
d) none

31. The first byte of a short jump instruction represents


a) opcode byte
b) relative address
c) opcode field
d) none

32. In logical instructions, the immediate data can be an operand for


a) increment operation
b) decrement operation
c) single operand instruction
d) none

33. 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
34. 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

35. 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

36. 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

37. 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

38. 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

39. 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) immediate next instruction where interrupt is occurred
c) next instruction after the RETI in the memory
d) none of the mentioned
40. Which of the following combination is the best to enable the external
hardware interrupt 0 of the IE register (assuming initially all bits of the IE
register are zero)?
a) EX0=1
b) EA=1
c) any of the mentioned
d) EX0=1 & EA=1

41. Which register is used to make the interrupt level or an edge triggered
pulse?
a) TCON
b) IE
c) IPR
d) SCON

42. What is the correct order of priority that is set after a controller gets reset?
a) RI/TI > TF1 > TF0 > INT1 > INT0
b) RI/TI < TF1 < TF0 < INT1 < INT0
c) INT0 > TF0 > INT1 > TF1 > RI/TI
d) INT0 < TF0 < INT1 < TF1 < RI/TI

43. Why two pins for ground are available in ADC0804?


a) for controlling the ADCON0 and ADCON1 register of the controller
b) for controlling the analog and the digital pins of the controller
c) for both parts of the chip respectively
d) for isolate analog and digital signal

44. State which of the following statements are false?


a) CLK IN pin used for External Clock Input or Internal Clock with external RC
element
b) INTR pin tells about the end of the conversion
c) ADC0804 IC is an 8 bit parallel ADC in the family of the ADC0800 series
d) None of the mentioned

45. In ADC0808/0809 IC which pin is used to select Step Size?


a) Vref
b) Vin
c) Vref/2 & Vin
d) None of the mentioned

46. INTR, WR signal is an input/output signal pin?


a) both are output
b) both are input
c) one is input and the other is output
d) none of the mentioned

47. 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

48. Which command of an LCD is used to shift the entire display to the right?
a) 0x1C
b) 0x18
c) 0x05
d) 0x07

49. Which of the following step/s is/are correct for sending data to an LCD?
a) set the R/W bit
b) set the E bit
c) set the RS bit
d) all of the mentioned

50. 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) cant be controlled

You might also like