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/a7836d2231586fe31aecc65ed7964a70 to your computer and use it in GitHub Desktop.
Save kjk/a7836d2231586fe31aecc65ed7964a70 to your computer and use it in GitHub Desktop.
// :glot
#include <iostream>
int main(int argc, char **argv) {
int a = 6; // 0110b (0x06)
int b = 10; // 1010b (0x0A)
int c = a & b; // 0010b (0x02)
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