Origin Of The Hexadecimal Numbers

Discussion in 'General Electronics Chat' started by Glenn Holland, Jan 22, 2015.

  1. Glenn Holland

    Thread Starter Member

    Dec 26, 2014
    353
    110
    I've been looking for an explanation how/why the hexadecimal numbers came into existence.

    I can understand the binary representation for 0 through 9, but why are the remaining numbers represented by A,B,C,D,E, and F?

    Hex is frequently used for displaying event codes in control systems and indicating computer faults. My theory is that hex numbers are easier to indicate on a 7-segment display and they also require only a one-digit position when the count reaches 10 or more.
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,500
    2,365
    I believe it is more of a handy and compact way of representing a byte in two characters/digits.
    A-F because something had to represent a count up to 15 by a single character.
    Max.
     
  3. Glenn Holland

    Thread Starter Member

    Dec 26, 2014
    353
    110
    Dual hex displays are used for fault codes in many industrial controls and I suspected that representing a number greater than 9 with only one digit was the idea.
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,500
    2,365
    I personally don't believe that was the origin, just a by product. It has been used in coding in assembly from the beginning for shorthand so probably preceded the display itself.
    Just as Boolean arithmetic preceded the computer.
    Max.
     
  5. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,504
    There are several reasons... among them, one of the first is that all modern computing is based on the binary system, which developed around powers (exponents) of two. The very first processors were built around a 4-bit architecture, and the next logic step would be twice of that: 8 bits. Then the next logic steps would be 16, 32, 64, etc... today's most advanced commercial processors work at 256 bits per operation. (there are exceptions that work on 12, 14, 18 and 20 bits, but that's a different story)
    To answer your question about letters, they were chosen because it was the easiest way to represent a number greater than nine with a single digit (they could've chosen different symbols, other than letters). And since computer technology got stuck for a very long time at 16 bits, when 32 bit technology finally arrived everyone was already used to hexadecimal notation.
    Say I invented a new notation for the representation of 32 bit numbers... it would mean that I'd need 32 different symbols to represent it in a single digit, so my numbering system could be: 0, 1, 2 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, and V.
    So the number 1,000,000 as F4240 (15x16^4 + 4x16^3 + 2x16^2 + 4x16^1 + 0x16^0) in hexadecimal, but in base 32 it would be UGI0 (30*32^3 + 16*32^2 + 18*32^1 + 0*32^0). It really doesn't matter what symbols you chose to represent your system, what matters to the computer is how many simultaneous bits (zeroes and ones) are fed into its processor.
     
  6. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Last edited: Jan 23, 2015
  7. Glenn Holland

    Thread Starter Member

    Dec 26, 2014
    353
    110
    I tried pasting it in the search box and it didn't work.
     
  8. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    The address bar, where you see forum.allaboutcircuits.com

    You have to replace the URL with it and it needs to start with data and you need to press return
     
  9. Glenn Holland

    Thread Starter Member

    Dec 26, 2014
    353
    110
    Actually, I got cramped fingers from holding the mouse to copy the entire length of it.

    So what site does it take me to?
     
  10. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    I have put it on my website as a simple HTML file

    When you view the source, you can also click it, same effect
     
  11. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,353
    Computers work with binary numbers, zeros and ones.

    It gets very tedious for us humans to write down all those zeros and ones. And it increases the chance of making an error during transcription.

    Some computers use 12-bit words.
    So instead of writing down 111 110 101 100
    It is easier to write 7654 if one were using octal representation, which was commonly used at one point.

    Or you could use hexadecimal representation.
    So the same binary string 1111 1010 1100 can be written as FAC.

    111110101100 = 7645 = FAC

    Take your pick. Which is easier to write down, recognize or remember?
     
  12. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    Hexadecimal is a more compact way to write binary numbers that are grouped in Byte lengths as compared to Octal or Binary notation and that's its primary reason for being.

    A through F were used for the numbers above nine because they are commonly recognized characters (at least for anyone who is familiar with Latin script). New number characters could have been invented for that purpose, of course, but then everyone who used hexadecimal would have had to learn those characters.
     
  13. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    The choices available in Baudot, sixbit, and Holerith codes were limited to letters, numbers, and a few punctuation characters. We used octal on the IBM 7090, and the DEC PDP-8 and PDP-11. IIRC Hex showed up with the System 360.
     
  14. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    AFAICR; the first MCU - the 4004 was a 4-bit device, hex would be the obvious logical choice to display a nyble on a single digit.

    Whether hex was in general use before that, I've no idea.
     
    cmartinez likes this.
  15. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,504
    Yes... that's my opinion too... everything else went dominoes after the nibble... byte, word, dword, qword... wonder if that system's ever going to change
     
  16. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,673
    2,712
    FYI, base 32 != 32 bits.

    A 32 bit numbering system would require 4,294,967,296 symbols.
     
  17. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,504
    :eek: ... I stand corrected... and that is why I'm not a university professor... thanks for clarifying ...
    it should've read "... notation for the representation of base 32 numbers ..."
     
    #12 likes this.
  18. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,673
    2,712
    BTW, check this out.
     
    cmartinez likes this.
  19. #12

    Expert

    Nov 30, 2010
    16,248
    6,745
    Sex-agesimal...French curves..I'm beginning to see a pattern here. :rolleyes:
     
  20. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,504
    Good to know you're still years away from andropause...
     
    #12 likes this.
Loading...