kmagas wrote in message news:<50650000000500000097A20100-1079395200000@exchange.ni.com>...
> OK this jogs my memory. AND the bit with 1 to get the value of the
> bit, 1 & 1=1, 1 & 0=0.
>
> But when I put this into CVI
>
> bit3 = 15 & 0x04;
>
> after the line is run, bit3 is 4. I need to have a 1 or 0 answer
> corresponding to whether the bit I want to check is a 0 or a 1.
I suggest you to search comp.lang.c newsgroup, where I found the following function:
//-------------------------------
int TestBit ( int Value, int Bit )
{
return ( Value & ( 1 << Bit ) );
}
//-------------------------------
Elio