Log in

About this Community
For everyone who is intrigued by numers in nature, fractals, and co-incidental numbers.
In fact, any numerical order/phenomena that is just too cool to ignore.
Pick a number...
Jun. 16th, 2005 @ 08:40 pm Hex Pi?
Feeling: geekygeeky
What would decimal fractions be like if we didn't count in Base 10?

I'm guessing 1.5 in decimal would be equal to 1.8 in hexadecimal, but what about with numbers that have more than one digit after the decimal point?
0.125 decimal would be about 0.2 hex I think?

Also, how do you say "five and a quater" in binary; 101.01?
About this Entry
Ven Ra
[User Picture Icon]
Date:June 17th, 2005 03:11 am (UTC)
(Permanent Link)
the beginning of the binary expansion of pi is wicked easy to remember:

001 twice
then four 0s
then six 1s

ta-da you know 16 digits of pi in binary. :)
[User Picture Icon]
Date:June 17th, 2005 06:53 am (UTC)

On bases...and our minds....

(Permanent Link)
Actually, the only reason that we see base ten "easy" is because we use it most of the time, most of the day. We have been trained to use base ten and base six in real life that we see these two bases as possibly the only easiest bases that exist. In mathematical reality, that is not true. As long as you are willing to learn, every base is easy.
Date:October 23rd, 2006 06:55 pm (UTC)

Re: On bases...and our minds....

(Permanent Link)
It's true that people find decimal "easy" simply because that's what they're used to and what their language reflects: There is nothing inherently easier in something like decimal "6 x 7 = 42" over hexadecimal "6 x 7 = 2A", except for the fact that we all spent years memorizing the decimal multiplication tables in school (so that they now seem "natural"), while almost no-one knows or has even heard about the hexadecimal ones; and we have words in our languages to read decimal "42" as "forty-two", while we lack words to appropriately read the hex number "2A" (in fact, we even lack a complete set of digits to properly write hex, so we have to rely on letters as a substitute). But I wouldn't say every base is as easy; some bases can certainly facilitate or hinder some tasks or purposes.

For example, 1/3 expresses a "simpler" or "more basic" proportion than 1/5, but decimal makes working with fifths easy (0.2, 0.4, 0.6, 0.8) and working with thirds "uneasy" (those "pesky" unending 0.3333333333... and 0.666666666...).

Binary arithmetic is the easiest there is, by far. In fact, it's addition and multiplication tables consist solely of the trivial rows (those of 0 and 1), which are usually left out of the tables in other bases because they are so obvious. However, binary numbers quickly get uncomfortably lengthy, and it's easy to misread numbers such as 111011000101011101010001 (decimal 15,488,849), unless you pay good attention and insert lots of commas to help in reading (1110,1100,0101,0111,0101,0001 or 111,011,000,101,011,101,010,001 which is like reading binary "hexadecimally" or "octally").

Hexadecimal, for its part, makes it easy and compact to work with binary fractions (those with only powers of two as their denominator). For example, three sixty-fourths (3/(2^6)) is 0.046875 in decimal, but just 0.0C in hexadecimal. However, all of the other rational numbers display recurring digits in hex. Although, if you don't mind having to deal with infinite strings of recurring digits (which is impossible in practice, so this means dealing with rounded approximations, i.e. with inaccuracies), hex makes it easy to remember many of their periods, because they are usually short (typically, 1 or 3 digits long). For example, 1/3 = 0.555555555..., 1/5 = 0.333333333..., 1/7 = 0.249249249..., 1/9 = 0.1C71C71C7....

Sexagesimal allows for compact representations of large and tiny numbers (for example, sexagesimal 4:3:2:1.0:9 corresponds to decimal 874,921.0025), but its addition and multiplication tables are enormous, which means in practice it's not very easy to work with this base (in fact, the ancient Mesopotamians didn't even try to memorize the multiplication tables).

On the other hand, the duodecimal multiplication chart is larger than the decimal one, but because of twelve's versatility (it has many factors, which means it "fits" in many of the patterns created by other numbers), the rows show a larger proportion of easy-to-see patterns that help memorization (e.g., the table of 3 goes like: 0,3,6,9, 10,13,16,19, 20,23,26,29, 30..., and the table of 4 goes like: 0,4,8, 10,14,18, 20,24,28, 30,34,38, 40...). So duodecimal is easier than decimal for multiplication and division.

