#include <iostream>
#include <iomanip>

int main() {
	signed char arr[2] = {0, - 64};
    unsigned int value;

    value = arr[0];
    value = value << 8;
    value += arr[1];
    std::cout << std::hex << std::setw(8) << std::setfill('0') << value << " = " << std::dec << value << std::endl;

    value = (unsigned int) arr[0];
    value = value << 8;
    value += (unsigned int) arr[1];
   std::cout << std::hex << std::setw(8) << std::setfill('0') << value << " = " << std::dec << value << std::endl;

    value = (unsigned char) arr[0];
    value = value << 8;
    value += (unsigned char) arr[1];
    std::cout << std::hex << std::setw(8) << std::setfill('0') << value << " = "  << std::dec << value << std::endl;

	return 0;
}