An die ersten 3 Bits eines Short Integers kommen?
-
Wie bekomme ich die untersten 3 Bit eines Shorts?
-
Hallo
suche nach Bitoperationen.
bis bald
akari
-
So zB:
#include <iostream> using namespace std; int main( ) { short value = 5; cout << ( ( value & 0x04 ) != 0 ); cout << ( ( value & 0x02 ) != 0 ); cout << ( ( value & 0x01 ) != 0 ) << endl; }Greetz, Swordfish