A number base is just how many digits you count with before rolling over. Decimal uses ten, binary uses two, hexadecimal uses sixteen. The quantity being represented never changes — only the notation does.
So 1011 in binary is 1×8 + 0×4 + 1×2 + 1×1 = 11, and FF in hex is 15×16 + 15 = 255.
Why hexadecimal exists
Sixteen is a power of two, so each hex digit maps to exactly four bits with no arithmetic required. A byte is always exactly two hex digits, which makes memory dumps, colour codes and register values far easier to read than the equivalent binary. Octal survives for the same reason in Unix file permissions, where three bits per digit matches the read-write-execute grouping.
Prefixes
Most languages mark the base with a prefix: 0b for binary, 0o for octal, 0x for hex. A leading zero alone means octal in C and several languages derived from it, which is a long-standing source of bugs — 010 is eight, not ten.
Bit width matters in embedded work
An 8-bit register holds 0 to 255 unsigned, or −128 to 127 signed using two’s complement. Writing 256 into it wraps to zero. This calculator shows how many bits a value needs, which is the check to do before choosing a variable type.