aspirepigshadow / gittalk

0 stars 0 forks source link

位运算符—输出字符的二进制 | Aspirepig #27

Open aspirepigshadow opened 2 years ago

aspirepigshadow commented 2 years ago

https://aspirepig.cn/2017/03/22/wei-yun-suan-fu-shu-chu-zi-fu-de-er-jin-zhi/

使用移位运算符和位与运算符输出字符的二进制。 使用左移位(<<)可用128(二进制10000000)与字符做与运算,来求得每次最高位是0或1。 或使用右移位(>>)可用1(二进制00000001)与字符作与运算,来求