> #define testbit(data,bitno) ((data>>bitno)&0x01) If you change this to: #define testbit(data,bitno) (data&(1<