Intel Flashcards
What is the relationship between “machine code” and “assembly language”?
one to one relationship/correspondence
What is the layout of the rax register?
There are 64 bits inside rax. The bit labeled “63” is the most significant bit and down to the “0” bit which is the least significant. A group of the bits from rax can be manipulated by referencing eax. eax contains 31:0 bits. ax has 15:0 bits. ah is 15:8 and al is 7:0.
how many bits are in al?
8
how many bits are in rcx?
64
how many bits are in bx?
16
how many bits are in edx?
32
If al is set to 0x05 and ax is set to 0x0007, eax is set to 0x00000020, and rax is set to 0x0000 0000 0000 0000. what is the final complete contents of the complete rax register?
rax = 0x0000 0000 0000 0000, the lower sub-registers data are overwritten.
What does the rip register refer to?
instruction pointer: the next instruction to be executed
what does the rsp register refer to?
the stack pointer, points to the current top of the stack
Draw a picture of the VonNeumann Architecture.
CPU, RAM (primary storage), secondary storage, and I/O are all connected by a bus.
If the rax register is set to 81985529216486895 in base 10 (123456789abcdef in base 16), what are the contents of the following registers in hex? al = ? ax = ? eax = ? rax = ?
al = ef ax = cdef eax = 89ab cdef rax = 0123 4567 89ab cdef
what is the hex, byte size, two’s compliment representation of -7 (base 10) on Intel x86-64.
0xF9
What is the hex, word size, two’s compliment representation of -9 (base 10) on Intel x86-64.
0xFFF7
What is the hex, double-word size, two’s compliment representation of -9 (base 10) on Intel x86-64.
0xFFFF FFF7
What is the decimal representation of FFFF FFFB (base 16, double-word size, two’s compliment) on Intel x86-64.
-5
What is the decimal representation of C144 0000(base 16)? Assume IEEE 32 bit floating point format on Intel x86-64.
-12.25
On the Intel 80x86 base architecture, how many bytes can be stored at each address?
1 byte (according to quiz 2 question 8)
What is the hex, double-word size, two’s compliment representation of -11 (base 10) on Intel x86-64?
0xFFFF FFF5
What is the decimal representation of FFFF FFFD (base 16, double-word size, two’s compliment) on Intel x86-64.
-3
What is the IEEE 32-bit floating point representation of 11.125 (base 10) on Intel x86-64. Give final answer in hex.
0x4132 0000
Given the following code:
mov rax, 9
mov rbx, 2
add rbx, rax
what would be in the rax and rbx (64 bit) registers after execution on Intel x86-64. Give answer in hex.
rax = 0x0000 0000 0000 0009 rbx = 0x0000 0000 0000 000B
Given the following code fragment:
mov eax, 4
mov ebx, 7
sub eax, ebx
what would be in the eax and ebx (32-bit) registers after execution on Intel x86-64. Give answer in hex.
eax = 0xFFFF FFFD ebx = 0x0000 0007
Given the following code fragment:
mov rax, 4
mov rbx, 3
imul rbx
what would be in the rax and rbx (64-bit) registers after execution on Intel x86-64. Give answer in hex.
rdx:rax = 0x0000 0000 0000 0000 : 0000 0000 0000 000C
given the following code fragment:
mov rax, 5
cqo
mov rbx, 3
idiv rbx
what would be in the rax and rdx (64-bit) registers after execution on Intel x86-64. Give answer in hex.
rax = 0x0000 0000 0000 0001 rdx = 0x0000 0000 0000 0002