Humans count in base 10 because we have ten fingers. Computers count in base 2 because a transistor has two states. Hex is the readable middle ground between them.
Every number system answers the same question — how many symbols do we have before we run out and add a column? Base 10 gives us ten (0–9). Base 2 gives us two (0 and 1). Base 16 gives us sixteen (0–9 and A–F). Nothing about a number changes when you switch base; only the way you write it down changes. 255, 11111111 and FF are the same quantity wearing three different costumes.
A transistor is either conducting or it is not. Two states, so two symbols. Everything else — text, images, video, this sentence — is stacked on that single binary distinction. One binary digit is a bit; eight bits make a byte, which can represent 256 distinct values (0–255). That 256 is the reason so many limits in computing are 255, 65535 or 4294967295: they are the largest values that fit in 1, 2 and 4 bytes.
Each column is a power of two, doubling from right to left: 1, 2, 4, 8, 16, 32, 64, 128. To convert binary to decimal, add the place values where there is a 1.
Going the other way, repeatedly divide by 2 and read the remainders bottom-up: 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 → 1101.
Binary is correct but unreadable — nobody wants to transcribe 11010110 from a debugger. Hex fixes that because 16 is 2⁴, so exactly one hex digit represents exactly four bits. A byte is always two hex digits, with no arithmetic needed to split it.
Binary → hex: group the bits into fours from the right, pad the left group with zeros, convert each group. 11010110 → 1101 0110 → D6.
Hex → binary: expand each hex digit into its four bits. 2F → 0010 1111 → 00101111.
Hex → decimal: multiply by powers of 16. 2F = (2 × 16) + 15 = 47. FF = (15 × 16) + 15 = 255.
Decimal → hex: divide by 16 and read remainders bottom-up. 200 ÷ 16 = 12 r8, 12 ÷ 16 = 0 r12 (C) → C8.
Octal (base 8) groups bits in threes and survives mainly in Unix permissions. Base 64 is not really arithmetic at all — it encodes arbitrary binary as 64 printable ASCII characters so it can travel through text-only channels like email or a data URL, turning every 3 bytes into 4 characters and inflating size by about a third.
Why not just use octal everywhere? Octal groups bits in threes, which does not divide evenly into an 8-bit byte. Hex does, so a byte is always exactly two hex digits.
What is the largest number in one byte? 255 unsigned (11111111), or −128 to 127 if the byte is signed using two's complement.
How do negative numbers work in binary? Two's complement: invert every bit and add one. It lets the same addition circuitry handle positive and negative values.
Is hex case-sensitive? No. FF and ff are identical; lowercase is the common convention in CSS, uppercase in memory dumps.
Do I need this if I am not a programmer? For colour codes, file sizes and network settings, a working grasp of hex and binary saves real time.
Convert a few values by hand, then check yourself with the scientific calculator linked above — doing both is how the pattern sticks.