How it is calculated
Any base to decimal: multiply each digit by the base raised to its position: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11.
Decimal to another base: divide repeatedly by the base and read the remainders bottom to top.
Digits above 9 use letters: A = 10, B = 11 … F = 15 in hexadecimal.
Worked example
Decimal 255 = 11111111 in binary = 377 in octal = FF in hex.
Frequently asked questions
Why do computers use binary?
Electronic circuits work with two states: on and off (1 and 0).
Where is hex used?
Web colours (#FF5733), memory addresses and representing bytes.
Does it handle big numbers?
Yes, arbitrarily large integers with full precision.