Contact: aviboots(AT)netvision.net.il
39,870 questions
51,793 answers
573 users
#include <iostream> #include <bitset> using namespace std; int main() { int n = 255; cout << bitset<8>(n) << endl; n = n & 0xaaaaaaaa; cout << bitset<8>(n) << endl; return 0; } /* run: 11111111 10101010 */