Page 30 - CodePilot V5.0 C7
P. 30
BINARY MULTIPLICATION
To multiply binary numbers, follow these steps:
Step 1 Align the binary numbers you want to multiply, one below the other.
Step 2 Multiply each digit in the first number by each digit in the second number, starting
from the rightmost digit of the second number.
Step 3 If both digits are 1, the result is 1; otherwise, the result is 0.
Step 4 Write the partial product for each multiplication.
Step 5 Shift the partial products one place to the left for each successive digit of the second
number.
Step 6 Add all the partial products. If the sum exceeds 1, follow the binary addition rules
(write 0 and carry over 1).
Step 7 Repeat the steps for all digits in the second number, moving from right to left.
Step 8 Once you’ve processed all the digits, the result is the final product.
Truth table for binary multiplication:
A B A x B
0 0 0
0 1 0
1 0 0
1 1 1
Example 1: Multiply 1110 and 101 Example 2: Multiply 1001 and 111
1 1 1 0 1 0 0 1
× 1 0 1 × 1 1 1
1 1 1 0 1 0 0 1
0 0 0 0 x 1 0 0 1 x
1 1 1 0 x x 1 0 0 1 x x
1 0 0 0 1 1 0 1 1 1 1 1 1
Therefore, 1110 × 101 = 1000110 Therefore, 1001 × 111 = 111111
BINARY DIVISION
To divide two binary numbers, follow these steps:
Step 1 Write the dividend (the number you want to divide) and the divisor (the number
you’re dividing by) in the long division format.
Step 2 Start by dividing the first part of the dividend by the divisor. If the divisor fits, write 1 in
the quotient. If it doesn’t, write 0.
28
CodePilot (V5.0)-VII

