Question
4. [10 marks] Multiply the following 4-bit unsigned binary numbers. Present your work in the following format: i) Show the initial value of the accumulator,
4. [10 marks] Multiply the following 4-bit unsigned binary numbers. Present
your work in the following format: i) Show the initial value of the
accumulator, and ii) Show each new distinct value of the accumulator up to
and including the final answer. As before, show both binary and hexadecimal.
a) [5 marks] x = 1001 (multiplicand) and y = 1101 (multiplier)
* 0000 0000 = 00
Given 4 bit unsigned numbers which are x = 1001, y= 1101
-The hexadecimal equivalent of given binary numbers are x=9(a?), y=D
- lets take accumulator of 8 bit fruitfully as A = 0000 0000(2)= 00(16)
- Then multiply the binary numbers and store result in A.
1001 x 1101
1001
0000
1001
1001
01110101 A = 01110101(2)= 75(16)
b) [5 marks] x = 1101 (multiplicand) and y = 1011 (multiplier)
* 0000 0000 = 00
Given 4 bit unsigned numbers are x=1101, y=1011, x=D, y=B
Let Accumulator A= 0000 0000(2)= (00)(16)
Then by multiplying x and y and store result in A.
1101 x 1011
1101
1101
0000
1101
10001111 A = 10001111(2)= 8F(16)
******************************************************************
***QUESTION 4 IS NEEDED TO ANSWER QUESTION 5! ******
******************************************************************
5. [30 marks] Integer Multiplication.
a) [10 marks] Redo the multiplication steps exactly as in question 4 a).
But initialize the accumulator to 1011 instead of 0000. What are the
successive distinct values of the accumulator?
b) [10 marks] Show that, regardless of the initial value of the accumulator,
the fused multiply-add result of two n-bit natural-number operands is always
representable in 2*n bits.
c) [10 marks] A modular-adder device 'M' operates with n-bit registers. You
feed it two n-bit natural numbers 'a' and 'b'. It adds them, divides by 2^n,
keeps the quotient 'q' a secret, and publishes the remainder 'r'. Hint:
Before answering, experiment with small addition tables.
i) [5 marks] If a = 2^(n-1) and r = 2^n - 1, what are 'b' and 'q'?
ii) [5 marks] If a = 2^(n-1) and r = 2^(n-1) - 1, what are 'b' and 'q'?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started