samedi 2 mars 2019

Obtaining x to y bits from a number using C++

Suppose I have a decimal number 1033 how do I get the bits from 0 to 9 (in this case it will be 9 decimal) and how do I get the bits from 10th bit to 15th bit in this case it will be (1 decimal). Is there an option in C++ that could assist me in accomplishing this and how to use it. Thanks in advance

Aucun commentaire:

Enregistrer un commentaire