Look at the switchboard beside the door of any flat in Dhaka: one switch for the fan, two for the lights, one for the geyser. Now imagine a board with eight switches in a row, each of them either up or down. How many different settings can it show? The first switch has two choices, and for each of those the second has two, and so on down the row: 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 = 256. That is already enough to give every student of a big college a setting of their own.
Now picture a board with tens of billions of switches. That is, roughly speaking, the memory of your phone. Every photo on it, every bKash balance, every Bangla letter you have ever typed is nothing but a pattern of switches, each one up or down.
A pattern of switches means nothing until we agree on how to read it. Is 10110011 a number? A letter? A colour? And a pattern of two hundred switches is far too long to write on a blackboard, so we also need a short way to write it down.
This chapter is about those agreements. The first is the number system: the rule that turns a row of 0s and 1s into the number it stands for, and back again. The second is a pair of shorthands, octal and hexadecimal, which pack the bits into small groups so that people can read them. The third is the code: another agreement that reads a pattern in a way that suits a job, such as showing digits on a meter, reading the position of a rotating shaft, or noticing a bit damaged on a noisy line.
It is also one of the most repeated calculation topics in the ICT and Digital Logic papers. "Convert (2023)₁₀ to hexadecimal" and its cousins come back in bank, BCS and engineering papers year after year, and each one is a mechanical procedure you can do without fail once you have seen why it works.