Most significant bit
|This article needs additional citations for verification. (March 2007)|
In computing, the most significant bit (msb or MSB, also called the high-order bit) is the bit position in a binary number having the greatest value. The msb is sometimes referred to as the left-most bit due to the convention in positional notation of writing more significant digits further to the left.
It is common to assign each bit a position number, ranging from zero to N-1, where N is the number of bits in the binary representation used. Normally, this is simply the exponent for the corresponding bit weight in base-2 (such as in
231..20). Although a few CPU manufacturers assign bit numbers the opposite way (which is not the same as different endianness), the msb unambiguously remains the most significant bit. This may be one of the reasons why the term msb is often used instead of a bit number, although the primary reason is probably that different number representations use different numbers of bits.
By extension, the most significant bits (plural) are the bits closest to, and including, the msb.
Most Significant Bit First vs Least Significant Bit First
The expressions Most Significant Bit First and Least Significant Bit First are indications on the ordering of the sequence of the bits in the bytes sent over a wire in a trasmission procotol or in a stream (e.g an audio stream).
Most Significant Bit First means that the most significant bit will arrive first: hence e.g. the hexadecimal number
00010010 in binary representation, will arrive as the sequence
0 0 0 1 0 0 1 0 .
Least Significant Bit First means that the least significant bit will arrive first: hence e.g. the same hexadecimal number
00010010 in binary representation, will arrive as the (reversed) sequence
0 1 0 0 1 0 0 0.
MSB, in all capitals, can also stand for "most significant byte". The meaning is parallel to the above: it is the byte (or octet) in that position of a multi-byte number which has the greatest potential value.