How to get the LSB of a number?
6 ビュー (過去 30 日間)
古いコメントを表示
If suppose the number is 110110, how to get its LSB in matlab?
2 件のコメント
Jan
2017 年 9 月 19 日
Please explain what the class of your "110110" is. Is it a char vector '110110' or a double vector [1,1,0,1,1,0]? Is it a logical vector or the binary representation of the number scalar double 54? Is the value store in LSB first order or the other way around? All these details cannot be guessed.
採用された回答
Geoff Hayes
2017 年 10 月 19 日
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);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!