Do I use >> to sign extend in c++?

后端 未结 0 1583
别跟我提以往
别跟我提以往 2021-02-18 14:08

If I wanted to sign extend a char containing 6 bits to 16 bits

char bits = 0x3F;

Do I do a left shift to shift by 8 bits ?

I am sorry I am not very good wit

相关标签:
回答
  • 消灭零回复
提交回复
热议问题