Hexadecimal

From Alteeve Wiki
Jump to navigation Jump to search

 Main Page :: Hexadecimal

Hexadecimal is a method of representing 4 bits of data (known as a nibble) using a single ASCII character in the range from [0-9a-f].

Use

Hexadecimal is very often used where a long binary string needs to presented to a human user. A good example would be the colour setting used on most modern graphics and web programs. Continuing this example, computer colours are often represented as six hexadecimal digits. Each pair, that is each byte, representing Red, Green and Red respectively. These three primary colours are #ff0000, #00ff00 and #0000ff respectively. All other possible colors are simply ranges, or intensities, of these three colours.

Nibble-length Hexadecimal to Binary to Decimal Conversion Chart

In most cases, two hexadecimal characters are used to represent a byte. Before you look at that though, be sure to understand what each hex character represents.

 Dec. | Hex. | Binary
------+------+--------
   0  |  0   | 0000
   1  |  1   | 0001
   2  |  2   | 0010
   3  |  3   | 0011
   4  |  4   | 0100
   5  |  5   | 0101
   6  |  6   | 0110
   7  |  7   | 0111
   8  |  8   | 1000
   9  |  9   | 1001
  10  |  a   | 1010
  11  |  b   | 1011
  12  |  c   | 1100
  13  |  d   | 1101
  14  |  e   | 1110
  15  |  f   | 1111
------+------+--------

Byte-length Hexadecimal to Binary to Decimal Conversion Chart

This is the full chart of decimal to hexadecimal to binary values covering the full 256 possible values of a single byte. This is a convenient resource to review when, among other things, trying to covert IP addresses to hexadecimal values.

 Dec. | Hex.  | Binary
