Niklas111 0 Posted December 23, 2019 So this may seems simple to most of you but i need a good explanation of covering this format of binary to decimal "0110 1010". Im having trouble finding a good tutorial. I would like a detailed explanation of method of how to translate it. Thank you. 0 Share this post Link to post Share on other sites
mathematic 98 Posted December 23, 2019 0110 1010=0x2^7+1x2^6+1x2^5+0x2^4+1x2^3+0x2^2+1x2^1+0x2^0 0 Share this post Link to post Share on other sites
Sensei 1033 Posted December 23, 2019 (edited) In code, or on piece of paper? Algorithm of conversion of any base-x system could be: (loop start) get modulo of number. push it on stack (FILO). divide number by the same base. (loop end) repeat until number is not 0. Then pop up elements ("digits") from stack and show to user after appropriate conversion (like elements with 16 > n >= 10 replace by 'a' to 'f' in the case of hexadecimal system). Edited December 23, 2019 by Sensei 0 Share this post Link to post Share on other sites