CheckEmoji Community · the emoji forum
🏠 Home 🆕 What's new ❓ Unanswered 🔥 Popular 📡 RSS Members 👥 0 online log in · register
Home › IT › IT Support › How to convert numbers to any base?

How to convert numbers to any base?

Started by frozenotter · · 👁 4 views · 2 replies

📡 Subscribe to replies

Participants frozenotterGeorge Sanders37ironcyclist58
frozenotter frozenotter NewcomerOP
1 message
joined Oct 2015
#1 ·
Does anyone know how to convert one number system directly into another? Is there a general formula for this? Specifically, I need to turn (1101100.11101)₂ into base 4.
🤔 I can't just convert everything to decimal first and then move to this "quaternary" thing—I need to go straight from one to the other, but I have no clue how to do it.

If anyone knows, please help me out.
George Sanders37 George Sanders37 Active Member
172 messages
joined Aug 2013
#2 ·
There are these online tools like
http://number.webmasters.sk/numerical.php
http://www.periodni.com/number_systems_converter.html
As far as I know, there isn't really one universal formula for conversion.
Following some basic logic—I guess—you could convert any base X into decimal (base 10) first, then move from there into base Y. I know direct conversions exist, but the explanations for them seem to depend entirely on which specific bases you're switching between.
http://www.tutorialspoint.com/comput...conversion.htm
https://www.mathsisfun.com/base-conversion-method.html
http://mathforum.org/dr.math/faq/faq.bases.html
This method seems to be the most universal approach, maybe.
http://mathbits.com/MathBits/CompSci...frombase10.htm
ironcyclist58 ironcyclist58 Regular
863 messages
joined Feb 2020
#3 ·
You can take the direct route if the bases you're converting between are powers of one another—which is exactly what’s happening here. It makes things pretty straightforward; just group the binary digits into pairs and treat each pair as a single digit in base 4.
That gives you a result of:
1230.322
(Feel free to call me out if I messed up, it's been a minute since I've touched this kind of math)

You must log in or register to reply here.

Log in Register

🔗 Similar threads