#include <iostream>
using namespace std;


template <std::size_t N>
constexpr char bin_string[] = {'0', 'b',
((N >> 7) & 1) ? '1' : '0',
((N >> 6) & 1) ? '1' : '0',
((N >> 5) & 1) ? '1' : '0',
((N >> 4) & 1) ? '1' : '0',
((N >> 3) & 1) ? '1' : '0',
((N >> 2) & 1) ? '1' : '0',
((N >> 1) & 1) ? '1' : '0',
((N >> 0) & 1) ? '1' : '0',
'\0'
}; 

template <std::size_t N>
constexpr char hex_string[] = {'0', 'x',
    "0123456789ABCDEF"[(N >> 8u) & 0x0F],
    "0123456789ABCDEF"[(N >> 0u) & 0x0F],
    '\0'
}; 



int main() {
	std::cout << bin_string<(0x1 << 2)> << std::endl;
	std::cout << hex_string<(0x1 << 2)> << std::endl;
}