Hi, I have to retrieve first bit from 1 byte. For this i stored whole 1 byte in unsigned char Array. Now i retrieved first bit as per below code:
unsigned char byteArray[100];
.....
.....//some code to store 1 byte in byte array
//now 1st bit will be:
int bit=(int) byteArray[0];
I just wanted to confirm that step involved in retrieving 1st bit is right or not? Is there any better way to retrieve single bit from unsigned char array(byte array) in C.