CA Assignment2
CA Assignment2
Instructions: Please follow below instructions. Failure to do so would result in deductions of marks.
Hardware:
Total steps in one repetition = 2 (i.e addition and shifting of registers)
Software:
Total steps in one repetition = 3 (i.e addition, shifting of multiplicand and shifting of multiplier)
0x33 = (51)10
0x55 = (85)10
(2 ×2 ×2 ×2 ×2 + 19) × 85
(2 ×2 ×2 ×2 ×2 + (2 ×2 ×2 ×2 + 3)) × 85
(2 ×2 ×2 ×2 ×2 + (2 ×2 ×2 ×2 + (2+1))) × 85
(25 + 24 + 2 + 1) × 85
As a result, the best way to calculate it would be summing the following values:
• Left shift 85 five times
• Left shift 85 four times
• Left shift 85 one time
• 85
Question 4 (10 marks) :
Using a table similar to that shown in Figure 3.10, calculate 74 divided by 21 using the hardware described in
Figure 3.8. You should show the contents of each register on each step. Assume both inputs are unsigned 6-bit
integers.