如何取出一个字节的高4位和低4位

 

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

  

posted @ 2021-12-01 14:33  ksq  阅读(581)  评论(0)    收藏  举报