If we talk about counting on fingers, senary (and not decimal) is the most efficient (using both hands you can count up to senary 55, i.e. decimal 35 -- BTW, yes, you can count up to decimal 1023 using fingers to codify binary digits, but that's not really an easy way of counting on fingers), and it also makes it easy to identify potential primes (all of them, except for 2 and 3, are adjacent to a senary "round" number ending in 0; i.e., they end in 1 or 5). However, due to the relatively small size of its base, senary representations are not as compact as decimal, duodecimal or hexadecimal ones.
Date:October 23rd, 2006 08:17 pm (UTC)
(Permanent Link)
Well, if we didn't count in base ten, we probably wouldn't be using decimal fractions. ;-)

Think of what a positional string of digits stands for: decimal "1.5" simply means 1 unit and 5 tenths. Ech digit position you move to the left represents an order of magnitude ten times larger (a unit is ten times larger than a tenth, etc.), and each digit position you move to the right represents an order of magnitude ten times smaller (a tenth is ten times smaller than a unit; a hundredth is ten times small than a tenth, etc.). This gives a relative "size" for each digit in the string (larger to the left and smaller to the right). Then, the decimal point (called "radix point" when talking about any base) shows the boundary between the integer and fractional parts, thereby showing the position of the units and clarifying the absolute size of each digit position.

If the digit string is not in decimal but in another base, it will work just the same, except that the difference in order of magnitude between adjacent digit positions will be not ten times larger or smaller, but b times (b being the base). That is, in binary, a digit to the left of another is an of order of magnitude twice bigger, and the position two digits to the right of the radix point means an order of magnitude twice smaller than twice smaller than that of a unit (i.e., it represents quarters of a unit). In general, given a base b and the digit string:


that string represents the quantity:

...+ (d3 * b^3) + (d2 * b^2) + (d1 * b^1) + (d0 * b^0) + (d1 * b^-1) + (d2 * b^-2) + (d3 * b^-3) +...

Thus, a positional digit string expresses a quantity in terms of powers of the base: if decimal, in terms of powers of ten; if binary, in terms of powers of two; etc. So decimal "1.5" represents (1 * 10^0) + (5 * 10^-1) = 1 + 5/10 = 15/10 = (3*5)/(2*5) = 2/3. Which means the decimal number "1.5" simply expresses the rational number "3/2". If you express this fraction in binary, you get "101/10", which by simple dividing translates as the binary string "10.1", meaning 1 pair, 0 units and 1 half = (1 * 2^1) + (0 * 2^0) + (1 * 2^-1) = 2 + 0 + 1/2 = 2 + 1/2 = 3/2.

However, the decimal number "0.1" (zero units and one tenth) expresses the rational number "1/10", which in binary would be "1/1010". Now, if you do that division (1 divided by binary 1010) --for example using the familiar long-division method-- you will get the binary string representation of one tenth. But you'll find that, unlike in decimal, it is not finite; in binary, one tenth recurs: 0.0001100110011001100110011... (this is well known to computer scientists and programmers dealing with floating point binary numbers).

So, if we used binary --or hexadecimal, for that matter--, we would most probably avoid working with tenths and fifths, contrary to what we usually prefer when using decimal (because in decimal they are conveniently representable as 0.1 and 0.2, unlike in binary). In turn, people using decimal usually try to avoid working with thirds, sixths, sevenths or ninths, so as to avoid having to deal with unending decimal digit strings like "0.33333333333333..." and "0.142857142857...".

The fractions that are "easy" to work with in binary are the dyadic ones: those that have powers of two in their denominators (that is, halves, quarters, eighths, sixteenths, etc.), which are the ones corresponding to binary "0.1", "0.01", "0.001", "0.0001", etc. All of these are also relatively easy to work with in decimal (the digits terminate and do not recur), but less compact (0.5, 0.25, 0.125, 0.0625, etc.).

If we used duodecimal, we would be happy to work with dyadic fractions, just like in binary and decimal (in duodecimal, they are 0.6, 0.3, 0.16, 0.09, etc.), but would also like working with thirds, sixths, ninths or twelfths (conveniently representable as 0.4, 0.2, 0.14, 0.1), and would try to avoid fifths (0.24972497...), sevenths (0.18A36518365...) or tenths (0.124972497...).

To convert between bases, you can use the algorithms described here:
Date:October 23rd, 2006 09:54 pm (UTC)
(Permanent Link)
Oh, sorry, in my previous comment where I said "101/10 = 10.1" in binary (a pair and a half = 2.5), I should have said "11/10 = 1.1" (one and a half = 1.5).