Difference between binary division and its decimal division

136 Views Asked by At

Suppose I have one decimal number $23$ which decimal representations is $10111.$ Now $10111$ treated as dividend and divisor is $3$ which binary representations is $11.$ When $10111$ is divided by $11$ with Modulo-2 operation then remainder is zero. See this image

enter image description here

But $23$ divided by $3$ isn't divisible and remainder isn't $0.$ My question is why is it possible to get remainder $0$ in case of binary and not $0$ in case of decimal?

N.B.--Modulo-2 and xor operation both are same thing.

1

There are 1 best solutions below

0
On BEST ANSWER

The remainder using binary long division will be $10_2$. This is not the same as using XOR operation.

$$ \begin{array}{c|r} & 0111\phantom{0} \\ \hline 11 & 10111 \\ & \underline{11}\phantom{00} \\ & 1011 \\ & \underline{11}\phantom{0} \\ & 101 \\ & \underline{11} \\ & \color{red}{10} \\ \end{array} $$