Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

For a hexadecimal number, say 0x10, I always thought in my head, zero-x-one-zero.

Is there a 'most correct' pronunciation?

share|improve this question
1  
I mentally read it as "naught-x-ten", but I say it as "naught-x-one-zero" to avoid confusing people. – Marcelo Cantos Sep 11 '11 at 22:21
2  
I say "oh ex ten", both in my head and when reading code aloud. – David Schwartz Sep 12 '11 at 1:32

migrated from stackoverflow.com Sep 12 '11 at 0:15

3 Answers

up vote 25 down vote accepted

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: 0x0a is ten, 0x40 is 64, and so on. But casually, I read most hex numbers as decimal numbers separated by runs of letters:

  • 0x3bda4: Oh X three B D A four
  • 0x400f20: Oh X four hundred F twenty

For longer numbers, I may read the digits a byte at a time:

  • 0x0f983d: Oh X oh F ninety-eight three D

And occasionally I'll just make something up:

  • 0x20f6: Twenty efty six

But of course 4d and 40 are ambiguous in an American accent, and no one has any hope of telling the difference if you pronounce a0 the same as 80, so on the rare occasion that I'm reading hex numbers aloud, I'll just spell them out digit by digit:

  • 0x3bda4: Oh X three B D A four
  • 0x400f20: Oh X four oh oh F two oh

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:

  • 0x10 = one tex = 16
  • 0x20 = twentex = 32
  • 0x30 = thirtex = 48
  • 0x40 = fourtex = 64
  • 0x100 = one hundrex = 256
  • 0x1000 = one thousax = 4096
  • 0x10000 = tex thousax = 65536
  • 0x100000 = one hundrex thousax = 1048576
  • 0x1000000 = one milliox = 16777216
  • 10x10 = 0x0.1 = one texth = 116
  • 10x100 = 0x0.01 = one hundrexth = 1256

0xa400f20.cd could be read A milliox, four hundrex thousax, F hundrex twentex and CD hundrexths. You could replace [ks] with [k] for ease of pronunciation, giving A milliok, four hundrek thousak, F hundrek twentek and CD hundrekths, or replace the first consonant with /x/ rather than the last, giving [z], as in A xillion, four xundred xousand, F xundred xwenty and CD xundredths. Of course, the latter system introduces ambiguity between million and billion, so you'd probably have to go with xmillion (/smillion/) and xbillion (/spillion/) instead. I do so like the idea of xillion being a specific number though.

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.

share|improve this answer
4  
This is full of awesome. – Caleb Jares Sep 12 '11 at 3:56
1  
It's over NINE THOUSAX! – Wayne M Sep 13 '11 at 13:28
Too bad you can only upvote once. – rlemon Sep 13 '11 at 15:03
Let's just spell them out letter by letter. It's simple and unambiguous. So, to put one of your examples correctly: 0x400f20, in English, is "Zero ex four zero zero ef two zero." ("Oh" is an interjection; and it sounds exactly like a letter of the alphabet. It's never a number.) – Dan Moulding Nov 3 '11 at 19:58
1  
@DanMoulding: This is what’s called an “elaborate joke”. That aside, “oh” is very frequently spoken in place of zero, so to say it’s never a number is plainly and spectacularly wrong—as prescriptivists usually are. – Jon Purdy Nov 3 '11 at 20:40
show 1 more comment

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".

share|improve this answer
4  
The NATO phonetic alphabet is well worth learning, it's amazing how appreciative call center representatives are when you know it well enough to spell out things they are not sure of. You can even tell then to foxtrot oscar of they are being annoying. *8') – Mark Booth Sep 13 '11 at 14:27

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 0x10 would be "one oh hex".

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 0x10 would be "oh ex one oh".

share|improve this answer
When dictating numbers I often find it more helpful to follow the convention of the language I'm dictating into, for example in C, to save the typist from having to cursor back over the text they just input to add the prefix (one oh hex 1 0 back back 0x)... – Stephen Nov 14 '11 at 14:05
[...] it's easiest just to read out the digits and suffix with the base you are using, so 0x10 would be "one oh hex" [...] – Stephen Nov 14 '11 at 16:32
[...] "exception is if I'm dictating code. [...] read out the exact text, so 0x10 would be "oh ex one oh" ... What I said would be "hex one oh" or "hex ten" – Stephen Nov 14 '11 at 16:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.