CS201 Lab: Integer Multiplier

Objectives


A Note:


	The ALU is an important part of any computer. 
	Building an integer multiplier will give us insight of 
	how machines could multiply numbers and 
	it will introduce us to some of the issues of control unit operation.

Review of Integer Multiplier

Using 4-bit Adder


	Build the following circuit.  
	Obtain the "Adder-4" from the Simulation Logic library.  

It demonstrates the following: 1. How to use the Hex display and Keyboard. 2. How to use the 4 bit adder put hex keyboards on the inputs, a binary probe on the CO (carry out) line, a binary switch on the CI (carry in) line, and a hex display on the output.

Using the 4-bit Shift Register you built in the last lab


	Build the following testing circuit. 
	Using the Shift Reg-4 Right  you built in the last lab.

It demonstrates the following: 1. How to load a 4-bit value to the 4-bit shift register 2. How to Shift a bit to the 4-bit shift register The Shifting direction is SI -> Q3 -> Q2 -> Q1 -> Q0. 3. How to use binary probes on each output bit to make it easier to see what's happening in shift mode. With LD set to 0: The register is in parallel loading mode. Inputs D0 to D3 become outputs Q0 to Q3 on the next rising clock pulse. With LD set to 1: The register is in shifting mode. The SI (shift input) line is used to set the value to be shifted into the register. Shifting direction is SI -> Q3 -> Q2 -> Q1 -> Q0. Register is positive edge triggered.

Algorithm of using the mutiplier circuit


For the multiplier circuit: You do not build a control unit. 
You will be the brains of the circuit. 
The algorithm to use the circuit will be something like: 


Load up the Q register with the multiplier: 
LD of Q <- 0 
set Hex keypad 
toggle the Q clock 

Clear the A register: 
LD of A <- 1 
toggle the clock until clear 

Repeat 4 times: 
---------------
IF (LSB of Q = 1) 
{
ADD M register to A register: 
toggle the C clock 
LD of A<- 0 
toggle the A clock 

Shift C__A__Q: 
LD of Q <- 1 
toggle the Q clock 
LD of A <- 1 
toggle the A clock 
}
ELSE (LSB of Q = 0) 
{
Shift C__A__Q :
LD of Q <- 1 
toggle the Q clock 
LD of A <- 1 
toggle the A clock 
}



Assignments


Copyright: Department of Computer Science, University of Regina.