Talk:Most significant bit

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

The picture in this page is useless without specifying the "weight" of each bit!

exactly. is the example big endian or little endian? i don't understand which is which. - Omegatron 18:40, Jun 8, 2005 (UTC)
The terms big endian and little endian have no meaning within a single byte with the exception that most big endian devices (such as Motorola) number the MSB bit 0 and the LSB bit 7, which most little endian devices (such as Intel) number the MSB bit 7 and the LSB bit 0. In either case, the MSB is the left-most bit while the LSB is the right-most bit. Endianness becomes an issue when you are dealing with multiple bytes. Endianness it a very simple concept, but for someone who doesn't deal with it regularly, it can be quite difficult to grasp. The endianness article should explain it fully, although I haven't read it lately and am not certain whether it provides a sufficient explanation. Jimwilliams57 02:30, Jun 9, 2005 (UTC)
Oh, ok. Well, shouldn't the image indicate that the bit on the right represents the "1's place" and the bit on the left represents 128? - Omegatron 15:09, Jun 9, 2005 (UTC)
Good point. I'll take care of it. Jimwilliams57 02:19, Jun 11, 2005 (UTC)

Alternate meaning of MSB[edit]

Lately I've started seeing another usage of MSB == "Main Stream Blogosphere".

See for instance

http://outsidethewhale.blogspot.com/2005/04/drudges-lament-dispatches-from-msb.html http://www.tnr.com/blog/theplank?pid=4284 — Preceding unsigned comment added by Infrogmation (talkcontribs) 9:32, 10 June 2005‎

That would belong on the MSB disambiguation page, not here, as it's not relevant to significant bits or bytes. Guy Harris (talk) 01:35, 17 January 2016 (UTC)[reply]

Furthermore[edit]

It's possible to mathematically calculate the greater of two numbers using the MSB without having to use code branching:

If Y is greater than X then Y-X will have an MSB of 0 If X is greater than Y then Y-X will have an MSB of 1

Therefore (Y x NOT(MSB(Y-X)))+ (X x MSB(Y-X)) will return the larger number.

Proof: 3 - 2 = 1, MSB(3-2) = 0, NOT(MSB(3-2)) = 1, therefore (3 x NOT(MSB(3-2))) + (2 x MSB(3-2)) = 3 x 1 + 2 x 0 = 3

Have fun with that!! —Preceding unsigned comment added by 213.120.253.12 (talk) 16:12, 5 August 2009 (UTC)[reply]

Unsigned?[edit]

The binary example image at the right states: "The msb in an 8-bit binary number represents a value of 128 decimal." Should this read "The msb in an 8-bit unsigned binary number..."? I know the word unsigned is mentioned earlier, but it would make sense to use it here as well (to me). --Iaindb (talk) 05:49, 12 August 2009 (UTC)[reply]

Use of MSB in negative calculations[edit]

Might be worthwhile noting the historic use of MSB in storing negative numers digitally, now replaced by Two's Complement. Another bit would be added to a number (on the left, effectively a new MSB) and would be used to indicate polarity; 0 for positive, 1 for negative. — Preceding unsigned comment added by A - J - Hadley (talkcontribs) 23:01, 12 September 2012 (UTC)[reply]

That's signed magnitude notation; in two's complement, and ones complement, notation, the MSB acts as a sign bit as well. Guy Harris (talk) 01:40, 17 January 2016 (UTC)[reply]