Insert a bit in an 8-bit integer

前端 未结 0 724
迷失自我
迷失自我 2021-01-17 06:08

I have a 5-bit u8, let\'s say 0b10101. I want to insert three bits, all ones, into positions 1, 2, and 4, to get: ii1i0101, i.e.,

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