Index

Module 03 · DSAWorked, and deeper

Bit Manipulation (thinking in bits)

Thinking in Bits
Thinking in Bits · Open board

The moves you can make directly on a number’s row of switches: keep what two rows agree on, turn one on, flip every switch, tell which disagree, slide the row along. This lesson is what those moves build: flags packed into one integer, the one item with no partner, every subset of a group, a faster way to count.

Before you start. One fact from Numbers for Real (signed ints, overflow, floating point): a computer stores every whole number as a row of ones and zeros, read like ordinary counting but in twos instead of tens, so 1100 is one eight and one four, twelve. Nothing past that: no calculus, just counting.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review DSA →

Saved in this browser, and to your account when you sign in.