0123456789ABCDEF    0123456789ABCDEF    0123456789ABCDEF

What Is "Hexadecimal" ?

and

How, Where and Why is it used on Computers?

Copyright © 1996, 1999, 2000, 2002, 2004, 2011, 2020 by Daniel B. Sedory


All new Revision in 1999. Now contains an explanation of the use of Hexadecimal
for R - G - B colors as used in HTML for web pages ( Hexadecimal Colors in HTML )
(And a link to a combined free HEX <---> DECIMAL converter and HTML color coder!)
Updated with links to Wikipedia, 2011.




 Hexadecimal          Decimal    |  Hexadecimal     Decimal
-------------       -----------  |  -----------     -------
 0 through 9        0 through 9  |
                                 |  1D  (1 x 16) + 13 = 29 
      A   ( 9 + 1 = )    10      |  1E     "     + 14 = 30
      B   ( 9 + 2 = )    11      |  1F     "     + 15 = 31
      C   ( 9 + 3 = )    12      |  20  (2 x 16) +  0 = 32
      D   ( 9 + 4 = )    13      |  21     "     +  1 = 33
      E   ( 9 + 5 = )    14      |  22     "     +  2 = 34
      F   ( 9 + 6 = )    15      |  23     "     +  3 = 35
     10   (1 x 16) + 0 = 16      |  24     "     +  4 = 36
     11   (1 x 16) + 1 = 17      |  25     "     +  5 = 37
     12      "    +  2 = 18      |  26     "     +  6 = 38
     13      "    +  3 = 19      |  27     "     +  7 = 39
     14      "    +  4 = 20      |  28     "     +  8 = 40
     15      "    +  5 = 21      |  29     "     +  9 = 41
     16      "    +  6 = 22      |  2A     "     + 10 = 42
     17      "    +  7 = 23      |  2B     "     + 11 = 43
     18      "    +  8 = 24      |  2C     "     + 12 = 44
     19      "    +  9 = 25      |  2D     "     + 13 = 45
     1A      "    + 10 = 26      |  2E     "     + 14 = 46
     1B      "    + 11 = 27      |  2F     "     + 15 = 47
     1C      "    + 12 = 28      |  30  (3 x 16) +  0 = 48

 Hexadecimal          Decimal   Hexadecimal          Decimal
 -----------          -------   -----------          -------
     30    (3x16) + 0 =  48   |     100    (1x256) =    256
     40    (4x16) + 0 =  64   |(*)  200    (2x256) =    512
     50    (5x16) + 0 =  80   |     400    (4x256) =   1024
     64    (6x16) + 4 = 100   |     500    (5x256) =   1280
(*)  7F    (7x16) +15 = 127   |     800    (8x256) =   2048
     80    (8x16) + 0 = 128   |     A00   (10x256) =   2560
     90    (9x16) + 0 = 144   |     FFF                4095
     9F    (9x16) +15 = 159   |    1000   (1x4096) =   4096
     A0   (10x16) + 0 = 160   |    4000   (4x4096) = 16,384
     B0   (11x16) + 0 = 176   |    5000   (5x4096) = 20,480
     F0   (15x16) + 0 = 240   |    8000   (8x4096) = 32,768
(*)  FF   (15x16) +15 = 255   |(*) FFFF              65,535
So, what does a Base 16 number system have to do with a machine that's based ( pun intended) on zeros and ones?

A Few Details about the IBM PC and Microsoft


Bits, Bytes, Characters and Words


Binary:  | 2048 1024 512 256 | 128 64 32 16 | 8 4 2 1 | = 1111 1111 1111
  HEX :  |       256's       |     16's     |   1's   | =   F    F    F 
-------------------------------------------------------------------------
Computing      (15 x 256)    +  (15 x 16 )  +   15
 Decimal          3840       +     240      +   15      =    4 0 9 5
equivalent
=========================================================================
Binary: |2048 1024 512 | 256 128 64 | 32 16 8 | 4 2 1 | = 111 111 111 111
 OCTAL: |    512's     |     64's   |   8's   |   1's | =  7   7   7   7 
-------------------------------------------------------------------------
Computing ( 7 x 512 ) +  ( 7 x 64 ) + (7 x 8) +   7
 Decimal     3584     +     448     +    56   +   7     =    4 0 9 5
eqivalent
=========================================================================
 F F F h  =  7 7 7 7  Octal  =  4 0 9 5 (Decimal).
   FAD7(hex) =  1 1 1 1  1 0 1 0  1 1 0 1  0 1 1 1
   D37E(hex) =  1 1 0 1  0 0 1 1  0 1 1 1  1 1 1 0
               ------------------------------------
 ANDing gives:  1 1 0 1  0 0 1 0  0 1 0 1  0 1 1 0
   the Answer:     D       2       5       6
     (in hex)

 

                             			       HTML TAG Names  
      <font color="#FF0000">  RED   </font>  (RED)
      <font color="#00FF00"> GREEN  </font>  (GREEN)    LIME
      <font color="#0000FF">  BLUE  </font>  (BLUE)
      <font color="#FFFF00"> YELLOW </font>  (YELLOW)
      <font color="#FF00FF"> VIOLET </font>  (VIOLET)  FUCHSIA
      <font color="#00FFFF">  CYAN  </font>  (CYAN)     AQUA

 


Copyright ©1996, 1997, 1999, 2000, 2002, 2003, 2004, 2020 by  Daniel B. Sedory
 < You can email us here >

Revised on November 7th, 2003. Updated: 25 OCT 2004; 31 MAY 2011.
Last Update: November 1, 2020.


 

Back to " The Starman's Realm " Index Page