Number base converter calculator

Convert between binary, octal, decimal and hexadecimal, with the working. Enter your values and see the formula, your numbers plugged in and every step of the working. Free, no sign-up, SI and imperial units.

Formula

value = Σ dᵢ × baseⁱ

Inputs

  • Number (x)
  • Base of the number (base)

Worked example: 255 in decimal

  • Number x = 255
  • Base of the number base = Decimal (10)
  1. To binary by repeated division (read remainders bottom-up): 255 ÷ 2 = 127 remainder 1 127 ÷ 2 = 63 remainder 1 63 ÷ 2 = 31 remainder 1 31 ÷ 2 = 15 remainder 1 15 ÷ 2 = 7 remainder 1 7 ÷ 2 = 3 remainder 1 3 ÷ 2 = 1 remainder 1 1 ÷ 2 = 0 remainder 1
  2. To hexadecimal: group the binary digits in fours from the right → FF

Answer: Decimal: 255; Binary: 11111111; Hexadecimal: FF; Octal: 377; Bits needed (unsigned) bits = 8

More software engineering calculators

Software Engineering formula sheet · All calculators · Practice problems