I'm trying to convert an int to a 4 byte unsigned ints. I was reading a post and I'm not sure what comparison does. I know that its a sub mask, but I'm not sure when to use the & and when to use the |. Lets use the number 6 as an example, if the LSB is the number 6. Why would we do
6 & 0xFF// I know that we are comparing it to 11111111
when do we use the OR operator? I'm still not sure how to use the & nor |