C Bits and a tiny machine Lesson 2 of 5

Bit shifts and masks in C

40 min, 4 exercisesCode

A whole colour has to fit into a single number.

You've reached the good stuff.

4 exercises, checked as you type.

  • All 4 courses
  • Projects
  • Bug hunts
  • No ads

See what’s included

Sign in

C, 32-bit: int and pointers are 4 bytes