Stage 3 · Lesson 1 of 9
Binary, bits and bytes
Computers store everything as , ones and zeros. Bits are grouped into bytes of 8 bits, so a byte has 256 possible values, 0 to 255. Binary is counting in base 2, where each place is worth double the one to its right.
So 1011 is 8 + 0 + 2 + 1 = 11. Hexadecimal, or base 16, is a shorthand for binary, because each hex digit is exactly 4 bits. That is why colours look like #FF8800 and look like 0x7ffe.
Learn to convert small numbers between decimal, binary and hex by hand. The point is not arithmetic for its own sake. The same bits can mean a number, a letter or a pixel, depending on how a program reads them, and that idea runs through the rest of this stage.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- CourseFreeCS50: Introduction to Computer Science
Harvard University · Beginner
Weeks 0, 1, 2 and 4 teach C, arrays and memory; the difficulty is the point
- VideoFreeCrash Course Computer Science
CrashCourse · Beginner
Short free videos from logic gates to operating systems; episodes 1 to 20
Keep handy
Also worth your time
- What Happens WhenGo deeper
Everything from a key press to a rendered page; read it after this stage