1/60
Learn CPU, Memory, and Instructions
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
CPU (Central Processing Unit)
Executes instructions; performs arithmetic, logic, control, and I/O operations
Register
small, fast storage inside the CPU used to hold data or addresses during computation
Memory (RAM)
volatile storage for program data and instructions while running
Instruction
a binary operation telling the CPU what to do (e.g., ADD, MOV, JMP)
Instruction Set Architecture (ISA)
defines CPU instructions, registers, data types, and memory model (e.g., x86, ARM)
Opcode
the part of an instruction specifying the operation to perform
Operands
the data or addresses used by an instruction
Assembler
program that converts assembly code into machine code (object files)
Linker
combines multiple object files and libraries into a single executable
Loader
loads executable code into memory and prepares it for execution
Disassembler
converts binary machine code back into readable assembly
Compiler
translates high-level language (C, C++) into assembly or machine code
Debugger
tool for running code step-by-step, examining registers, memory, and instructions
MOV
copies data from one location/register to another
CMP
compares two values by subtracting; result affects flags but doesn’t store a value
JMP/JE/JNE/JL/JG
jumps to a different instruction (conditional or unconditional branch)
PUSH/POP
adds or removes data from the top of the stack (updates stack pointer)
CALL/RET
used for function calls and returns; pushes return address then pops it
LEA (Load Effective Address)
loads the address of a memory operand into a register
NOP
“no operation” → instruction that does nothing (often for padding)
FLAGS Register (EFLAGS/RFLAGS)
holds condition bits (Zero, Sign, Carry, Overflow) for conditional operations
Stack
memory region growing downward; stores local variables, return addresses, and saved registers
Stack Frame
portion of stack for a single function’s locals and saved context
EBP/RBP
points to the start of the current stack frame (base pointer)
ESP/RSP
points to the top of the current stack (stack pointer)
EIP/RIP
holds the address of the next instruction to execute (instruction pointer)
Endianess
byte order of data in memory (little endian = least significant byte first, used by x86)
Register File
the collection of all general-purpose, segment, and special purpose registers in the CPU
EAX
accumulator / return value
EBX
base
ECX
loop control
SI
source index
DI
destination index
SP
stack pointer
BP
base pointer
Control Flag
controls the operation of a processor
Direction Flag
determines the direction of data moving in memory
Status Flag
reflects the outcome of arithmetic and logical operations by the CPU
Zero Flag
indicates the result of arithmetic (logical) operations
What does ASCII stand for?
american standard code for information interchange
Virtual Machine
a software program that emulates the functions of some other physical or virtual computer
Effective Address
the computed memory address from a combination of base, index, scale, and displacement (e.g., [ebx + esi*4 + 8])
Addressing Modes
ways to reference data: immediate (mov eax, 5), register (mov eax, ebx), or memory (mov eax [ebx+4])
Immediate Operand
a constant encoded directly in the instruction (e.g., mov eax, 10)
Direct Addressing
refers to a specific memory address (e.g., mov eax, [0×12345678])
Indirect Addressing
accessing memory via a register pointer (e.g., mov eax, [ebx])
Displacement
a fixed offset added to an address ([ebp - 0×4])
Byte
8-bit
Bit
boolean variable indicating true (1) or false (0)
Word
16-bit
Dword (Double Word)
32-bit
Qword (Quad Word)
64-bit
SECTION / SEGMENT
defines part of a program (e.g., .text, .data, .bss)
ZF (Zero Flag)
set if result of operation is zero
SF (Sign Flag)
set if result is negative (sign bit set)
CF (Carry Flag)
set if addition/subtraction produces a carry/borrow
OF (Overflow Flag)
set if signed arithmetic overflows
PF (Parity Flag)
set if number of 1 bits in result is even
AF (Adjust Flag)
used in BCD (Binary Coded Decimal) arithmetic
Offset
distance or displacement (in bytes) from a known base address in memory. Tells the CPU how far to move from a starting point to find a specific variable, instruction, or data value
Heap
dynamic memory that contains variables and data created and destroyed during program execution