convert decimal to binary with two methods by repeatedly dividing 1) 35 2) 82 3) 136
\(\large 2^8~2^7~2^6~2^5~2^4~2^3~2^2~2^1~2^0\) \(\large 256~128~64~32~16~8~4~2~1\) 35 - 32 = 3 so we write a 1 under the \( 2^5 \) for the 32 and then for the 3 we write a 1 under the \(2^1~and~the~2^0\) so we get 00010011
You basically look for the biggest factor of two you can subtract from the number, write down that number, and write down what you have left, and repeat the process until you have no remainder left.
\[\qquad35\div32=1~\text r~3\\ \qquad3\div16=0~\text r~3\\ \qquad3\div8=0~\text r~3\\ \qquad3\div4=0~\text r~3\\ \qquad3\div2=1~\text r~1\\ \qquad1\div1=1\\ \\ \qquad\qquad\qquad35=32+2+1=100011 \]
Yes but how exactly is that different from just subtracting?
" .... by repeatedly dividing "
you're not really dividing though, subtracting gives exactly the same, i don't see the benefit or difference whatsoever.
i was just following the instruction from the question, also i didn't make make the tiny mistake
yes i missed a 0, but that's just because i can't put a table here.
in my opinion dividing just makes it harder, no need to make something simple harder by making up unnecessary rules
it is not good practice to change the question, if you want to see how one can draw a table in \(\LaTeX\) : http://openstudy.com/study#/updates/52b8ed1de4b01cdca449248c
BTW the method you have suggested @zimmah is much closer to the method i would use if the question didn't specify
\( \begin{array}{|c|c|c|c|c|c|c|c|}\hline 2^7 & 2^6 & 2^5 & 2^4&2^3&2^2&2^1&2^0\\\hline 128 & 64 & 32 &16 &8&4&2&1\\ 0 & 0 & 1 & 0 &0&0&1&1\\ \hline \end{array} \)
Thanks @UnkleRhaukus
Join our real-time social learning platform and learn together with your friends!