A little help with some binary please...

Associate
Joined
19 Sep 2005
Posts
1,242
Hi,

Doing some binary multipication and I'm a little stuck.

My working is as follows:

binarymult.jpg


The problem comes when adding it all up. I understand that for adding four 1's, it equals 0 carry 2. When I come to add up the next set of digits, I have three 1's and 2 already being carried. What happens then? :confused:

Any help appreciated.
 
You need to understand exactly what binary means, then it will be much clearer to you. Try turning it into a real number and doing the addition that way, then put that back into binary so you can see what the result should look like.
 
Binary multiplication? Is that actually possible with a simple method?

Why not? It's just the same as decimal multiplication, but you only use 1s and 0s!

Back to the OP, you mention that 4 1s added up is 0 with 2 carried.
IMO you should think all in terms of binary, i.e. 1 + 1 + 1 + 1 = 100, so it's 0 and you're carrying 10.
So, in the next column it's 0 and then 1 is the one after this.
 
64 + 32 + 00 + 8 + 4 + 0 + 1
x 32 + 0 + 8 + 0 + 2 + 1

I think...haven't done binary mathematics in a couple of years...used to do full silly maths with binary, hex, oct etc.

Edit: I'm quite likely wrong. :p :D

InvG
 
Last edited:
I'd have thought (can't remember much of my BSc CompSci) but I'd have though that carrying 2 would equate to carrying 10. You'd effectively carry 0 to the first left, then 1 to the next left

001
001
001
001

You add the ones which gives 4, which equals 100 - this would carry like this:

10 (the carry)
001
001
001
001
--0

The end result would give you an answer of 100 - which is 4 :)

(Think Haircut above put it more gracefully)
 
Last edited:
Just bothered to work it out manually (because Start->Programs->Accessories is too much like hard work).
1001001001111
The problem comes when adding it all up. I understand that for adding four 1's, it equals 0 carry 2. When I come to add up the next set of digits, I have three 1's and 2 already being carried. What happens then? :confused:
Well think of it like having 5 1s.

Start with the first 2
1 + 1 = 0 carry 1
Then the next 2,
0 + 1 + 1 = 0 carry 2
Then the final 1,
0 + 1 = 1 carry 2

So if you carry 2 x 1, then add 3 x 1 the 2 x1 end up rolling over and you end up with 1 in that position.
 
Last edited:
Think the answer is:

100100100111

hope this comes out ok, but the carry's look like:

Code:
---1-1-------
-11101011----
_____________
-----1101101
----1101101-
---0000000--
--11-11-1---
-0000000----
11-11-1-----
_____________
1001001001111

Edit to follow... :)
 
Last edited:
You certainly were. Surely my gratitude is prize enough? :D

Haircut/ Poweredge... any chance I could add you to MSN? Just started my CS degree and maths isn't my strong point... especially when it's taught by a ukrainian lecturer.
 
Back
Top Bottom