I am unable to figure out why $1010 - 1000 = 0010$ in binary is equivalent to $10-8=2$ in decimal? Why does subtraction work in binary just like in decimals?
Asked
Active
Viewed 65 times
0
-
4Why do you think there's anything special about base 10? (In before all bases are base 10.) – Cameron Williams Oct 07 '20 at 12:45
-
1Use the meaning of the notation : $a_n\cdots a_2 a_1 a_0$ means $a_0 + a_1\times 2 + a_2 \times 2^2 +\ldots$. Ask yourself how to subtract two such expressions and get an expression with only positive values of $a_k$ – Arnaud Oct 07 '20 at 12:45
-
4Perhaps you can think of it this way. Consider numbers $$ A = a_0 p^0 + a_1 p^1 + a_2 p^2 + a_3 p^3 + \ldots $$ $$ B = b_0 p^0 + b_1 p^1 + b_2 p^2 + b_3 p^3 + \ldots $$ now what is $A-B$ ? Of course it's $$ A-B = (a_0 -b_0)p^0 + (a_1 - b_1)p^1 + \ldots $$ – Matti P. Oct 07 '20 at 12:45
-
Hey @MattiP. you beat me by 1sec – Arnaud Oct 07 '20 at 12:46