If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Algebra (all content)

### Course: Algebra (all content)>Unit 1

Lesson 14: Binary and hexadecimal number systems

# Multiplying in binary

To multiply numbers in base 2, we can use the same process as we would in base 10, but with only two digits: 0 and 1. Start by multiplying the rightmost digit of one number by each digit of the other number, working left. Keep track of any "carries" (when the product is 2, carry over a 1 to the next column). Finally, add up all the partial products.

## Want to join the conversation?

• How would you go about multiplying hexadecimal numbers (for example: AF3 * FF) ?
• I believe your question was how to perform multiplication using the hexadecimal numbers (not converting them into decimal or binary first). If this is correct, then the following work shows the steps. Unfortunately, this may be very difficult to follow because of my methods of calculating and the fact that I cannot write out my steps in the way Sal Khan does (so I apologize in advance):
(Reminder: 10 = A, 11 = B, 12 = C, 13 = D, 14 = E, 15 = F)
AF3 * FF
AF3 * F => A00 * F + F0 * F + 3 * F =>
// Note: This expansion comes from the distributive property and understanding
place value (e.g., by seeing the A in the far left as the value A00)
3 * F = 2D
F * F (or (10 - 1) * (10 - 1) = 101 - 20 = E1
// Note: 10 represent 1 sixteen and 0 ones, which is why 10 - 2 = E (not 8)
So ... F0 * F + 2D = E3D
A * F (or (10 - 6) * (10 - 1) = 106 - 70 = 96
So ... A00 * F + E3D = A43D
AF3 * FF = AF3 * F + AF3 * F0 = A43D + A43D0 = AE80D
AF3 (dec --> 2560 + 240 + 3 = 2803) times FF (dec --> 255) = AE80D (dec --> 655360 + 57344 + 2048 + 0 + 13 = 714765)
|| Q.E.D. ||
• Can you also divide in binary terms?
• Here is an example of using the long division algorithm with binary numbers. As Poveda7938 stated, it is easy (due to the simplicity of numbers in each place, that is, 0 or 1).
I apologize for the formatting issues; it's not accepting my text as typed, so I am writing the steps you would take to show long division.
216/8 --> 8 | 2 1 6 // Note that 216 = 128 + 64 + 16 + 8 or (11011000 in binary)

Quotient is 00 011 011 ( 10 000 + 1 000 + 000 + 10 + 1)
1 000 | 11 011 000
10 000 * 1 000 = 10 000 000
11 011 000 = 10 000 000 = 1 011 000
1 000 * 1 000 = 1 000 000
1 011 000 - 1 000 000 = 11 000
10 * 1 000 = 10 000
11 000 - 10 000 = 1 000
1 * 1 000 = 1 000
1 000 - 1 000 = 0

11 011 * 1 000 = 11 011 000
27 * 8 = 216
• is binary useful or a just skill to learn for the fun of it?
• It is useful if you want to pursue a career in the field of computer science and engineering.
• How would you carry two ones?
• Same logic, even if when you carry two ones from addition in the previous place, you also get two more ones from addition in the next place, you keep in mind that:

1 (decimal) = 1 (binary)
2 (decimal) = 10 (binary)
3 (decimal) = 11 (binary)
4 (decimal) = 100 (binary)

And you're ready to go; just carry a one one place further to the left, and that's it.

Hope this helps!
• How do you divide binary numbers?
• Thanks for the Video, but what if we have a number negative multiplying in positive number how should we do that ? i didn't find videos in this case
• As you know, a negative number multiplied by positive is equal to a negative number. -X * -X = +X, -X * X = -X, X * X = X
(1 vote)
• Can you do negative binary numbers like our normal base-10 negative numbers.
For example, in base 10, you just put a negative sign in the back of the number and it turns negative like 2 ----> -2. Would it be the same for binary? 11 is binary for 3, so would -11 mean binary for -3?
• Is dividing in binary the same as it is in decimal?
• I don't understand why :
-9 is represented as 1001
-7 is represented as 101
WHY IS IT SO?
• 1001
8421
8001 <--> 1001

101
421
401 <--> 101 ((btw 101 is represented as 5 not 7 ))
add 4 and 1 = 5
i have a hard time explaining it just try analyzing that :v
oh and its been a year since u asked this but still hope it helps some who also had a hard time understanding that part -w-