I am trying to use bitwise operators to fill a unsigned char with data. the data i want to put in is the binary number 0 0 0 1 0 1 1 1

However the data comes in backwards so when reading the data i get 1 1 1 0 1 0 0 0

i currently have a for loop like so

i cant figure out what to put after the equals as the data comes back the wrong way around, also it comes in one at a time, i've tried all sorts, shifts etc. I think i need to use an or, but cant seem to implement it :SCode:unsigned char achar for ( int n = 0; n < 8; n++) { Obtain next Bit; achar = }

cheers for any help in advance