记录一下 C51 里的位运算
一篇上个世纪的文章《单片机的C语言中位操作用法》[1]
今天看到一个这样的运算,这相当于清了 XICFG。
#define INT1IS1 0x80
#define INT1IS0 0x40
#define INT0IS1 0x20
#define INT0IS0 0x10
#define X2FLT 0x04
#define X1FLT 0x02
#define X0FLT 0x01
XICFG&=!(INT1IS1+INT1IS0+X1FLT);
但有一个疑问 !(INT1IS1+INT1IS0+X1FLT)
应该永远 为 0x00 呀。
单片机的C语言中位操作用法 http://www.fxdzw.com/dpj/dpj_w.asp ↩︎