What is Least significant bit ( lsb ) ? |
In computing, the least significant bit (lsb) is the bit position in a binary integer giving the units value, that is, determining whether the number is even or odd. The lsb is sometimes referred to as the right-most bit, due to the convention in positional notation of writing less significant digits further to the right. |
template<class T> //Least significant bit unsigned short GetLSB(T tValue) { return (tValue & 1); } |
What is Most significant bit ( msb ) ? |
In computing, the most significant bit (msb) is the bit position in a binary number having the greatest value. The msb is sometimes referred to as the left-most bit on big-endian architectures, due to the convention in positional notation of writing more significant digits further to the left. |
Tuesday, April 27, 2010
Program to Find lsb and msb - C++
Posted by Sen SD at 10:24 PM
Subscribe to:
Post Comments (Atom)
1 comment:
GetMSB(8) returns 0 and you know what? GetMSB(4) returns 0 too. GetLSB doesn't work aswell.
Post a Comment