C Bits and a tiny machine Lesson 2 of 5

Bit shifts and masks in C

25 min, 4 exercisesCode

A whole colour has to fit into a single number.

The rest of this lesson is locked.

4 exercises, checked as you type.

Sign in

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