NPTEL Computer Architecture Week 5 Assignment Answers 2024

Sanket
By Sanket

NPTEL Computer Architecture Week 5 Assignment Answers 2024

1. In the x86 ISA, the instruction movzx copies a smaller register to a larger register and ___________.

  • 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 0s
Answer :- For Answers Click Here

2. In the x86 ISA, the size corresponding to the modifier dword (double word) is _________ bits.

  • 8
  • 16
  • 32
  • 64
Answer :- For Answers Click Here

3. Which instruction is not a single-operand ALU instruction in x86?

  • inc
  • dec
  • adc
  • neg
Answer :- 

4. Select the correct statement/s for the compare (cmp) instruction in x86. Choose the most appropriate option.

  • It does not have an explicit destination operand.
  • It performs the comparison by subtracting the value of the second operand from the first operand.
  • It sets the values of the flags.
  • All of the options
Answer :- 

5. Select the correct statement for the not instruction in x86.

  • It requires an explicit destination operand.
  • It computes the 1’s complement of the source operand.
  • It computes the 2’s complement of the source operand.
  • It sets the values of the flags.
Answer :- 

6. In the x86 ISA, the instruction rep inst executes the instruction inst n times where n is the value stored in the ______________ register.

  • eax
  • ebx
  • ecx
  • edx
Answer :- For Answers Click Here

7. Consider the following x86 assembly code sequence.

mov eax, 0xdeeddeed
shr eax, 4

What is the final value of eax?

  • 0xdeed0000
  • 0xdeeddee
  • 0xfdeeddee
  • 0xdeed
Answer :- 

8. Select the correct statement/s for the x86 ISA. Choose the most appropriate option.

  • The ffree instruction frees the register specified as an operand.
  • The finit instruction resets the FP unit, frees all the registers, and resets the stack pointer.
  • Using ffree to free the entire stack is a slow solution.
  • All of the options
Answer :- 

9. In the x86 ISA, the instruction std sets the ____________ to ___________.

  • DF (direction flag), 1
  • DF (direction flag), 0
  • Z (zero flag), 1
  • S (sign flag), 1
Answer :- 

10. In the x86 ISA, the stosd instruction transfers the contents of ____ to the memory address specified by _____.

  • eax, edi
  • edi, eax
  • ebx, edi
  • eax, esi
Answer :- For Answers Click Here
Share This Article
Leave a comment