Reading hexadecimal numbers out loud
-
we don't discuss numbers, we discuss functionality, algorithms, and code, not data. So either the hex numbers are user data and off-topic, or they are programming constants and need to be symbolic with a meaningful and pronounceable name. BTW: when I have to write a hex literal, I make sure to provide a number of digits that is a power of 2 (and matches the data type). So 0x80 and 0x8000 and 0x80000000 can be fine; 0x800 and 0x8000000 never is OK. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
we don't discuss numbers, we discuss functionality, algorithms, and code, not data. So either the hex numbers are user data and off-topic, or they are programming constants and need to be symbolic with a meaningful and pronounceable name. BTW: when I have to write a hex literal, I make sure to provide a number of digits that is a power of 2 (and matches the data type). So 0x80 and 0x8000 and 0x80000000 can be fine; 0x800 and 0x8000000 never is OK. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
Right, but in order to give it a meaningful and pronounceable name, you must first communicate the number itself somehow.
that would be in a class, a type, a header file, depending on the language. And it would not be orally, it would always be in a file, a compiler-readable one at best, a document otherwise. The only thing I might consider communicating orally about it (i.e. before the electronic version exists) is the symbolic name. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
that would be in a class, a type, a header file, depending on the language. And it would not be orally, it would always be in a file, a compiler-readable one at best, a document otherwise. The only thing I might consider communicating orally about it (i.e. before the electronic version exists) is the symbolic name. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
I'm afraid that doesn't work for me. I (semi)often find myself in the position of trying to explain an algorithm to someone in real life, in a setting where no non-oral means of communication is easily available.
Hmm. I'd use really small numeric values (think 0x00 thru 0xFF) as examples if I had to, and nothing fancier. And carry issues would be explained at a nibble level, not a byte level, as hex notation is nibblish. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
we don't discuss numbers, we discuss functionality, algorithms, and code, not data. So either the hex numbers are user data and off-topic, or they are programming constants and need to be symbolic with a meaningful and pronounceable name. BTW: when I have to write a hex literal, I make sure to provide a number of digits that is a power of 2 (and matches the data type). So 0x80 and 0x8000 and 0x80000000 can be fine; 0x800 and 0x8000000 never is OK. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
Luc Pattyn wrote:
So either the hex numbers are user data and off-topic, or they are programming constants and need to be symbolic with a meaningful and pronounceable name.
What do you mean, constants and names? Real computers have a hex keyboard and then you can just hack them in, byte by byte. Nothing hard or confusing about having to keep two hex digits in mind at a time. :) Edit: The original version of my old computer still had switches, but entering binary really was a pain. A hex keyboard was a real improvement.
At least artificial intelligence already is superior to natural stupidity
-
I pair them up (since they always represent byte streams e.g. pairs of digits) so that would be 'hex oh-eight oh-oh oh-oh oh-oh'.
-
How do you do it? For small or commonly used numbers it isn't really a problem, but I haven't really found an "obviously good" way. Just reading out the numbers one by one gets confusing for something like 0x8000000 (which is a zero "too short") and it doesn't convey the approximate magnitude until you've had the last digit. Reading it as "8 million" isn't ideal either (though that way kind of works when there are letters in the number), and actually converting to decimal doesn't work at all - 134217728 probably doesn't ring a bell with many people. Of course pronouncing it as 1<<27 works, but for most numbers there are no "shortcuts" like that.
I rarely ever see the need to pronounce a hex number out loud, and if I do, I either read digit by digit (including the 0x prefix), or lend shortcuts from military style* for repeated occurences of '0', e. g. a sequence of '200' would be "two hundred". I usually only do that with '0' at the end, but there's no reason not to apply it mid-word as well. If your point is to introduce a way of pronouncing hex numbers in a similar way to decimal number shortcuts, maybe you should look at what's there already: e. g. we already have 'double words' (4 bytes) split into a 'high word' and a 'low word', so you might want to pronounce '0x082A3BC8' as "082A high 3BC8 low". * Note that military style reading also pronounces 6 o'clock as "six hundred" (at least that's what I've been taught), so here we already have a precedence where "hundred" equates just a sequence of '0' rather than the value, 100.
-
I pair them up (since they always represent byte streams e.g. pairs of digits) so that would be 'hex oh-eight oh-oh oh-oh oh-oh'.
I, too, pair them but I do not use 'oh' (that is a letter or an octal prefix). Zero is two syllables, so I use nought (tends to end up sounding like nor or norg). This prevents you having ambiguities like in 'Pensylvannia 6-5-Oh-Oh-Oh' which in the UK would be understood as 65000 but in the US could be 65000 or 65OOO (which is 65666). Like other respondents, I'd only expect 2, 4 or 8 digits (prepending with zeros as required). So, I'd end up with hex norg-eight nor-norg nor-norg nor-norg. Writing it down as I say it out loud has shown that I use the 'norg' form before a vowel (like the difference between 'a' and 'an') and before a gap. Listening back to myself, 'nor-norg' sounds a bit like 'knock-knock', which might explain why some wags keep asking "Who's there?". If dictating (e.g. for reading back license keys with full alphabets) with non- / semi- IT literate people, I'd add -er to numbers, e.g. niner sixer aye bee cee fiver fourer. If dicating to more literate users, I'd use numbers without -ers (would they be called 'numb's?) and use the phonetic radio code for letters (not 'lett's), e.g. Charlie-0ne Nine-Bravo Alpha-Six Two-Delta. Note: For MS license keys, I would read out in batches of 5 alphamerics so that the spoken pattern matches the key layout. Most folks can remember 5 alphanumerics long enough to check them; but only in a max of threes for longer term storage (except for telephone numbers where you can use natural breaks)
-
0x80000000
: "Zero X Eight followed by seven zero's"0x8A2D35CB
: "Zero X Eight A two D three five C B" And yes, I do pronounce the "0x
". Since I do user interfaces, half the time I'm talking to users, and the other I'm talking to the yahoos I front for. Adding the "0x
" prefix helps keep things unambiguous.Software Zen:
delete this;
Same here, except I say "OH-EX" and then the numbers/letters. :D :-D :laugh:
-
How do you do it? For small or commonly used numbers it isn't really a problem, but I haven't really found an "obviously good" way. Just reading out the numbers one by one gets confusing for something like 0x8000000 (which is a zero "too short") and it doesn't convey the approximate magnitude until you've had the last digit. Reading it as "8 million" isn't ideal either (though that way kind of works when there are letters in the number), and actually converting to decimal doesn't work at all - 134217728 probably doesn't ring a bell with many people. Of course pronouncing it as 1<<27 works, but for most numbers there are no "shortcuts" like that.
-
How would you pronounce 0x400 ? Would you say 1K, even though it is 1024 decimal? Would 0x1000 be 4K? 0x4000, 16K and 0x10000, 64K? If so, then 0x100000 might be pronounce as 1 Meg and 0x8000000 would be 128 Meg. Just a thought.
-
0x80000000
: "Zero X Eight followed by seven zero's"0x8A2D35CB
: "Zero X Eight A two D three five C B" And yes, I do pronounce the "0x
". Since I do user interfaces, half the time I'm talking to users, and the other I'm talking to the yahoos I front for. Adding the "0x
" prefix helps keep things unambiguous.Software Zen:
delete this;
eight zero, zero zero, zero zero, zero zero. eight Able, two Dog, three five, Charlie Baker. This is from my IBM mainframe days, where reading hex out loud to people was normal. The army guys used Alpha instead of Able, Bravo instead of Baker, and Delta instead of Dog, and I allowed them that, since it was a matter of national defense. The commas are pauses, since one always thinks in bytes, which are pairs of hex digits. And one always thinks of a number as being 4 or 8 bytes, so you always reserve an appropriate register in your brain and wait for it to be filled. The "0x" is a UNIX add-on, and doesn't belong there. After all, UNIX started expressing numbers in octal. They only adopted hexadecimal later, when it finally made sense to them. If necessary for clarity, I will prefix the hexadecimal number with the word "Hex". Then, if you are doing C coding, you know to prefix it with "0x".
-
How do you do it? For small or commonly used numbers it isn't really a problem, but I haven't really found an "obviously good" way. Just reading out the numbers one by one gets confusing for something like 0x8000000 (which is a zero "too short") and it doesn't convey the approximate magnitude until you've had the last digit. Reading it as "8 million" isn't ideal either (though that way kind of works when there are letters in the number), and actually converting to decimal doesn't work at all - 134217728 probably doesn't ring a bell with many people. Of course pronouncing it as 1<<27 works, but for most numbers there are no "shortcuts" like that.
As a mathematician I agree that it's useful to verbalize a hex constant, regardless of silly, best-practice kind of objections. Here's something I remembered reading last year: http://evincarofautumn.blogspot.com/2011/09/how-to-pronounce-hexadecimal-numbers.html[^]
-
As a mathematician I agree that it's useful to verbalize a hex constant, regardless of silly, best-practice kind of objections. Here's something I remembered reading last year: http://evincarofautumn.blogspot.com/2011/09/how-to-pronounce-hexadecimal-numbers.html[^]
-
How do you do it? For small or commonly used numbers it isn't really a problem, but I haven't really found an "obviously good" way. Just reading out the numbers one by one gets confusing for something like 0x8000000 (which is a zero "too short") and it doesn't convey the approximate magnitude until you've had the last digit. Reading it as "8 million" isn't ideal either (though that way kind of works when there are letters in the number), and actually converting to decimal doesn't work at all - 134217728 probably doesn't ring a bell with many people. Of course pronouncing it as 1<<27 works, but for most numbers there are no "shortcuts" like that.
harold aptroot wrote:
How do you do it?
Based on your other responses - I don't. If I want someone to have a list of specific values then I write them down and send them electronically. If I had to do a lot of them via a phone and there was no other electronic medium available then I would use the following process. 1. "It is a hex number" 2. "You know what a hex number is right?" 3. "Write the following number down carefully" 4. Write it myself on a piece of paper in the following way 0x 800 0000 5. {say each digit} 6. "Repeat it back to me" 7. {repeat 5 until 6 matches.} Seems like if you are trying to describe someone how to create an algorithm via the phone and you need the above detail then you would need to do the same thing with some other 'code' (pseudo or real) just to insure they got it right in the first place. Actually I would probably do the same for a large decimal number.
-
I'll steal that. But that doesn't really help for numbers with more set bits, especially not if they're in low positions.
That's another thing. In the "real" world, if you are talking about $20M, do you really care if it's a few dollars short? Rounding occurs all the time. I think of 1K as 1000, etc. In computers, which bit is on or off is important, requiring as much accuracy as 20,000,213.43. (I'm sure the news-people will start reporting that "misplaced" $2B down to the penny any day.) The other thing is that 0x is base 16, while a K is 2^10 (Or 2^B, or 0x0400 :) So, even our short-cut terms don't fit 0x well.)
-
eight zero, zero zero, zero zero, zero zero. eight Able, two Dog, three five, Charlie Baker. This is from my IBM mainframe days, where reading hex out loud to people was normal. The army guys used Alpha instead of Able, Bravo instead of Baker, and Delta instead of Dog, and I allowed them that, since it was a matter of national defense. The commas are pauses, since one always thinks in bytes, which are pairs of hex digits. And one always thinks of a number as being 4 or 8 bytes, so you always reserve an appropriate register in your brain and wait for it to be filled. The "0x" is a UNIX add-on, and doesn't belong there. After all, UNIX started expressing numbers in octal. They only adopted hexadecimal later, when it finally made sense to them. If necessary for clarity, I will prefix the hexadecimal number with the word "Hex". Then, if you are doing C coding, you know to prefix it with "0x".
-
I should have copied the original numerical representation: 0x80000000 = "80", "00", "00", "00" = eight-zero, zero-zero, zero-zero, zero-zero. One must always have an even number of digits.
-
I should have copied the original numerical representation: 0x80000000 = "80", "00", "00", "00" = eight-zero, zero-zero, zero-zero, zero-zero. One must always have an even number of digits.
Bruce Patin wrote:
One must always have an even number of digits.
True, but the original poster said ">...something like 0x8000000 (which is a zero "too short")<" Note the comment in parentheses. Computers work in bytes and when printing out in hex, it always is put out in tupples. A computer would never ever display that number. Instead it would display 0x08000000 = "08", "00", "00", "00". I was tweaking you about adding the one zero "too short" in the wrong location. Even your copy of the original has 6 zeros following the 8. I've done that in the past, only listing the significant digits, dropping the leading 0, but the numbers I listed were different enough you wouldn't accidently add a new digit to it.