written 2.1 years ago by |
Solution:
Consider the multiplication of two n-bit numbers X and Y. The product Z can be at most 2n bits long.
In order to perform the whole operation in a single execution cycle, we require two buses of width n bits each to fetch the operands X and Y and a bus of width 2n bits to store the result Z in the memory.
Although this performs the operation faster, it is not an efficient way of implementation as it is expensive.
Many alternatives for the above method have been proposed. One such method is to use the program bus itself to fetch one of the operands after fetching the instruction, thus requiring only one bus to fetch the operands.
And the result Z can be stored back in the memory using the same operand bus.
But the problem with this is the result Z is 2n bits long whereas the operand bus is just n bits long. We have two alternatives to solve this problem, a.
Use the n bits operand bus and save Z at two successive memory locations. Although it stores the exact value of Z in the memory, it takes two cycles to store the result.
b. Discard the lower n bits of the result Z and store only the higher order n bits in the memory. It is not applicable for applications where an accurate result is required.
Another alternative can be used for applications where speed is not a major concern. In which latches are used for inputs and outputs thus requiring a single bus to fetch the operands and store the result.