// 1000 0000 short CHANGE_TAG = 0x80; int i = 0; // 将标志位置1 i |= CHANGE_TAG; // 初始化或者还原标志位0 // i &= ~CHANGE_TAG; // 判断第8位 // if((i & CHANGE_TAG) == CHANGE_TAG){ if((i >> 7 & 0x1) == 1){ System.out.println(1); }else { System.out.println(0); }
位数计算
猜你喜欢
转载自www.cnblogs.com/yyyyfan/p/10402845.html
今日推荐
周排行