Vous êtes sur la page 1sur 15

The internal RAM memory of the 8051 is:

A. 32 bytes
B. 64 bytes
C. 128 bytes
D. 256 bytes

Answer:C

The 8051 has ________ 16-bit counter/timers.


A. 1
B. 2
C. 3
D. 4

Answer: B

The 8051 can handle ________ interrupt sources.


A. 3
B. 4
C. 5
D. 6

Answer: C

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

Answer: C

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

Answer: A

An alternate function of port pin P3.4 in the 8051 is:


A. Timer 0
B. Timer 1
C. interrupt 0
D. interrupt 1

Answer: A

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

Answer: C
Microcontrollers often have:

A. CPUs
B. RAM
C. ROM
D. all of the above

Answer: D

The 8051 has ________ parallel I/O ports.

A. 2
B. 3
C. 4
D. 5

Answer: C

The total external data memory that can be interfaced to the 8051 is:

A. 32K
B. 64K
C. 128K
D. 256K

Answer: B

Which of the following instructions will load the value 35H into the high byte of
timer 0?

A. MOV TH0, #35H


B. MOV TH0, 35H
C. MOV T0, #35H
D. MOV T0, 35H

Answer: A

Bit-addressable memory locations are:

A. 10H through 1FH


B. 20H through 2FH
C. 30H through 3FH
D. 40H through 4FH

Answer: B

The 8-bit address bus allows access to an address range of:

A. 0000 to FFFFH
B. 000 to FFFH
C. 00 to FFH
D. 0 to FH

Answer: C

The contents of the accumulator after this operation


MOV A,#0BH
ANL A,#2CH
will be

A. 11010111
B. 11011010
C. 00001000
D. 00101000

Answer: C

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
D. MOV A, 3R

Answer: C

Which of the following statements will add the accumulator and register 3?

A. ADD @R3, @A
B. ADD @A, R3
C. ADD R3, A
D. ADD A, R3

Answer: D

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

Answer: B

Which of the following commands will move the value at port 3 to register 2?

A. MOV P2, R3
B. MOV R3, P2
C. MOV 3P, R2
D. MOV R2, P3

Answer: D

The number of data registers is:

A. 8
B. 16
C. 32
D. 64

Answer: C

When the 8051 is reset and the EA line is LOW, 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

Answer: B

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

Answer: B

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

Answer: B

Which of the following commands will copy the contents of RAM whose address is in
register 0 to port 1?

A. MOV @ P1, R0
B. MOV @ R0, P1
C. MOV P1, @ R0
D. MOV P1, R0

Answer: C

Which of the following commands will copy the contents of location 4H to the
accumulator?

A. MOV A, 04H
B. MOV A, L4
C. MOV L4, A
D. MOV 04H, A

Answer: A

The total amount of external code memory that can be interfaced to the 8051 is:

A. 32K
B. 64K
C. 128K
D. 256K

Answer: B

A HIGH on which pin resets the 8051 microcontroller?


A. RESET
B. RST
C. PSEN
D. RSET

Answer: B

An alternate function of port pin P3.1 in the 8051 is:

A. serial port input


B. serial port output
C. memory write strobe
D. memory read strobe

Answer: B

Which of the following instructions will move the contents of the accumulator to
register 6?

A. MOV 6R, A
B. MOV R6, A
C. MOV A, 6R
D. MOV A, R6

Answer: B

An alternate function of port pin P3.0 (RXD) in the 8051 is:

A. serial port input


B. serial port output
C. memory write strobe
D. memory read strobe

Answer: A

Which register usually store the output generated by ALU in several arithmetic and
logical operations?

a. Accumulator
b. Special Function Register
c. Timer Register
d. Stack Pointer

ANSWER: a

Which general purpose register holds eight bit divisor and store the remainder
especially after the execution of division operation?

a. A-Register
b. B-Register
c. Registers R0 through R7
d. All of the above

ANSWER: b

How many registers can be utilized to write the programs by an effective selection
of register bank in program status word (PSW)?

a. 8
b. 16
c. 32
d. 64

ANSWER: C

Which operations are performed by stack pointer during its incremental phase?

a. Push
b. Pop
c. Return
d. All of the above

ANSWER: a

Which is the only register without internal on-chip RAM address in MCS-51?

a. Stack Pointer
b. Program Counter
c. Data Pointer
d. Timer Register

ANSWER: b

What kind of instructions usually affect the program counter?

a. Call & Jump


b. Call & Return
c. Push & Pop
d. Return & Jump

ANSWER: a

What is the default value of stack once after the system undergoes the reset
condition?

a. 07H
b. 08H
c. 09H
d. 00H

ANSWER: a

Which flags represent the least significant bit (LSB) and most significant bit
(MSB) of Program Status Word (PSW) respectively?

a. Parity Flag & Carry Flag


b. Parity Flag & Auxiliary Carry Flag
c. Carry Flag & Overflow Flag
d. Carry Flag & Auxiliary Carry Flag

ANSWER: a

Which register bank is supposed to get selected if the values of register bank
select bits RS1 & Rs0 are detected to be �1� & �0� respectively?
a. Bank 0
b. Bank 1
c. Bank 2
d. Bank 3

ANSWER: c

It is possible to set the auxiliary carry flag while performing addition or


subtraction operations only when the carry exceeds _______

a. 1st bit
b. 2nd bit
c. 3rd bit
d. 4th bit

ANSWER: c

Which commands are used for addressing the off-chip data and associated codes
respectively by data pointer?

a. MOVX & MOVC


b. MOVY & MOVB
c. MOVZ & MOVA
d. MOVC & MOVY

ANSWER: a

Which instruction find its utility in loading the data pointer with 16 bits
immediate data?

a. MOV
b. INC
c. DEC
d. ADDC

