Question
Let for the sake of an example we have a three-bit integer x and a five-bit integer y and we multiply them z=x*y. The result
Let for the sake of an example we have a three-bit integer x and a five-bit integer y and we multiply them z=x*y. The result z is an eight-bit integer and let the cost of multiplication is 3 \cdot 5 = 15 bit operations.Why is it so? x is 3-bit i.e. $x< 2**3$. Likewise $y < 2**5$. Then $z=x*y < 2**8$ and the conclusion about the 8 bit of z follows. You are now given four integer numbers $a, b, c, d$ with $2n$, $3n$, $n$, $4n$ bit respectively. We want to compute the product $E=a*b*c*d$ in as few bit operations as possible. What is the best cost schedule to achieve this ? Comment on the schedule of multiplications by providing an answer that describes the total overall cost in terms of bit operations. For example the answer can be of the form: 5*n or 5*n**2 or 5*n*n. (None of those three examples is the answer.)
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