Skip to content

Instantly share code, notes, and snippets.

@kjk
Created November 7, 2019 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjk/934fcd2806c5a568e9fa59fc9870e9f4 to your computer and use it in GitHub Desktop.
Save kjk/934fcd2806c5a568e9fa59fc9870e9f4 to your computer and use it in GitHub Desktop.
// :glot
#include <iostream>
#include <string>
int main(int argc, char **argv) {
int a = 5; // 0101b (0x05)
int b = 12; // 1100b (0x0C)
int c = a | b; // 1101b (0x0D)
std::cout << "a = " << a << ", b = " << b << ", c = " << c << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment