Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- uint8_t byteA{ 0b00001010 };
- uint8_t byteB{ 0b01011011 };
- uint8_t res{ 0b01010001 };
- // 0b00001010
- // 0b01011011
- // 0b01010001
- // a b a ^ b
- // 0 0 0
- // 1 0 1
- // 0 1 1
- // 1 1 0
- byteA = (byteA ^ byteB);
- //byteA = (byteA && byteB);
- //byte = !byte;
- std::cout << ((int)byteA) << '\n';
- std::cout << (byteA == res) << '\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment