#include <iostream>
#include <climits>
#include <cstddef>

#include <cstdint>

template <typename T>
void to_binary(T x)
{
    const unsigned char* byte = reinterpret_cast<const unsigned char*>(&x + 1);

    for (std::size_t i = sizeof(x); i > 0; --i)
    {
        --byte;
        for (std::size_t j = CHAR_BIT; j > 0; --j)
            std::cout << ( (*byte >> (j - 1)) & 1u );
        std::cout << ' ';
    }
    std::cout << std::endl;
}

int main() 
{
	volatile std::int_least32_t x = 255L * 256 * 256 + (128L + 1L) * 256 + 2 + 4 + 8;
	
	to_binary(x);
	
	return 0;
}