Architecture 06 Flashcards

1
Q

What are the key instruction groups?

A
  • Data transfer (mov)
  • Arithmetic (add, imul)
  • Control flow (jumping to different place, ret)
  • Logic (and, or, xor, not)
  • Shift and rotate
  • Comparisons (to set flags)
  • ‘None of the above’
  • Extensions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is meant by zero-extend?

A

When copying a short integer to a long integer, doubleword operations set higher 32 bits of 64 bit value to 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is meant by sign-extend?

A

When copying a short integer to a long integer, some other mov instructions multiply the sign bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the ‘xchg’ instruction?

A

Instruction exchanges source and destination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the ‘lea’ instruction?

A

“Load effective address” is like mov except that a computed address (rather than content of address) is put in the destination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the difference between ‘mul’ and ‘imul’?

A

• ‘mul’ is unsigned
• ‘imul’ is signed
(Typically one operand involves rax)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly