#include int main(int argc, char** argv) { // binary: 1010 1010 unsigned int x = 0xAA; // binary: 1010 0101 unsigned int y = 0xA5; // Bitwise AND (both) // binary: 1010 0000 unsigned int z = x & y; std::cout << "0xAA & 0xA5 = " << std::hex << z << std::endl; // Bitwise Inclusive OR (either or both) // binary: 1010 1111 z = x | y; std::cout << "0xAA | 0xA5 = " << std::hex << z << std::endl; // Bitwise Exclusive OR (either but not both) // binary: 0000 1111 z = x ^ y; std::cout << "0xAA ^ 0xA5 = " << std::hex << z << std::endl; return 0; }