FONT SIZE : AAA
The simplest approach to binary multiplication is essentially long multiplication applied to binary numbers. Consider a basic example of a decimal long multiplication first to remind us of the basic concept, take a multiplication of two numbers 23 and 17:
×
2 3
1 7
1 6 1
0 2 3
0 3 9 1
This can be implemented using binary numbers in exactly the same way, except instead of decimal numbers, the arithmetic is binary. Consider the multiplication of two unsigned binary numbers for 6 (0110) and 4 (0100). Simply take each bit of the multiplier (4 in this case) and if it is zero, add nothing, but if the bit is one, add the shifted multiplicand (6 in this case). This is illustrated in the binary multiplication below:
0110 6
0100 4
0000
0000
0110
0000
0011000 24
Figure 26.1 Basic signed multiplication.
The way we can often implement this in practice is to have a “partial product” and then add the shifted multiplicand (or zeros) at each stage of the process until the multiplication is complete. While this approach works for unsigned binary numbers, it does not work for two’s complement numbers. In the case of two’s complement, using a similar approach requires the addition of sign bits to the left of the shifted multiplicand at each stage and then a final step of negating the multiplicand and adding the final shifted value to the partial product. A simpler approach that lends itself well to hardware implementation is simply to test whether a number (or both) are negative, invert to obtain the magnitude of each number if necessary, carry out an unsigned multiplication, then, depending on how many of the arguments are negative, invert the output (two’s complement). The method of checking for negative numbers is relatively simple, as an XOR function on the MSB of the two input signed numbers will tag whether the output needs to have a two’s complement taken. This is shown schematically in Figure 26.1.
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Active Active
RoHS: No RoHS
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Obsolete -
RoHS:
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Obsolete -
RoHS:
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Obsolete -
RoHS: No RoHS
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Any -
RoHS:
Support