Decoding a 1 Byte Date into Year, Month and Day
<p>I got an int Date in 16 bits. The first seven bits (from left to right) are used to describe the Year, the next 4 are used for the Month, the remaining 5 are for the Day. I need to separate the respective 7, 4 and 5 bits from the original 16 bits (Year is 1111111000000000; Month is 0000000111100000; Day is 0000000000011111).</p>