For a hexadecimal number, say 0x10, I always thought in my head, zero-x-one-zero.
Is there a 'most correct' pronunciation?
|
For a hexadecimal number, say 0x10, I always thought in my head, zero-x-one-zero. Is there a 'most correct' pronunciation? |
|||||||||
|
|
There isn't a standard for this, so here's what I do. If the number is small enough that I know it offhand, I'll may pronounce it as its decimal equivalent:
For longer numbers, I may read the digits a byte at a time:
And occasionally I'll just make something up:
But of course
The main thing is being understood, so any system that works is valid. If we're taking votes for neologisms (along the lines of kibibyte and friends) then I might (half-jokingly) propose:
Alternatively, prefix the whole number with hex and read it as though it were decimal: hex A million, four hundred thousand, F hundred twenty and CD hundredths. |
|||||||||||||||||
|
|
I don't bother reading the 0x, but I say "... in hex" or "hex ..." to specify the base used if it's ambiguous (i.e., 0x9824 is ambiguous because it doesn't have any digits higher than 9). I pronounce the letters using the NATO phonetic alphabet, so 0x4FA79D would be "four foxtrot alpha seven niner delta". |
|||||
|
|
For any number which isn't decimal, it's easiest just to read out the digits and suffix with the base you are using, so Using "ten hex" has the problem that if you start reading a number with normal decimal notation, people will assume you are reading out a decimal, whereas changing the form implies there is something different about the number even before you get to the end of the number and read out the base. The only exception is if I'm dictating code. In this situation I would just read out the exact text, so |
|||||||
|