CS255 Syllabus
Encoding computer instruction
- Computer instruction consists of 3 parts:
- Operation (e.g., Add, Subtract, Compare, etc)
- Source operands (depends on operation)
- Destination (depends on operation)
- Types of computer instructions
- Binary operation: takes 2 operands and produce 1 output - example: Add
- Unary operation: takes 1 operands and produce 1 output - example:
Negate
- Some operation does not take any operands - example: HALT
- Each computer has its own instruction code...
so we have to be very general in this discussion...