## Example: `addi`
```mips
addi $8, $0, 5
```
001000 00000 01000 0000000000000101
- **WB:** result from ALU (5), written to register $8 (specified by rt)
- RegWrite set to 1
- RegDst set to 0
- MemtoReg set to 0
# Supporting More Instructions
## Load Instruction
Let's describe what happens for a load operation like
```mips
lw $8, 4($9)
```
100011 01001 01000 0000000000000100
- IF:
- ID:
- EX:
- MEM:
- WB:
## Exercise: Store Instruction
Describe what happens for a store operation like
```mips
sw $8, 4($9)
```
101011 01001 01000 0000000000000100
- IF:
- ID:
- EX:
- MEM:
- WB:
## Exercise: Branches
Describe what happens for a branch instruction like
```mips
beq $8, $9, 5 #jump ahead 5 instructions
```
000100 01000 01001 0000000000000101
- IF:
- ID:
- EX:
- MEM:
- WB:
# Performance Issues
## Performance Issues
- Longest delay determines clock period
-
Some stages of the datapath are idle waiting for others to finish
-
Can improve performance by **pipelining**