Arithmetic and immediates
addi is often the first instruction students truly internalize, because it
can initialize registers, advance pointers, and update counters. add and
sub extend that same pattern to two-register arithmetic. Instructions like
sll, srl, and sra add bit shifting, while
andi, ori, and xori support masking and toggling.
Loads and stores
lw and sw are usually the first memory instructions you need,
but the byte and halfword variants matter whenever layout and sign extension become part of
the problem. These instructions are easiest to learn by tracing the effective address and
checking memory after each step in the simulator.
Comparisons and branches
The branch family controls loops and conditionals. beq and bne
compare equality, while blt, bge, bltu, and
bgeu distinguish signed from unsigned comparisons. This distinction matters a
lot more once values stop being purely positive.