Skip to main content

Bit Manipulation

1 lessonAbout 6 minutesAdvanced

This part of the DSA Tutorial runs from Bit Manipulation Basics. There is 1 lesson here, and working through them takes about 6 minutes at a steady pace.

It follows on from Greedy, so finish that first if you have not already — the examples below assume you are comfortable with it.

Each lesson below says what it covers before you open it. Read them in order the first time; afterwards this page works as a index you can jump back into when you need to check one thing.

  1. 1Bit Manipulation BasicsAND, OR, XOR and shifts in JavaScript, the tricks they enable, and the 32-bit limit that catches people out when bit operations meet large numbers.