ANSWER: a

Which among the below stated registers does not belong to the category of special
function registers?

a. TCON & TMOD


b. TH0 & TL0
c. P0 & P1
d. SP & PC

ANSWER: d

What is the required baud rate for an efficient operation of serial port devices in
8051 microcontroller?

a. 1200
b. 2400
c. 4800
d. 9600
ANSWER: d

How does the processor respond to an occurrence of the interrupt?

a. By Interrupt Service Subroutine


b. By Interrupt Status Subroutine
c. By Interrupt Structure Subroutine
d. By Interrupt System Subroutine

ANSWER: a

The upper 128 bytes of an internal data memory from 80H through FFH usually
represent _______.

a. general-purpose registers
b. special function registers
c. stack pointers
d. program counters

ANSWER: b

Which among the below mentioned reasons is/are responsible for the generation of
Serial Port Interrupt?

a. Overflow of timer/counter 1
b. High to low transition on pin INT1
c. High to low transition on pin INT0
d. Setting of either TI or RI flag

a. A & B
b. Only B
c. C & D
d. Only D

ANSWER: d

Which special function register play a vital role in the timer/counter mode
selection process by allocating the bits in it?

a. TMOD
b. TCON
c. SCON
d. PCON

ANSWER: a

Which bit must be set in TCON register in order to start the �Timer 0� while
operating in �Mode 0�?

a. TR0
b. TF0
c. IT0
d. IE0

ANSWER: a

Which of the following is true while executing data transfer instructions?

a) program counter is not accessible


b) restricted bit-transfer operations are allowed
c) both operands can be direct/indirect register operands
d) all of the mentioned

Answer: c

The logical instruction that affect the carry flag during its execution is

a) XRL A;
b) ANL A;
c) ORL A;
d) RLC A;

Answer: d

The instruction that is used to complement or invert the bit of a bit addressable
SFR is

a) CLR C
b) CPL C
c) CPL Bit
d) ANL Bit

Answer: c

The instructions that change the sequence of execution are

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

Answer: c

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

Answer: b

All conditional jumps are

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

Answer: c

The first byte of a short jump instruction represents

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

When we add two numbers the destination address must always be.

a) some immediate data


b) any register
c) accumulator
d) memory

Answer: c

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: b

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: c

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: c

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: d

In unsigned number addition, status of which bit is important?


a) OV
b) CY
c) AC
d) PSW

Answer: b
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: c

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: a

Which rotate instruction/s has an ability to modify CY flag by moving the bit-7 &
bit-0 respectively to an accumulator?

a. RR & RL
b. RLC & RRC
c. RR & RRC
d. RL & RLC

ANSWER: b

Which among the single operand instructions complement the accumulator without
affecting any of the flags ?

a. CLR
b. SETB
c. CPL
d. All of the above

ANSWER: c

DJNZ R0,label is how many bit instruction?

a) 2
b) 3
c) 1
d) Cant be determined

Answer: a

JZ, JNZ, DJNZ, JC, JNC instructions monitor the bits of which register ?

a) DPTR
b) B
c) A
d) PSW

Answer: d
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

Answer: c

When the call instruction is executed the top most 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: b

LCALL instruction takes

a) 2 bytes
b) 4 bytes
c) 3 bytes
d) 1 byte

Answer: c

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: b

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: b

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
Answer: c

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 mentione

Answer: c

Does 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 second one is preferred

Answer: b

What is the clock source for the timers?

a) some external crystal applied to the micro-controller for executing the timer
b) from the crystal applied to the micro-controller
c) through the software
d) through programming

Answer: b

What is the frequency of the clock that is being used as the clock source for the
timer?

a) some externally applied frequency f�


b) controller�s crystal frequency f
c) controller�s crystal frequency /12
d) externally applied frequency/12

Answer: c

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 time

Answer: a

What is the maximum delay that can be generated with the crystal frequency of
22MHz?

a) 2978.9 sec
b) 0.011 msec
c) 11.63 sec
d) 2.97 msec

Answer: d

Auto reload mode is allowed in which mode of the timer?

a) Mode 0
b) Mode 1
c) Mode 2
d) Mode 3

Answer: c

Find out the roll over value for the timer in Mode 0, Mode 1 and Mode 2?

a) 00FFH,0FFFH,FFFFH
b) 1FFFH,0FFFH,FFFFH
c) 1FFFH,FFFFH,00FFH
d) 1FFFH,00FFH,FFFFH

Answer: c

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 timer
d) none of the mentioned

Answer: b

If Timer 0 is to be used as a counter, then at what particular pin clock pulse need
to be applied?

a) P3.3
b) P3.4
c) P3.5
d) P3.6

Answer: b

In the instruction �MOV TH1,#-3�, what is the value that is being loaded in the TH1
register ?

a) 0xFCH
b) 0xFBH
c) 0xFDH
d) 0xFEH

Answer: a

TF1, TR1, TF0, TR0 bits are of which register?

a) TMOD
b) SCON
c) TCON
d) SMOD
Answer: c

The open drain bidirectional (input or output) port with internal pullups is

a) Port 0
b) Port 1
c) Port 2
d) Port 3

Answer: a

If the EA(active low) signal is grounded then the execution

a) directly start from main memory


b) directly start from 16 bit address in main memory
c) directly start from 16 bit address in program memory
d) directly start from RAM

Answer: c

When the port lines of a port are to be used as input lines then the value that
must be written to the port address is

a) F0H
b) 0FH
c) FFH
d) 00H

Answer: c

Port 1 lines are used during programming of

a) external EPROM and EEPROM


b) external ROM and RAM
c) internal ROM and RAM
d) internal EPROM and EEPROM

Answer: d

Vous aimerez peut-être aussi