Made code for CPU.

finished writing CPU. Now debugging.