------+-------+-----------
   0  |  00   | 0000 0000
   1  |  01   | 0000 0001
   2  |  02   | 0000 0010
   3  |  03   | 0000 0011
   4  |  04   | 0000 0100
   5  |  05   | 0000 0101
   6  |  06   | 0000 0110
   7  |  07   | 0000 0111
   8  |  08   | 0000 1000
   9  |  09   | 0000 1001
  10  |  0a   | 0000 1010
  11  |  0b   | 0000 1011
  12  |  0c   | 0000 1100
  13  |  0d   | 0000 1101
  14  |  0e   | 0000 1110
  15  |  0f   | 0000 1111
  16  |  10   | 0001 0000
  17  |  11   | 0001 0001
  18  |  12   | 0001 0010
  19  |  13   | 0001 0011
  20  |  14   | 0001 0100
  21  |  15   | 0001 0101
  22  |  16   | 0001 0110
  23  |  17   | 0001 0111
  24  |  18   | 0001 1000
  25  |  19   | 0001 1001
  26  |  1a   | 0001 1010
  27  |  1b   | 0001 1011
  28  |  1c   | 0001 1100
  29  |  1d   | 0001 1101
  30  |  1e   | 0001 1110
  31  |  1f   | 0001 1111
  32  |  20   | 0010 0000
  33  |  21   | 0010 0001
  34  |  22   | 0010 0010
  35  |  23   | 0010 0011
  36  |  24   | 0010 0100
  37  |  25   | 0010 0101
  38  |  26   | 0010 0110
  39  |  27   | 0010 0111
  40  |  28   | 0010 1000
  41  |  29   | 0010 1001
  42  |  2a   | 0010 1010
  43  |  2b   | 0010 1011
  44  |  2c   | 0010 1100
  45  |  2d   | 0010 1101
  46  |  2e   | 0010 1110
  47  |  2f   | 0010 1111
  48  |  30   | 0011 0000
  49  |  31   | 0011 0001
  50  |  32   | 0011 0010
  51  |  33   | 0011 0011
  52  |  34   | 0011 0100
  53  |  35   | 0011 0101
  54  |  36   | 0011 0110
  55  |  37   | 0011 0111
  56  |  38   | 0011 1000
  57  |  39   | 0011 1001
  58  |  3a   | 0011 1010
  59  |  3b   | 0011 1011
  60  |  3c   | 0011 1100
  61  |  3d   | 0011 1101
  62  |  3e   | 0011 1110
  63  |  3f   | 0011 1111
  64  |  40   | 0100 0000
  65  |  41   | 0100 0001
  66  |  42   | 0100 0010
  67  |  43   | 0100 0011
  68  |  44   | 0100 0100
  69  |  45   | 0100 0101
  70  |  46   | 0100 0110
  71  |  47   | 0100 0111
  72  |  48   | 0100 1000
  73  |  49   | 0100 1001
  74  |  4a   | 0100 1010
  75  |  4b   | 0100 1011
  76  |  4c   | 0100 1100
  77  |  4d   | 0100 1101
  78  |  4e   | 0100 1110
  79  |  4f   | 0100 1111
  80  |  50   | 0101 0000
  81  |  51   | 0101 0001
  82  |  52   | 0101 0010
  83  |  53   | 0101 0011
  84  |  54   | 0101 0100
  85  |  55   | 0101 0101
  86  |  56   | 0101 0110
  87  |  57   | 0101 0111
  88  |  58   | 0101 1000
  89  |  59   | 0101 1001
  90  |  5a   | 0101 1010
  91  |  5b   | 0101 1011
  92  |  5c   | 0101 1100
  93  |  5d   | 0101 1101
  94  |  5e   | 0101 1110
  95  |  5f   | 0101 1111
  96  |  60   | 0110 0000
  97  |  61   | 0110 0001
  98  |  62   | 0110 0010
  99  |  63   | 0110 0011
 100  |  64   | 0110 0100
 101  |  65   | 0110 0101
 102  |  66   | 0110 0110
 103  |  67   | 0110 0111
 104  |  68   | 0110 1000
 105  |  69   | 0110 1001
 106  |  6a   | 0110 1010
 107  |  6b   | 0110 1011
 108  |  6c   | 0110 1100
 109  |  6d   | 0110 1101
 110  |  6e   | 0110 1110
 111  |  6f   | 0110 1111
 112  |  70   | 0111 0000
 113  |  71   | 0111 0001
 114  |  72   | 0111 0010
 115  |  73   | 0111 0011
 116  |  74   | 0111 0100
 117  |  75   | 0111 0101
 118  |  76   | 0111 0110
 119  |  77   | 0111 0111
 120  |  78   | 0111 1000
 121  |  79   | 0111 1001
 122  |  7a   | 0111 1010
 123  |  7b   | 0111 1011
 124  |  7c   | 0111 1100
 125  |  7d   | 0111 1101
 126  |  7e   | 0111 1110
 127  |  7f   | 0111 1111
 128  |  80   | 1000 0000
 129  |  81   | 1000 0001
 130  |  82   | 1000 0010
 131  |  83   | 1000 0011
 132  |  84   | 1000 0100
 133  |  85   | 1000 0101
 134  |  86   | 1000 0110
 135  |  87   | 1000 0111
 136  |  88   | 1000 1000
 137  |  89   | 1000 1001
 138  |  8a   | 1000 1010
 139  |  8b   | 1000 1011
 140  |  8c   | 1000 1100
 141  |  8d   | 1000 1101
 142  |  8e   | 1000 1110
 143  |  8f   | 1000 1111
 144  |  90   | 1001 0000
 145  |  91   | 1001 0001
 146  |  92   | 1001 0010
 147  |  93   | 1001 0011
 148  |  94   | 1001 0100
 149  |  95   | 1001 0101
 150  |  96   | 1001 0110
 151  |  97   | 1001 0111
 152  |  98   | 1001 1000
 153  |  99   | 1001 1001
 154  |  9a   | 1001 1010
 155  |  9b   | 1001 1011
 156  |  9c   | 1001 1100
 157  |  9d   | 1001 1101
 158  |  9e   | 1001 1110
 159  |  9f   | 1001 1111
 160  |  a0   | 1010 0000
 161  |  a1   | 1010 0001
 162  |  a2   | 1010 0010
 163  |  a3   | 1010 0011
 164  |  a4   | 1010 0100
 165  |  a5   | 1010 0101
 166  |  a6   | 1010 0110
 167  |  a7   | 1010 0111
 168  |  a8   | 1010 1000
 169  |  a9   | 1010 1001
 170  |  aa   | 1010 1010
 171  |  ab   | 1010 1011
 172  |  ac   | 1010 1100
 173  |  ad   | 1010 1101
 174  |  ae   | 1010 1110
 175  |  af   | 1010 1111
 176  |  b0   | 1011 0000
 177  |  b1   | 1011 0001
 178  |  b2   | 1011 0010
 179  |  b3   | 1011 0011
 180  |  b4   | 1011 0100
 181  |  b5   | 1011 0101
 182  |  b6   | 1011 0110
 183  |  b7   | 1011 0111
 184  |  b8   | 1011 1000
 185  |  b9   | 1011 1001
 186  |  ba   | 1011 1010
 187  |  bb   | 1011 1011
 188  |  bc   | 1011 1100
 189  |  bd   | 1011 1101
 190  |  be   | 1011 1110
 191  |  bf   | 1011 1111
 192  |  c0   | 1100 0000
 193  |  c1   | 1100 0001
 194  |  c2   | 1100 0010
 195  |  c3   | 1100 0011
 196  |  c4   | 1100 0100
 197  |  c5   | 1100 0101
 198  |  c6   | 1100 0110
 199  |  c7   | 1100 0111
 200  |  c8   | 1100 1000
 201  |  c9   | 1100 1001
 202  |  ca   | 1100 1010
 203  |  cb   | 1100 1011
 204  |  cc   | 1100 1100
 205  |  cd   | 1100 1101
 206  |  ce   | 1100 1110
 207  |  cf   | 1100 1111
 208  |  d0   | 1101 0000
 209  |  d1   | 1101 0001
 210  |  d2   | 1101 0010
 211  |  d3   | 1101 0011
 212  |  d4   | 1101 0100
 213  |  d5   | 1101 0101
 214  |  d6   | 1101 0110
 215  |  d7   | 1101 0111
 216  |  d8   | 1101 1000
 217  |  d9   | 1101 1001
 218  |  da   | 1101 1010
 219  |  db   | 1101 1011
 220  |  dc   | 1101 1100
 221  |  dd   | 1101 1101
 222  |  de   | 1101 1110
 223  |  df   | 1101 1111
 224  |  e0   | 1110 0000
 225  |  e1   | 1110 0001
 226  |  e2   | 1110 0010
 227  |  e3   | 1110 0011
 228  |  e4   | 1110 0100
 229  |  e5   | 1110 0101
 230  |  e6   | 1110 0110
 231  |  e7   | 1110 0111
 232  |  e8   | 1110 1000
 233  |  e9   | 1110 1001
 234  |  ea   | 1110 1010
 235  |  eb   | 1110 1011
 236  |  ec   | 1110 1100
 237  |  ed   | 1110 1101
 238  |  ee   | 1110 1110
 239  |  ef   | 1110 1111
 240  |  f0   | 1111 0000
 241  |  f1   | 1111 0001
 242  |  f2   | 1111 0010
 243  |  f3   | 1111 0011
 244  |  f4   | 1111 0100
 245  |  f5   | 1111 0101
 246  |  f6   | 1111 0110
 247  |  f7   | 1111 0111
 248  |  f8   | 1111 1000
 249  |  f9   | 1111 1001
 250  |  fa   | 1111 1010
 251  |  fb   | 1111 1011
 252  |  fc   | 1111 1100
 253  |  fd   | 1111 1101
 254  |  fe   | 1111 1110
 255  |  ff   | 1111 1111
------+-------+-----------

If you are interested, this is the script used to create the chart above.

 

Any questions, feedback, advice, complaints or meanderings are welcome.
Us: Alteeve's Niche! Support: Mailing List IRC: #clusterlabs on Libera Chat
© Alteeve's Niche! Inc. 1997-2023   Anvil! "Intelligent Availability™" Platform
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.