views:

72

answers:

5

I've been reading hexadecimal on a digit by digit basis for many years and am now fed up with translating hex values for numbers requiring more than 16 bits into English. Does a more elegant form of translating hexadecimal to English exist?

In English, a simple system exists for converting decimal values to English. Decimal 10 is English "ten", decimal 57 is english "fifty-seven", decimal 32767 is "thirty-two thousand seven hundred sixty-seven", etc.

As far as I know, there exists no system for elegantly representing hexadecimal in English. Hexadecimal 10 is English "one zero" or "one oh", hexadecimal F0ED is "eff oh eee dee", hexadecimal 30F538B9310 is English "three oh eff five three eight bee nine three one oh". Values requiring more bits become increasingly painful to translate. Sometimes converting it to the decimal equivalent to get an elegant English translation, so hexadecimal 10 becomes "sixteen".

Thanks for any help.

A: 

Just to be clear, you want to convert hexadecimal values into an English phonetic representation?

wllmsaccnt
That is correct.
ytrp
A: 

Are you looking for something for you to do yourself when reading such numbers, or for an algorithm for a computer?

If it is something for yourself, then I don't think there is an easy way - just practice. Eg. recognizing A0 is 160, so A3 must be 163, etc.

If you are looking for an algorithm for a computer, then convert to decimal first, and then convert to text. so A3 -> 163 -> "one hundred" + "and sixty" + "three".

winwaed
Conversion between hexadecimal and decimal is not the issue. The issue is translating the hexadecimal value itself into english. The example I posed where a hexadecimal value is converted to decimal before its translation into English was meant to demonstrate the lack of a method to translate hexadecimal directly into elegant English.
ytrp
A: 

mmm.. ) convert it to decimals first, then convert result to english? mmm? :D or I missed something? )

ZiPP Stealth iXplo
Your answer points out the problem I am trying to solve. Imagine you are having a conversation with somebody and at some point the hexadecimal value F0213A0DE165C comes up. One would just relay each digit one after the other until, however this is not elegant at all compared to the system that exists for translating decimal into English. Decimal 159123 becomes "one hundred fifty-nine thousand one hundred twenty three". I am aware of no elegant system for translating hexadecimal into English in the same fashion that I demonstrated between decimal and English.
ytrp
given that base 16 comprises equal or fewer digits than base 10 to refer to the same number, wouldn't saying "two six dee nine three" be faster than saying "one hundred fifty-nine thousand one hundred twenty three" therefore making your request moot? (159123 base 10 is equal to 26D93 base 16) - and, as an earlier commented, "quick, what's the fast way to say 3364361048848?"
KevinDTimm
+1  A: 

My coworkers and I frequently use the decimal groupings to describe values, so 0x10000 is "hex ten thousand" or 0xF0000 as "hex eff-zero thousand". While this is by no means efficient, it usually works for us. I would prefer to group at 4 digits instead 3, but lack the desire to look for or create a name. ;-)

I've never found any naming convention aside from reading off each digit.

Daryl Hanson
+4  A: 

This is in Knuth - googling the phrase "vybong bysanton" (which has stuck in my mind ever since reading it) produces this slashdot comment and response:

In section 4.1 of The Art of Computer Programming, Donald Knuth describes:

...a prominent Swedish-American civil engineer named John W. Nystrom [who] decided to... [devise] a complete system of numeration, weights, and measures based on radix-16 arithmetic. He wrote, "I am not afraid, or do not hesitate, to advocate a binary system of arithmetic and metrology. I know I have nature on my side; if I do not succeed to impress upon you its utility and great importance to mankind, it will reflect that much less credit on our generation, upon our scientific men and philosophers." Nystrom devised special means for pronouncing hexadecimal numbers; for example, [0xC0160] was to be read "vybong, bysanton." His entire system was called the Tonal System, and it is described in J. Franklin Inst. 46 (1863), 263-275, 337,348, 402-407.

Maybe you should get that issue of that journal and give it a try.

(response:)

quoted from http://www.monmouth.com/~colonel/tonal.html [monmouth.com]

From Recreations in Mathematics, by H. E. Licks (Van Nostrand, 1917):

John W. Nystrom of Philadelphia devised about fifty years ago the tonal system&quot of numeration in which 16 is the base instead of 10 as in the decimal system. The numerals 1, 2, 3, 4, etc., were called An, De, Ti, Go, etc., and new characters were devised for 10, 11, 12, 13, 14, 15. This system embraced also a new division of the year into 16 months, these having the names Anuary, Debrian, Timander, Gostus, Suvenary, Bylian, Ratamber, Mesidius, Nictorary, Kolumbian, Husander, Victorius, Lamboary, Polian, Fylander, Tonborious, the first two letters of each month being the names of the sixteen numerals.

This is slightly inaccurate. The figure 9 was used for 10, on the principle of making the digits for 8 or greater look like those of their 16's complements written upside down; and a new figure was devised for 9. The name of 12 was Vy, not Vi; and I believe that the meth, nith, vyth, and tonth months were named Mesudius, Nictoary, Vyctorius, and Tonborius.

The year began at the winter solstice, that being the Anth of Anuary. Every month had tonra days except for Debrian, Gostus, and Lamboary, which had only tonby, but Debrian had an extra day in leap years.

The powers of ton were: ton, san, mill, bong. These could be used as prefixes to indicate multiplication or as suffixes to indicate division. For instance, the day was divided into ton (sixteen) tims, a tim into ton timtons, and a timton into ton timsans.

AakashM
Nowadays they have meds for that.
Mark Ransom
This is an excellent answer, thank you.
ytrp