Other Binary Terms You May Encounter
Below are a few more binary terms you are likely to run into in working with binary numbers and audio or MIDI.
MSB: the left-most bit of a binary number, that of highest value, is called the most significant bit (MSB). If MSB refers to a digital word of multiple bytes, it refers to the byte of highest value.
LSB: the right-most bit of a binary number, that of lowest value, is called the least significant bit (LSB). If LSB refers to a digital word of multiple bytes, it refers to the byte of least value.
Word: this is a very inexact term—you will find many different definitions, but the most common definition of word is a 16-bit (two byte) binary value, though as mentioned on the previous page, there are double, triple, quadruple words and more. Writing in 2020, the de facto word size for new processors and applications is 64-bit units, or 8-byte words. I am certain it will soon be 128- or 256-bit words if this web page survives for awhile.
Nibble: a nibble is either the right or left half of a byte broken into two groups of 4 bits (1011 1010). The half of lowest value is called the lsn or least significant nibble and the half of highest value is called the msn or most significant nibble
Hexadecimal: a base-16 system of values. Each "place" has 16 values, ranging from 0-15 times a certain power of 16 (from right to left, 160, 161, etc.). To accomplish this with one position, alphabetical letters are used for values over 9, as shown in the table below. In this way, the 256-value range of an 8-bit byte can be expressed in two-place numbers (000000000=$00, 11111111=$FF). Hex numbers are usually identified by preceding dollar sign ($), or a '0x' or followed by an 'H.'
|Hexadecimal Single-place Values|
Example of a hexadecimal number:
|powers of 16||161||160|
|equivalent decimal values||16's||1's|
|sample hex number (remember A=10, D=13)||$A||D|
|how to solve for equivalent decimal value||10 x 16 +||13 x 1 =||173|
Data types: short and long integers, floats, signed and unsigned (optional reading): Chances are by the time you need to know this, you already understand what these terms refers to, but at some point, some basic understanding may be useful. Today, you may specify you want your audio file to be saved at 16-bit, 24-bit or 32-bit resolution from your DAW or other audio editing app, but you likely don't need to specify the file's actual data type, unless you are programming the application that makes it so. Integers (called shorts, longs, or ints) are stored and calculated differently than floating point numbers (called floats), which as the name implies have real or decimal values and are calculated via scientific notation practices (see the IEEE-754 standard for more information about how these are formated). In addition, values may be stored as unsigned (so beginning with the value of 0, and ascending to the maximum), or signed (where a middle binary value is assigned to 0 and the positive and negative values radiate to either end). With signed values, the most significant bit is used for the sign, either positive or negative, and zero is normally accounted for in the positive range, so there is an extra value on the negative side, as shown below, if using the more common two's-compliment scheme. 16-bit AIFF files, for example, are most often stored as signed integers. Assuming 8-bit bytes, the chart below explains what some of these formats mean, but there are also doubles and triples for most of the formats below in common use.
|data type||number of bytes||numerical range|
|16-bit unsigned short integer||2||0 to +65,535|
|16-bit signed short integer||2||-32,768 to +32,767|
|32-bit long unsigned integer||4||0 to +4,294,967,295|
|32-bit long signed integer||4||-2,147,483,648 to +2,147,483,647|
|32-bit floating point||4||between ~1.2*10-38 and ~3.4*1028|
Computer files and processes which use multiple bytes as single-entity words store or transmit the bytes with either the Most Significant Byte (MSB) first or at the lowest memory address, and end with the Least Significant Byte (LSB), or visa versa. The order is referred to as endianess. Big-endian systems store (and therefore output) the MSB first , and Little-endian systems store (and therefore output) the LSB first . Some systems are bi-endian, and can utilize data in either form through byte-swapping, and files often have a key in the file header which refers to the endian format that follows. This is now true of most audio files, though it used to be that AIFF files were stored exclusively as big-endian and WAV files were always stored as little-endian. Endianess can also refer to bit order, but most computer architectures use parallel transmission, so that is less of an issue (MIDI, which is serial, is reverse bit-ordered, with the most significant bit of a byte transmitted last). The term endianess was coined from Swift's Gulliver's Travels, where one Lilliputian sect broke into a boiled egg from the big end, and the other from the small end, and were hence referred to as Big-Endians and Little-Endians.John Bercow, former Speaker of the British House of Commons, famous for his "OR-dah, OR-dah!" admonitions to the MP's.