How many bits per digit in the decimal system [closed]

What you are looking for is the 2-based logarithm of 10, which is an irrational number of around 3.32192809489....

The fact that you can't use an integer number of bits for a decimal digit is the root cause of why many fractions that are easy to express in the decimal system (e.g. 1/5 or 0.2), are impossible (not hard: really impossible) to express in binary. This is important when evaluating rounding errors in floating point arithmetics.


In other words, what amount of information is contained in a single digit in these systems.

For base 2, base 4, base 8, base 16 and other 2N bases the answer is obvious because in a base 2N each digit can be expressed with exactly N digits.

How do you get N given 2N? Well, you use a 2-based logarithm, which is an inverse of exponentiation.

  • log2 2 = 1 (1 bit per digit in base 2)
  • log2 4 = 2 (2 bits per digit in base 4)
  • log2 8 = 3 (3 bits per digit in base 8)
  • log2 16 = 4 (4 bits per digit in base 16)

K-based logarithms of numbers that are not powers of K aren't cardinal numbers. In particular:

  • log2 10 = 3.321928094887362347870319429489390175864831393024580612054…

This number may look confusing, but it actually has some uses. For example, it's an entropy of a single decimal digit.

For your case, though, I don't think this value is of any use. @Christian's answer does a good job at explaining why.


On the subject of bits:

I'm sorry to say the question is misguided. You wouldn't use bits in that manner. A bit is a binary digit. You can convert the decimal number 10, to a binary 1010 (8+2), so you'd need 4 bits to express the decimal value 10.


Powers of 2

You've fallen into a bit of a trap, by using binary (2), octal (8) and hexadecimal (16) as examples, because these are all powers of 2, and thus you can think of them in terms of bits, whereas 10 isn't a power of 2, so it just doesn't work very well like that.