Engineering Questions with Answers - Multiple Choice Questions

# MCQs on Enhanced Instruction Set of 80386

1 - Question

Which of the following is not a newly added instruction of 80386, that are not present in 80286?
a) bit scan instructions
b) bit test instructions
c) shift double instructions
d) none of the mentioned

Explanation: The newly added instructions of 80386 are categorized into
1. bit scan instructions
2. bit test instructions
3. conditional set byte instructions
4. shift double instructions
5. control transfer via gates instructions.

2 - Question

The BSF (bit scan forward) instruction scans the operand in the order
a) from left to right
b) from right to left
c) from upper nibble
d) none of the mentioned

Explanation: The BSF (bit scan forward) instruction scans the operand from right to left.

3 - Question

The BSR (bit scan reverse) instruction scans the operand in the order
a) from left to right
b) from right to left
c) from upper nibble
d) none of the mentioned

Explanation: The BSR (bit scan reverse) instruction scans the operand from left to right.

4 - Question

If a ‘1’ is encountered when an operand is scanned by BSF, then
a) zero flag is reset
b) zero flag is set
c) VM flag is set
d) RF flag is reset

Explanation: The BSF instruction scans the operand from right to left. If a ‘1’ is encountered during the scan, zero flag is set, and the bit position of ‘1’ is stored into the destination operand.

5 - Question

If a ‘1’ is not encountered when an operand is scanned by BSR, then
a) zero flag is reset
b) zero flag is set
c) VM flag is reset
d) RF flag is set

Explanation: The BSR instruction scans the operand from left to right. If a ‘1’ is not encountered during the scan, zero flag is reset whether the scan is BSF or BSR.

6 - Question

Which of the following is not a bit test instruction?
a) BTC
b) BTS
c) BSF
d) BTR

Explanation: The instruction, BSF, is a bit scan instruction. The four bit test instructions are:
BT (Test a Bit), BTC (Test a Bit and Complement), BTR (Test and Reset a Bit) and BTS (Test and Set a bit).

7 - Question

In case of BT instruction, if the bit position in the destination operand specified by the source operand, is ‘1’, then
a) zero flag is reset
b) carry flag is set
c) VM flag is set
d) RF flag is reset

Explanation: In case of BT instruction, if the bit position in the destination operand specified by the source operand, is ‘1’, the carry flag is set, otherwise it is cleared.

8 - Question

Which of the following is not a conditional set byte instruction?
a) SETNP
b) SETO
c) SETNAE
d) SHRD

Explanation: The SHRD (Shift Right Double) is a shift double instruction.

9 - Question

The instruction that shifts the specified number of bits in the instruction, from the upper side of the source operand into the lower side of the destination operand is
a) SHRD
b) SHLD
c) SETNS
d) None of the mentioned

Explanation: The SHLD instruction shifts the specified number of bits in the instruction, from the upper side (i.e. MSB) of the source operand into the lower side (i.e. LSB) of the destination operand.

10 - Question

The instruction that shifts 8 LSB bits of ECX into the MSB positions of EAX, one by one starting from LSB of ECX is
a) SHLD ECX,EAX,8
b) SHLD EAX,ECX,8
c) SHRD ECX,EAX,8
d) SHRD EAX,ECX,8