Skip navigation

These are notes from the book I am currently reading. These notes are available at Google Code.

Hexadecimal notation

-----------------------------------------------------------------------------------------------------------------------------------
| Hex Digit       |    0 |    1 |    2 |    3 |    4 |    5 |    6 |    7 |    8 |    9 |    A |    B |    C |    D |    E |    F |
-----------------------------------------------------------------------------------------------------------------------------------
| Decimal value   |    0 |    1 |    2 |    3 |    4 |    5 |    6 |    7 |    8 |    9 |   10 |   11 |   12 |   13 |   14 |   15 |
-----------------------------------------------------------------------------------------------------------------------------------
| Binary value    | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |
-----------------------------------------------------------------------------------------------------------------------------------

Tips:

Memorize decimal equivalments of hex digits, A, C, and F, and the hex values of B, D and E can be translated “by computing their values relative to the first three”

If a binary number is not a multiple of for pad with 0’s on the left until it is.

Given 0x173A4C:

---------------------------------------------------------
| Hexadecimal |    1 |    7 |    3 |    A |    4 |    C |
---------------------------------------------------------
| Binary      | 0001 | 0111 | 0011 | 1010 | 0100 | 1100 |
---------------------------------------------------------

Given 1111001010110110110011:

Break into four

1111 0010 1011 0110 1100 11

Pad with 0’s on left to get multiple of four:

0011 1100 1010 1101 1011 0011

Conversion:

---------------------------------------------------------
| Hexadecimal |    3 |    C |    A |    D |    B |    3 |
---------------------------------------------------------
| Binary      | 0011 | 1100 | 1010 | 1101 | 1011 | 0011 |
---------------------------------------------------------

Vertical conversion table:

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
Advertisements

One Trackback/Pingback

  1. […] is a conversion chart, a random byte generator if you want to create your own exercises and a converter to check your […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: