Enhance the 8-Bit CPU

Objective of this lab:


	To study the operation of a CPU and the control unit. 
	To enhance the ALU of the 8-bit CPU.

Preparation


	Read lab lecture notes.

Lab Assignments

  1. Add OR operation to the 8-bit CPU that we have learned.
    
     	opcode# MNEMONIC                 DESCRIPTION
            ==============================================================
            00      XOR source, destination  XOR the contents of source,
                                             destination, and store the
                                             result in the destination
            --------------------------------------------------------------
            01      AND source, destination  AND the contents of source,
                                             destination, and store the
                                             result in the destination
            --------------------------------------------------------------
            10      NOT source, destination  invert the contents of
                                             source and store the result
                                             in destination
            --------------------------------------------------------------
            11      OR source, destination   OR the contents of source, 
    					 destination,  and store the 
    					 result in destination
            --------------------------------------------------------------
    
    
    
    Please note that the ALU will need two 8-bit operands input and produce the output of the ALU.
    Hand in a screen shot showing your new ALU in the 8-bit CPU circuit.

  2. Implement the following tasks with your enhanced 8-bit CPU, remember to pre-load the registers or memory when needed:
    
    	1) Write out and hand in the microinstructions to perform this operation 
    	   XOR #5,(C) 
    	   including the machine code and how you load it to the memory.
    
    	   Pre-load the registers or memory when needed.
    	   For example:  Load 00001000  to the C register
         			 Load 00000000  to the memory location 8
    
    	2) Write out and hand in the microinstructions to perform the operation
    
    	   OR 5, 8
    	   including the machine code and how you load it to the memory.
    
    	   Pre-load the registers or memory when needed.
    	   For example:  Load 00000000  to the memory location 5
    			 Load 00001010  to the memory location 8
    
    	

Question (hand in your answer)

 
	   Describe how unconditional branches could be added to the CPU and 
	   what additional things this would require. 
	   Remember that a branch instruction uses an offset from the current 
	   location. 

	   Hand in your answer for this question.



Copyright: Department of Computer Science, University of Regina.