Skip to main content

Number Systems

Before diving into Bitcoin private keys, it’s important to understand how different number systems work.

note

If you’re already familiar with binary, decimal, and hexadecimal, feel free to skip ahead.

Decimal (Base 10):

  • Each digit has 10 possible values (0-9).
  • For example, in the number 4.25, the first digit is 4, the second is 2, and the third is 5.
  • We count: 0, 1, 2, ..., 9. When we reach 9, we add a new digit to the left and reset the rightmost digit to 0 (e.g., 10).

Binary (Base 2):

  • Each digit has only 2 possible values (0 or 1).
  • Counting in binary looks like this: 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, etc.
  • It may seem like a big jump, but that’s because we’re used to decimal counting.

Hexadecimal (Base 16):

  • Each digit has 16 possible values (0-9 and a-f, where a=10, b=11, ..., f=15).
  • Just like playing cards where the Jack, Queen, and King represent specific numbers, letters can be used to represent numbers in hex.
  • Hex numbers are more compact. For example, the decimal number 2047 is 11111111111 in binary (11 digits) but just 7FF in hex.
DecimalBinaryHEX
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010a
111011b
121100c
131101d
141110e
151111f