There is no standard way to encode binary. The two options I know to encode a byte are either to use hexadecimal (prefix with 0x), or to use template meta programming. The template solution is not mine, but is pretty much copied straight out of the book.
also you can use bitset....it looks like this bitset<N> when N type of size_t......you can write bitset<10> b = 25;....and then print b and you'll see binary representation of 25....
I may have misunderstood the question. If you want to write binary numbers in your source file then that's what my first post was about. If you want to do bit manipulations then use std::bitset<> if you know the number of bits a compile time, and boost::dynamic_bitset<> if you don't. You can use the bitwise operators (&, |, ^, ~) with integers, but the classes are just as fast, and have a more friendly interface.