Binary remainder not equal to the decimal remainder

278 Views Asked by At

I am having a weird result. I am dividing the binary number $10101010100000$ by $10011$.

In binary division. I get $R= 0100$ which is 4.

However, If I consider the decimal representation of the numbers then I will have that $10101010100000 = 10912$ and $10011 = 19$ And we all know that $10912$ divided $19$ gives a remainder of $6$ and not 4

I checked my results using all software you can imagine. And I still observe that the binary remainder is not equal to the decimal remainder. And I am going crazy !

3

There are 3 best solutions below

2
On BEST ANSWER

Your binary remainder is wrong.

          1000111110    
      --------------  
10011)10101010100000  
      10011  
      -----  
         100101  
          10011  
         ------  
          100100  
           10011  
          ------  
           100010  
            10011  
            -----  
             11110  
             10011  
             -----  
              10110  
              10011  
              -----  
                 110

As you can see, the remainder is $110_{\text{two}}=6$.

2
On

Evidently you've made a mistake in binary division.

2
On

$$ \begin{align*} 10101010100000 -10011000000000&=10010100000\\ 10010100000 - 1001100000 &= 1001000000\\ 1001000000 - 100110000 &= 100010000\\ 100010000 - 10011000 &= 1111000\\ 1111000 - 1001100 &= 101100\\ 101100 - 100110 &= 110 \end{align*} $$ The remainder is 6.