teach-ict.com logo

THE education site for computer science and ICT

1. Introduction

Most of the time, data is handled in bytes and words. Sometimes, though, applications require manipulating data at the bit level.

There are several types of bit manipulation you are required to know:

  • Bitwise left shift
  • Bitwise right shift signed and unsigned
  • Circular shifts
  • Masking (AND)
  • Setting bits (OR)
  • Toggling bits (XOR)

This section will also describe some of the applications for these manipulations