Processor Operations
CPUs typically provide operations for:
- data movement (reg-to-reg, reg-to-mem)
- arithmetic calculation (e.g. + - * /)
- logical calculation (e.g. && || !)
- comparison (e.g. ==, >, <, >=, <=)
- bit manipulation (e.g. ~ & | ^ >> <<)
- program control (goto)
With move, cmp, goto, add, can program anything.
What's the minimum number of operations needed?
One ... sbn (subtract and branch if negative)}
Index