HomeMIDIMIDI Tutorials

Hexadecimal Tutorial

The simplest explanation of hexadecimal is this:

In "decimal" we have ten digits, 0 through 9. In "hexadecimal" we have sixteen digits, 0 through F. That is literally all there is to it. Everything else works exactly the same!

A point of clarification before the example. To differentiate between decimal and hexadecimal numbers, an "h" is appended to hexadecimal numbers. Hexadecimal is quite a jaw-breaker to repeat, so it is often simply called "hex".

Another point of interest is that hex numbers are usually presented as two digits, since one "byte" can have a hex value between 00h and FFh (0 through 255 decimal).

When counting in decimal, once we run out of digits we start combining them by putting a 1 to the left and starting at 0 on the right; thus 10 follows 9. In the same way, in hex once we run out of digits we do the same, thus 10h follows Fh.

Decimal : 0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16  17  etc.
     Hex: 0h 1h 2h 3h 4h 5h 6h 7h 8h 9h Ah Bh Ch Dh Eh Fh 10h 11h etc.

Note that 10h is not said aloud as "ten" because it is not ten, it is sixteen! Generally hex numbers are said as the individual digits; thus 10h is "one zero hex".

To convert between decimal and hex is quite simple with the following chart:

0h1h2h3h4h5h6h7h8h9hAhBhChDhEhFh
0h0163248648096112128144160176192208224240
1h1173349658197113129145161177193209225241
2h2183450668298114130146162178194210226242
3h3193551678399115131147163179195211227243
4h42036526884100116132148164180196212228244
5h52137536985101117133149165181197213229245
6h62238547086102118134150166182198214230246
7h72339557187103119135151167183199215231247
8h82440567288104120136152168184200216232248
9h92541577389105121137153169185201217233249
Ah102642587490106122138154170186202218234250
Bh112743597591107123139155171187203219235251
Ch122844607692108124140156172188204220236252
Dh132945617793109125141157173189205221237253
Eh143046627894110126142158174190206222238254
Fh153147637995111127143159175191207223239255

Find the decimal number you want to convert and look at the top hex digit first then at the left hex digit and you have the hex equivalent!

Do the reverse to convert from hex to decimal, find the left hex digit on the top position and find the right hex digit along the left side; where the two meet is the decimal equivalent!

The more you work with hex the easier it will become.


If you know for a fact that I have made any mistakes above, please let me know.

Feed back on clarity and semantics will also be greatly appreciated.

Thanks, Eddie Lotter


Glossary MIDI Tutorials Roland System Exclusive Messages