Jump to content

Binary covert to decimal help

Featured Replies

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.

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 by Sensei

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.