You are on page 1of 3

Week 5 : Assignment 5

The due date for submitting this assignment has passed.


Due on 2023-08-30, 23:59 IST.

Assignment submitted on 2023-08-30, 17:19 IST


1) In the x86 ISA, the instruction movsx copies a smaller register to a larger register and ___ 1 point

Pads the MSB bits with the sign bit

Pads the MSB bits with 0s

Pads the LSB bits with the sign bit

Pads the LSB bits with 0

Yes, the answer is correct.


Score: 1
Accepted Answers:
Pads the MSB bits with the sign bit

2) In the x86 ISA, the size of the modifier qword is ____ bits. 1 point

16

32

64

Yes, the answer is correct.


Score: 1
Accepted Answers:
64

3) Which instruction is not a single-operand ALU instruction in x86? 1 point

inc

dec

adc

neg

Yes, the answer is correct.


Score: 1
Accepted Answers:
adc

4) In the x86 ISA, the lodsd instruction transfers the contents of the memory address specified by ____ to _____. 1 point

eax, edi

esi, eax

edi, eax

eax, esi

Yes, the answer is correct.


Score: 1
Accepted Answers:
esi, eax

5) In the x86 ISA, the instruction rep inst executes the instruction inst n times, where n is the value stored in the ____ 1 point
register.

eax

ebx

ecx

edx

Yes, the answer is correct.


Score: 1
Accepted Answers:
ecx

6) Consider the following x86 assembly code sequence. 1 point

mov edx, 1
mov eax, 53
mov ebx, 3
idiv ebx

What is the final value of eax?

18

17

Yes, the answer is correct.


Score: 1
Accepted Answers:
17

7) Consider the following x86 assembly code sequence. 1 point

mov ecx, 24
mov eax, ecx
imul ecx
imul ecx

What is the final value of eax?

24

242

243

None of the options

Yes, the answer is correct.


Score: 1
Accepted Answers:
243

8) In the x86 ISA, the instruction cld sets the ____ to ____. 1 point

DF (direction flag), 1

DF (direction flag), 0

Z (zero flag), 1

S (sign flag), 1

Yes, the answer is correct.


Score: 1
Accepted Answers:
DF (direction flag), 0

9) Select the correct statement/s for the x86 ISA. Choose the most appropriate option. 1 point

The ffree instruction frees the register specified as an operand

The finit instruction resets the status of the FP unit including the FP stack and registers.

Using ffree to free the entire stack is a slow solution.

All of the options

Yes, the answer is correct.


Score: 1
Accepted Answers:
All of the options

10) In an x86 instruction, if the Mod field contains 11 then it indicates the 1 point

Register indirect addressing mode with no displacement


Indirect addressing mode with 1-byte displacement

Indirect addressing mode with 4-byte displacement

Register direct addressing mode

Yes, the answer is correct.


Score: 1
Accepted Answers:
Register direct addressing mode

You might also like