Search⌘ K
AI Features

The Utility of the Left Shift and Right Shift Operators

Explore how to use left and right shift operators to efficiently manipulate bits in C. Understand how to extract date components from a 2-byte encoded number and apply bitwise operations for practical programming tasks.

Application of the left shift and right shift operators

When we create a file in Windows, the following formula is applied to it:

(Year1980)512+Month32+Day(Year-1980)*512+Month*32+Day ...