Effacer les filtres
Effacer les filtres

bitget() and MSB/LSB

8 vues (au cours des 30 derniers jours)
David C
David C le 28 Sep 2011
Hi,
I would like to clarify the functionality of bitget(). In the documentation, it is noted that "The output of bitget is independent of the endian settings of the computer you are using."
Question: Would bitget(binaryVector,1) always return the LSB of binaryVector, regardless of whether my machine is big-endian or little-endian?
Thanks, David

Réponse acceptée

Jan
Jan le 28 Sep 2011
Yes. BITGET is not influenced by the endianess of the machine. Therefore bitget(x, 1) and mod(x, 2) are equivalent, if x is a non-negative integer.
  1 commentaire
David C
David C le 2 Oct 2011
Thanks Jan!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by