c++ 取一个字节的低4位和高4位

转载:https://blog.csdn.net/mikasoi/article/details/84311620

1 unsigned char low_four, high_four;
2 high_four = (byte & 0xf0) >> 4;
3 low_four = byte & 0x0f;

 

posted @ 2020-11-10 15:17  _KikyoBK  Views(2516)  Comments(0Edit  收藏  举报