Engineering Questions with Answers - Multiple Choice Questions

# MCQs on Arithmetic and Logic Instructions

1 - Question

a) some immediate data
b) any register
c) accumulator
d) memory

2 - Question

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

Explanation: DAA command adds 6 to the nibble if any of the nibbles becomes greater than 9.

3 - Question

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

Explanation: SUBB command subtracts with borrow the contents of an accumulator with that of the register or some immediate value. So A-R4 is being executed.

4 - Question

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

Explanation: When we divide two numbers then AC and CY become zero.

5 - Question

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

Explanation: In 8 bit operations, if a carry is generated from D6 or D7 bit, then OV flag is set to 1.

6 - Question

In unsigned number addition, the status of which bit is important?
a) OV
b) CY
c) AC
d) PSW

Explanation: If unsigned numbers operations are involved, then the status of CY flag is important and in signed number operation the status of OV flag is important.

7 - Question

Which instructions have no effect on the flags of PSW?
a) ANL
b) ORL
c) XRL
d) All of the mentioned

Explanation: These instructions are the arithmetic operations and the flags are affected by the data copy instructions, so all these instructions don’t affect the bits of the flag.

8 - Question

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

Explanation: ANL instruction is used to AND the contents of the two registers and is also used to mask the status of the bits of the register.

9 - Question

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

Explanation: In CJNE command, the pointer jumps if the values of the two registers are not equal and it resets CY if the destination address is larger then the source address and sets CY if the destination address is smaller then the source address.

10 - Question

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