   Bitmasking?
  I am currently working on a project in which I need to use bitmasking. I am not entirely sure how I would do this. This is the idea:Over a 96 byte long string I need to store dates. The entire string is 100 bytes long and is built like this:2004DATE  So, byte 4 to 99 represent the dates. Each byte represents 4 dates, as where the first 2 bits of byte 4 represent januari 1st. The values the bits can have are:0x00 - None0x01 - Excluded0x02 - Included0x03 - Reserved for future useMy question is, what is the best way of setting the bits? By taking the value of that date and bitshift it to the left? Or is there a faster way of doing it?Toolmaker   -Earth is 98% full. Please delete anybody you can. 