我正在尝试在 中创建位图数据,这是我使用的代码,但我无法找出正确的逻辑。这是我的代码
bool a=1; bool b=0; bool c=1; bool d=0; uint8_t output = a|b|c|d; printf("outupt = %X", output);
我希望我的输出是“1010”,相当于十六进制“0x0A”。我该怎么做 ??
c c++ embedded bitmap
bitmap ×1
c ×1
c++ ×1
embedded ×1