Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Reading hexadecimal numbers out loud

Reading hexadecimal numbers out loud

Scheduled Pinned Locked Moved The Lounge
helpquestionlearning
31 Posts 15 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    Right, but in order to give it a meaningful and pronounceable name, you must first communicate the number itself somehow.

    L Offline
    L Offline
    Luc Pattyn
    wrote on last edited by
    #13

    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

    L 1 Reply Last reply
    0
    • L Luc Pattyn

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #14

      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.

      L 1 Reply Last reply
      0
      • L Lost User

        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.

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #15

        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

        1 Reply Last reply
        0
        • L Luc Pattyn

          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

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #16

          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

          1 Reply Last reply
          0
          • B BobJanova

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

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #17

            I have spent too much time with a hex keyboard to do anything else. At least there is no great discussion about coding conventions when you enter machine code directly :)

            At least artificial intelligence already is superior to natural stupidity

            1 Reply Last reply
            0
            • L Lost User

              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.

              S Offline
              S Offline
              Stefan_Lang
              wrote on last edited by
              #18

              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.

              1 Reply Last reply
              0
              • B BobJanova

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

                J Offline
                J Offline
                jsc42
                wrote on last edited by
                #19

                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)

                1 Reply Last reply
                0
                • G Gary R Wheeler

                  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;

                  T Offline
                  T Offline
                  Tyler Elric
                  wrote on last edited by
                  #20

                  Same here, except I say "OH-EX" and then the numbers/letters. :D :-D :laugh:

                  1 Reply Last reply
                  0
                  • L Lost User

                    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.

                    R Offline
                    R Offline
                    Rich D
                    wrote on last edited by
                    #21

                    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.

                    L 1 Reply Last reply
                    0
                    • R Rich D

                      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.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #22

                      Makes sense, but probably not to everyone

                      1 Reply Last reply
                      0
                      • G Gary R Wheeler

                        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;

                        B Offline
                        B Offline
                        Bruce Patin
                        wrote on last edited by
                        #23

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

                        K 1 Reply Last reply
                        0
                        • L Lost User

                          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.

                          S Offline
                          S Offline
                          shawnthomas00
                          wrote on last edited by
                          #24

                          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[^]

                          L 1 Reply Last reply
                          0
                          • S shawnthomas00

                            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[^]

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #25

                            Excellent, thought of course no one will understand me until people actually start using that system :)

                            1 Reply Last reply
                            0
                            • L Lost User

                              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.

                              J Offline
                              J Offline
                              jschell
                              wrote on last edited by
                              #26

                              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.

                              1 Reply Last reply
                              0
                              • L Lost User

                                I'll steal that. But that doesn't really help for numbers with more set bits, especially not if they're in low positions.

                                K Offline
                                K Offline
                                KP Lee
                                wrote on last edited by
                                #27

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

                                1 Reply Last reply
                                0
                                • B Bruce Patin

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

                                  K Offline
                                  K Offline
                                  KP Lee
                                  wrote on last edited by
                                  #28

                                  That would be eight, zero zero, zero zero, zero zero. :-D

                                  B 1 Reply Last reply
                                  0
                                  • K KP Lee

                                    That would be eight, zero zero, zero zero, zero zero. :-D

                                    B Offline
                                    B Offline
                                    Bruce Patin
                                    wrote on last edited by
                                    #29

                                    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.

                                    K 1 Reply Last reply
                                    0
                                    • B Bruce Patin

                                      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.

                                      K Offline
                                      K Offline
                                      KP Lee
                                      wrote on last edited by
                                      #30

                                      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.

                                      B 1 Reply Last reply
                                      0
                                      • K KP Lee

                                        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.

                                        B Offline
                                        B Offline
                                        Bruce Patin
                                        wrote on last edited by
                                        #31

                                        My bad, I didn't see that - aack! Another reason that I usually wrote long hex numbers with a tiny space between each pair, or directly under another hex number whose digits I had already counted properly. P.S. Wait a minute! I just went back and counted the original poster's zeros and mine. We actually do have 7 zeros following the 8: 0x80000000. You haven't been working in the banking system, have you?

                                        1 Reply Last reply
                                        0
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • World
                                        • Users
                                        • Groups