MATLAB: How to get the LSB of a number

lsb

If suppose the number is 110110, how to get its LSB in matlab?

Best Answer

Darsana - if x is your array of bits (presumably that is what it is) then the least significant bit (LSB) is the right-most bit
lsb = x(end);