Sunday, September 8, 2024

Why I love hexadecimal

I love hexadecimal, a big word that means 16, because it makes me feel so young. Let me explain.

In our familiar decimal (base 10) system there are 10 units, and we use the symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 to represent them. After reaching 9, we add a 1 in the next column to the left (the "tens" position) followed by the same unit symbols and get 10, 11, 12, 13, 14, 15 all the way to 19, and then we add 1 to the tens position and repeat the units (20, 21, 22, and so forth). Eventually we get to 97, 98,99, and repeat the process of adding 1 in the next column to the left and reach 100 (1 hundred, no tens, and no units).

We should have learned all of this in grammar school. In the world of computers, however, one will soon eccounter (at least people used to) the word hexadecimal because computers are not based on the decimal system. Computers are based on binary (base 2) arithmetic, and hexadecimal (base 16) is a shorthand method of avoiding having to read long strings of zeroes and ones in binary. Hexadecimal notation uses the same 0 to 9 as decimal but adds six more symbols (A, B, C, D, E, and F) that correspond to the decimal numbers 11, 12, 13, 14, and 15 before we can reach hexadecimal 10, which is equivalent to 16 in the decimal system.

If you don't understand the previous paragraph, keep reading it over and over and do not proceed further until you do. If the light never dawns, however, you will be caught in what computer programmers call an endless loop.

So if hex 10 is the same as decimal 16, and it is, can you hazard a guess as to what hex 20 and hex 30 are equivalent to? If you said 32 and 48, go to the head of the class.

The reason I love hexadecimal is that I can sort of fool my aging self into pretending I am not as old as I really am. When I turned 50, the folks in our office gave me a cake that said "Happy X'32' Birthday"!

And now that the two adults in our home are 83 and 89 in decimal, we manage to think of ourselves as quite a bit younger by thinking of our ages in hexadecimal, 53 and 59, respectively.

If I should happen to live three months longer than my grandfather did and reach my 96th birthday, I will be a mere 60 in hexadecimal (16 × 6). The only drawback to carrying on our pretense is the difficulty in trying to explain such ages as 5A, 5B, 5C, 5D, 5E, and 5F (90 through 95 in decimal) to ordinary mortals (i.e., non-computer geeks).

I may have written a post similar to this one before, but I'm not sure. Maybe my brain isn't as young as I try to fool myself into thinking.

8 comments:

  1. This is a part of the number system everyone should know. It helps to explain a few common things.

    ReplyDelete
    Replies
    1. I agree. After all, the more you know, the more you know. Thanks, Red.

      Delete
  2. Replies
    1. Please elaborate! What caught your fancy? What questions were raised? I'm intrigued. Thank you, Janice.

      Delete
  3. My children and grandchildren think I'm strange because I like the number 9. Remember casting out nines to check your math work? I still play around with nines. Replacing your hexadecimal with my magic nine I am a mere 5 years old.

    ReplyDelete
    Replies
    1. I remember hearing about 'casting out nines' long ago, but I had forgotten how to do it and had to go and read some more about it. Thanks for broadening my horizons today, Emma.

      Delete
  4. My dad loves hexadecimal, too. I never really understood why

    ReplyDelete
    Replies
    1. I wonder if it's for the same reason I do. You ought to ask him. Thanks, kylie.

      Delete

<b> The US presidential election process explained </b>

I hope to explain how a US president is chosen without becoming hopelessly bogged down in minutiae (or, if you prefer, becoming bogged down...