Return To CS 301 Lab Home

Colour Theme   Font Size Options
 
   
   
   

Learn an 8-Bit CPU

Objective of this lab:


	To study the operation of an 8-bit CPU and control unit. 

Preparation


	Read lab lecture notes and the material in this page.

Lab Assignments

Please submit Lab4.circ inculding a 8-bit CPU working circuit.

Please submit Lab4.pdf inculding the following:

  1. Open your 8-bit CPU working circuit file
    
    	Do the following operations: 
        
    	1).	store number 8 (00001000) in memory location 5  (00000101) 
    
    	2).	load PC with the contents in memory location 5  
    
    	3).	increment the PC 
          
           
          Write down the microinstructions to make the above operations happen and hand-in:
    
            ________________________________
    
            ________________________________
    
            ________________________________
    
            ________________________________
    
    
  2. Complete the following steps to Execute the program and Hand in all the micro instructions that are required for each step.
    
    a).	Write out the equivalent assembly language mnemonics of the following 
    	machine language code:
    
    	
          Location     Contents 	   Assembly Language Mnemonics 
          =============================================================
          00000000	   10000001  
          -------------------------------------------------------------
          00000001	   00010110  
          -------------------------------------------------------------
          00000010     00000101  
          -------------------------------------------------------------
          00000011	   00001000  
          -------------------------------------------------------------
    
    b). Store the above program (in machine code) to the memory. c). Pre-load value 1 in the B register, preload/store 00000000 in the memory location 8 (00001000). d). Write out the microinstructions necessary to execute the program. To execute the program, make sure the PC points to the beginning of the program. Hand in the procedures used in the different steps including the equivalent assembly language mnemonics and microinstructions needed for pre-loading and executing the program.
  3. Implement the following tasks 1) & 2) with your 8-bit CPU circuit.
         Note: Please provide all the microinstructions for the following steps:
         a).  Translate the assmbly language mnemonics into machine code.
         b).  Store the machine language code to the memory, get ready to be executed.
         c).  Preload  operands accordingly.
         d).  Run/execute the program.
    
    
            1) Write out and hand in the microinstructions to perform this operation
    
               XOR #5,(C)
               including the machine code and how you store the machine language code to the memory.
    
               Pre-load the registers or memory when needed.
               For example:  Load 00001000  to the C register
                             Store 00000000  to the memory location 8 (00001000)
    
            2) Write out and hand in the microinstructions to perform the operation
    
               OR 5, 8
               including the machine code and how you Store the machine languge code to the memory.
    
               Pre-load the registers or memory when needed.
               For example:  Store 00001010  to the memory location 5 (00000101)
                             Store 00000000  to the memory location 8 (00001000)
    
            


Copyright: Department of Computer Science, University of Regina.