Applications of Bitwise Operators

Study the applications of bitwise operators in this lesson.


Store the status of the toggle and shift keys

The toggle (Caps lock, Num lock, Scroll lock, Insert) and Shift keys (Ctrl, Alt, Shift) can either be on or off. So to store their status, 1 bit in a byte is enough. To read or write individual bits of a toggle or shift key, bitwise operators are used.

Embedded system and device drivers

While building either embedded systems or device drivers, we are often required to work with individual bits of a byte. This is facilitated by bitwise operators. Bitwise operators are used to:

  • Set bits in a CPU register
  • Read/write operations

Get hands-on with 1200+ tech skills courses.