# Courses/Computer Science/CPSC 355.W2014/Lecture Notes/InstrImpl

From wiki.ucalgary.ca

< Courses | Computer Science | CPSC 355.W2014 | Lecture Notes

# Instruction Implementation

Today we examined how these instructions are implemented in terms of logic gates, and how their functional units can form the basis for an implementation of other instructions.

- AND
- OR
- XOR
- NOT (logical negation, one's complement)
- NEG (arithmetic negation, two's complement)
- ADD (a combination of AND, XOR, and OR)

**Announcements**

- HW2 is due Feb 3
- Midterm exam is Feb 5
- Intel IA-32 developer manual: list of instructions
- Intel IA-32 developer manual: architectural detail (cf. http://www.cs.virginia.edu/~cs216/Fall2005/notes/x86-doc.pdf )

- Continue discussion of instruction implementation and use.

- How are INC and DEC implemented? Note that this is a good example of CISC vs. RISC again: e.g., ADD eax, 1 = INC eax
- INC
- DEC

- What are NOT and NEG?
- NOT
- NEG

- difference between arithmetic shift right and logical shift right
- examine instructions for manipulating binary values as bytes, words, double words, quad words
- signed vs. unsigned global variables

- (Integer) Multiplication and division
- IMUL
- IDIV