Base 2, Base 8 Multiplication and AdditionDate: 10/28/2001 at 19:53:33 From: Barbara Subject: Binary multiplication and adding Hello, Dr. Math! When you add binary numbers and you have 4 one's, so four in binary is 0100, and you add 1+1+1+1 = 4 but in binary is 0 and carry 0 or carry 1, for example this is multiplication and addition: 11011 x10111 __________ 11011 11011 11011 00000 11011 +__________ 111001101 Next is also multiplication and addition, for example: 10.01 x 1.01111 ____________ My answer is: 101.1000111 Is this correct or not? Thank you in advance for your help and explanation. Date: 10/29/2001 at 04:02:28 From: Doctor Jeremiah Subject: Re: Binary multiplication and adding Hi Barbara, The problem is that you can't add up more than two columns without considering what would happen if you had a carry greater than 1. This actually happens in your first question. You did the multiplication right, but when you added the five rows of numbers it should have gone something like this: Up to here it's fine: carry -> 1 carry -> 1111 11011 11011 11011 00000 + 11011 ----------- 01101 Notice there are two carries because 1+1 = 0 + 1 carry + 1+1 = 0 + 1 carry --------------------- 4 = 0 + 2 carries If we use both carries it continues like this: carry -> 11 carry -> 1111111 11011 11011 11011 00000 + 11011 ----------- 1001101101 Which is the right answer, because 11011 27 x 10111 x 23 ---------- ---- 1001101101 621 In your second question we need to to it the same way as with decimal: first count the decimals in the answer, then multiply them as if there were no decimals, then put in the decimal point afterward: 1001 x 101111 ----------- 1001 1001 1001 1001 0000 1001 Now we get to the addition: carry -> 1111 1001 1001 1001 1001 0000 1001 ----------- 110100111 Which makes our answer: 10.01 x 1.01111 ----------- 11.0100111 This makes sense because: 10.01 is just slightly greater than 2, 1.01111 is just slightly greater than 1, and the answer 11.0100111 is just slightly greater than 3 Imagine in decimal: 2.3 x 1.4 = 3.22 Your answer was larger than 5, and the only way to make that is for either both numbers to be greater than 2, or for one of them to be greater than 3. It always pays to check your answers. If this answer didn't contain enough detail for you, or if you just want to talk about this some more, please write back. - Doctor Jeremiah, The Math Forum http://mathforum.org/dr.math/ Date: 10/29/2001 at 17:13:28 From: Barbara Shaker Subject: Re: Binary multiplication and adding Thank you very much for your answer. It's enough and was very nicely explained. Now I understand that I can't have more than two carries. number. I have another question for you: when I do multiplication in octal I multiply in decimal and then convert to octal, but I wonder about the carry. For example: EF12 3456 (base 16) __________ 59A6C 4AB5A 3BC48 + 2CD36 ____________ 30DFF80C 4407 x2356 (base 8) ________ 33052 30443 15425 + 15016 _____________ 17120202 Is that correct or not? Can I do the multiplication this way? Thank you in advance for your answer and your help. Barbara Date: 10/29/2001 at 19:20:55 From: Doctor Jeremiah Subject: Re: Binary multiplication and adding Hi Barbara, All bases are done the same way. You do the mutliplication and then the addition with however many carries you need (the carries cannot exceed the base the question is in.) The same problem can happen in decimal. Add up 12 nineteens. The answer for the first column is 8 with a carry of 10, but you can't have a carry greater than 9, so you would have to have two carries: 9 and 1 carry -> 1 carry -> 29 19 19 19 19 19 19 19 19 19 19 19 + 19 ---- 228 Anyway, the question in hex was fine. I didn't see any problems. In the octal one you accidentally got the wrong answer for your multiplication. Here is the answer I got: 4407 x 2356 (base 8) -------- 33052 26443 15425 11016 And when you do the addition you only have to worry if your carry exceeds 7. It doesn't, so you get: 12211 33052 26443 15425 + 11016 ---------- 13100202 Here is how I miltiply things in bases other than 10. It works for me but it may not seem like a good way to you: In order to multiply bases other than 10 and 2, what you need to do is something in relation to base 10. For example, in octal 7*6 is the same as 7*5+7, and since octal 7 is just before the rollover (like decimal 9), in decimal the equivalent would be 9*5+7 = 52. That is the same answer as octal 7*5+7. In octal, 4*7 is the same as 4*6+4, and since octal 4 is halfway to the rollover (like decimal 5), in decimal the equivalent would be 5*6+4 = 34. That is the same answer as octal 4*6+4. In the end, you need to check your work. If you have access to a computer with Microsoft Windows you can click the start button and choose programs and then accessories and start the calculator. Make sure the calculator is in "scientific mode" on the view menu. Now you can choose any base you want out of 2, 8, 10, and 16. If you do a calculation or type a number in with one base, selecting a different base will convert the answer. Let me know if you want more explanation or if you have other questions. - Doctor Jeremiah, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994- The Math Forum at NCTM. All rights reserved.
http://mathforum.org/dr.math/