I have to convert a binary number like for example unsigned int bin_number = 10101010 into its decimal representation (i.e. 170) as quickly as possible
Actually if you write unsigned int bin_number = 10101010, this is interpreted as a decimal number by the compiler.
If you want to write a binary literal in your source code, you should use BOOST_BINARY. Then, you just need to print it using cout, decimal is the default...
unsigned int i = BOOST_BINARY(10101010);
std::cout << i; // This prints 170