**Similar Questions for How To Multiply Binary Numbers from ***Yahoo Answers***Question**How do you multiply binary numbers?Hey guys. I am so confused in how to multiply binary numbers. My math teacher gave my a worksheet on it and it is so confusing! it has numbers like 1two and stuff. PLZ HELP ME!!!

**Answer**multiply to the 10 power

**Question**How do computers multiply numbers?How do computers multiply numbers?
Thanks for the 3rd answers. Its really good but im just not getting it. If anyone could simplify that it would be great. But the 3rd answers has really got me on the right track. Thanks so far!

**Answer**Like every electronic counter, they work in binary. Take for example the half-byte (or nibble), a string of 4 binary bits. Each place on the bit will represent a number, starting from the right, the first bit is 1, the next bit on its left is 2, and on. When a bit is ON (1), then the number counts. If it is OFF (0), then the number is not counted.
0 0 0 0 = 0
8 4 2 1 = 0 since all the bits are OFF
0 0 0 1 = 1
8 4 2 1 = 1 only the bit representing 1 is ON
0 0 1 0 = 2
8 4 2 1 = 2 only the bit representing 2 is ON
0 0 1 1 = 3
8 4 2 1 = 3 = 2 + 1 only the bits representing 2 and 1 are ON
0 1 0 0 = 4
8 4 2 1 = 4 you can figure out why.
The rules in binary multiplication are:
a 0 bit results in multiplying any bit with a 0 bit, ex. 0 x 0 = 0, 1 x 0 = 0
a 1 bit results in multiplying a 1 bit with another 1 bit, ex. 1 x 1 = 1
Let's multiply 2 x 3 ( 0 0 1 0 x 0 0 1 1 )
thus > > > > > > > 0 0 1 0
multiplied by > > > 0 0 1 1
> > > > > > > > > -------------
> > > > > > > > > >0 0 1 0
> > > > > > > > >0 0 1 0
> > > > > > > > >--------------
add them up > > >0 0 1 1 0
the ON bits represents 4 and 2 = 4 + 2 = 6, so 2 x 3 = 6
This might be more than what you wanted to know, but I thought you might be interested anyway.

**Question****Answer**This is standard computational science.
Let S=0
While B > 0
If the lowest bit of B is 1, add A to S
Shift B right (i.e. divide by 2) and shift A left (i.e. multiply by 2)
Print "Result is ", S
Working this through, consider two numbers A=1010 and B=0011 (binary). For the purposes of the demonstration A=10, B=3 (decimal).
A=1010, B=0011, S=0
In the loop...
B is odd, so S=1010
Shifting, so A=10100, B=0001
In the loop again...
B is odd, so S=1010+10100=11110
Shifting, so A=101000, B=0000
Loop ends
S=11110, which is 30 as expected.
I'm not going to write this in Tcl/TK - that's your part.