Zum Inhalt springenSkip to content
Number Encodings

B-adic / Horner method

Converts numbers between bases (binary, octal, decimal, hex) using the Horner method.

Configure your inputs and press Compute to see the step-by-step computation.

How it works

The Horner method efficiently computes the B-adic representation of a decimal number: repeated integer division by B produces, bottom up, the digits. Example: 185 div 8 = 23 r 1, 23 div 8 = 2 r 7, 2 div 8 = 0 r 2, so 185 = (271)8. Decoding sums digits times powers of B.

When to use

Useful in low-level programming (hex for addresses, bitmasks, colour codes) and when reading memory or machine code.