APPENDIX A
Binary and Hex
486
Looking at the above table we are assuming that there are eight hardware switches
grouped together producing what is essentially an 8-bit byte. Also, as they are all
switched off, the sum produced will be zero. However, if we were to introduce
some positive bits we could sum them together to produce a decimal number.
128 64 32 16 8 4 2 1
0 1 1 0 1 1 0 1
(0 ⴛ 128) ⴙ (1 ⴛ 64) ⴙ (1 ⴛ 32) ⴙ (0 ⴛ 16) ⴙ (1 ⴛ 8) ⴙ
(1 ⴛ 4) ⴙ (0 ⴛ 2) ⴙ (1 ⴛ 1) ⴝ 109
Thus the decimal equivalent of the binary 01101101 would be 109. Additionally,
we could also determine that the maximum number that could be calculated
via binary would be 255 (11111111).
As MIDI uses this same 8-bit system when communicating with any devices,
it would seem sensible to assume that it should be able to offer this same
maximum parameter (of 255) but this isn’t the case. Similar to CC messages,
two forms of information need to be transmitted; a status bit and a data byte
(which is composed of 7 bits). The status bit informs the synth of an incoming
message that is arriving, while the following data byte informs it by how much
the parameter should be adjusted. Because of this initial status bit, only 7 other
bits are left to provide the information, resulting in a maximum decimal value
of 127; hence, the maximum number of any CC message can only be 127. To
transmit numbers larger than this, an 8-bit byte has to be split into two halves
and then converted into another numeration format, hexadecimal.
When we split a byte into two halves, both halves are commonly referred to
as ‘nibbles’. If the previous example were to be broken down into two nibbles,
it would become 0110 and 1101. These could then be individually summed
together as 0110 ⫽ 96 and 1101 ⫽ 13 (96 ⫹ 13 ⫽ 109) to produce the result
again. However, by splitting a byte into two and then converting it into a hexa-
decimal value, it’s possible to produce much higher values. The reason behind
this is that hexadecimal works to base-16, meaning that it is possible to access
up to 16 383 parameters in a synth, much more than the standard 127 offered
through CC messages.
COUNTING IN HEXADECIMAL
Hex uses a base-16 numbering system, but as there are not enough symbols to
represent 16 different digits, as soon as the number 10 is reached it has to be
converted into letters. Thus to represent number 10–15 the letters A–F are used.
Recall how we count in decimal. Counting upwards, we count from 1 through
9 and then we place a 1 to the left of this and go back to 0, making the number
10 (which actually means 1 to the power of 10 plus 0 to the power of 1). With