Architecture Flashcards
1
Q
What part of a computer executes machine code?
A
- CPU
- machine code instructions are processed by the CPU
- each instruction is a primitive command that executes a specific command, such as moving data
- written in HEX
2
Q
What translates machine code into assembly language?
A
- Assembler
- NASM (Netwide Assembler)
3
Q
ISA
A
- Instruction Set Architecture
- set of instructions that a programmer (compiler) must understand and use to write a program
- memory, registers, instructions, etc.
- EX: x86 instruction set (or architecture)
4
Q
What does 32 or 64 refer to in ISA?
A
- width of the CPU registers
- each CPU has a fixed set of registers
- registers are temporary variables used by the CPU to get and store data
- EX: GPRs (General Purpose Registers)
5
Q
What are the eight general purpose registers?
A
- EAX
- ECX
- EDX
- EBX
- ESP
- EBP
- ESI
- EDI
6
Q
EAX
A
- Accumulator
- used in arithmetic operation
7
Q
ECX
A
- Counter
- used in shift/rotate instruction and loops
8
Q
EDX
A
- Data
- used in arithmetic operation and I/O
9
Q
EBX
A
- Base
- used as a pointer to data
10
Q
ESP
A
- Stack Pointer
- pointer to the top of the stack
11
Q
EBP
A
- Base Pointer
- pointer to the base of the stack
12
Q
ESI
A
- Source Index
- used as a pointer to a source in stream operation
13
Q
EDI
A
- Destination
- used as a pointer to a destination in stream operation
14
Q
What is the additional register that is important for x86 architecture?
A
- EIP
- The Instruction Pointer
- controls the program execution by storing a pointer to the address of the next instruction (machine code) that will be executed.
- it tells the CPU where the next instruction is
15
Q
What are the four regions that process memory is divided into?
A
- text
- data
- the heap
- the stack
16
Q
Text Region
A
- instruction segment
- contains the program code (instructions)
- marked as read-only since the program should not change during execution