is this statment [ if((data>>i) & 0x0001 >0) ] same as [ if((data>i) && 0x0001 >0) ] ?
This is no comparison, it is bit shifting and masking
TTU.ABD:
is this statment [ if((data>>i) & 0x0001 >0) ] same as [ if((data>i) && 0x0001 >0) ] ?
No.
is the Shift Right operator and & is the bitwise AND operator.
It's testing bit 'i' of data, equivalent to:
if (data & (1<<i))
This is no comparison, it is bit shifting and masking
..apart from the "greater than zero".
That's a comparison.
Thanx all