What am I doing wrong when multiplying binary numbers together?

430 Views Asked by At

This is from Discrete Mathematics and its applications enter image description here

I was able to get sum pretty easy.

I am trying to follow this example in the book to get the product of the two binary numbers enter image description here

Here's my work so far enter image description here

I got the expected output from my calculator windows application. Does anyone see what the issue is? The problem starts when I don't get 7 zeros separating the first two ones. What would you do with the end result, 8? I am still not sure about that.

2

There are 2 best solutions below

1
On BEST ANSWER

One very easy way to get your desired product is to convert both numbers to base $10$ and then to multiply them and then to express that product in base $2$. It's not the cleanest thing to do in the world, but neither is your approach. Consider that $$ (1000111)_2 = 1(2^6)+1(2^2)+1(2)+1 = 71, $$ and $$ (1110111)_2 = 1(2^6)+1(2^5)+1(2^4)+1(2^2)+1(2)+1 = 119. $$ Thus, we have that $$ (1000111)_2 \cdot (1110111)_2 = 71\cdot 119 = 8449. $$ Now simply convert $8449$ into base $2$: $$ 8449 = 1(2^{13})+1(2^8)+1 = (10000100000001)_2. $$ Thus, we see that $$ (1000111)_2 \cdot (1110111)_2 = (10000100000001)_2. $$

2
On

Okay let's take a simple example: suppose you want to add $(111)_2 + (111)_2 + (111)_2$. First of all, all the carries will be written in binary, and not in decimal. Here is how you should do that:

        1
Carry: 1101         
         111
        +111
        +111
        ----
       10101

Explanation: On the right most column, you first add $1+1+1=11_2$. So you note 1 in the result line and note $1$ as you first carry.
Then you add $1+1+1+1=100_2$, therefore you write one $0$ in the result line, and you have a carry of $10$. To handle that carry, you can simply write $10$ in the carry over two columns (that is the 0 will be above one column, and the one above the column on the left).
The next addition is $0+1+1+1=11_2$ so once again you write $1$ in the result line and carry $1$ (which I wrote above the $1$ from the preceding $10$) and the rest is easy.