MSB/LSB Tutorial

The letters MSB can stand for Most Significant Byte or Most Significant Bit. Likewise, the letters LSB stand for Least Significant Byte or Least Significant Bit. They are a way of refering to a particular position in a group of bytes or bits.

Bit PositionBit 7Bit 6Bit 5Bit 4 Bit 3Bit 2Bit 1Bit 0
Power of 21286432168421
Bit Value10110100

In the above example, the most significant bit is the position representing the highest power of 2, which is bit 7. The least significant bit is represented by the lowest power of 2, bit 0. We can say that the MSB has a value 1 and the LSB vas a value 0 in the above example. The number of bits in the grouping does not matter; just the highest and lowest power of 2 in the grouping.

Bit PositionBit 3Bit 2Bit 1Bit 0
Power of 28421
Bit Value0100

The same concept is used when refering to a group of bytes. For example, when two bytes are combined to form a 16 bit word, there is a most significant byte and a least significant byte as shown below.

Byte Position Byte 1 Byte 0
Powers of 2 bits 15-8 bits 7-0
Byte Value 3B 72

Sysex data that must be represented with a word value is sent to the Proteus sound module least significant byte first. For example, the pitch wheel MIDI command (E0) requires a data parameter in the range of -7FFF to 8000 hex. To send a pitch wheel event with a data value 3D72, the bytes would be sent in the following order: E0 72 3D. The Proteus unit will reassemble the word value properly after it is received.

Use your browser's Back control to return to the previous page.

Copyright © 2000 - 2002 Don Buczynski
San Diego, California
Last Updated: 9/05/02