Contact: aviboots(AT)netvision.net.il
39,880 questions
51,806 answers
573 users
#include <iostream> #include <bitset> using namespace std; int main() { int n = 365, pos = 2; cout << bitset<8>(n) << endl; n ^= (1 << pos); cout << bitset<8>(n) << endl; return 0; } /* run: 01101101 01101001 */