CS core subjects

Stage 1 · Lesson 1 of 7

Binary, hexadecimal and integers

How a computer runs a program

Computers store everything as bits: tiny switches that are either 0 or 1. A fixed number of bits can only hold a fixed range of values. Learn to convert numbers by hand between decimal (base 10, the one you count with), (base 2) and hexadecimal (base 16, with digits 0 to 9 and then A to F).

Then learn , the way almost every machine stores negative integers. It explains bugs, where a number runs past its limit and wraps around. That is why an 8-bit value jumps from 127 to -128.

It is also why and colour codes are written in hex. You will read hex again for memory addresses in the stage and for packet dumps in networking.

Common traptreating conversions as an exam trick to memorise; practise until you can reason about bit patterns, not just recite steps.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

Keep handy

  • A topic map of the whole CS curriculum to check your coverage against, stage by stage

  • Short explanations from researchers when one idea, such as floating point, will not click

Also worth your time

Mark this stage as not done?