Skip to content

Instantly share code, notes, and snippets.

@fstamour
Created May 1, 2014 19:25
Show Gist options
  • Save fstamour/bc59fc54567452bc5783 to your computer and use it in GitHub Desktop.
Save fstamour/bc59fc54567452bc5783 to your computer and use it in GitHub Desktop.
C++ printing binary representation
#include <bitset>
char a = 'b';
std::bitset<8> x{a};
std::cout << x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment