1011 0110₂ → decimal — number base conversion

intropositional expansion

Answer

182

Why this example is worth doing

The reverse direction, and the one where the working matters most: each 1 contributes its place value, and the sum of the contributing powers is the answer. The tool lays out all eight positions with their weights, including the zeros, because a student who only writes the contributing terms loses track of which column they are in. This byte reappears throughout the site as the running example for masking, complementing and hex conversion.

Try your own input in the Binary ⇄ decimal ⇄ hex ⇄ octal. Convert between any two bases, integers and fractions, with the positional working.

How the answer is reached

Base 2 to base 10

Convert 10110110 from base 2 to base 10. The sign is carried across unchanged; only the magnitude is converted.

Positional expansion of the input — Base 2 to base 10
digitvalueweightweight (base 10)digit x weight
112^7128128
002^6640
112^53232
112^41616
002^380
112^244
112^122
002^010
total182

Integer part: divide by 10 and read the remainders bottom to top.

Read the last column bottom to top. ↑ — Base 2 to base 10
ndivide byquotientremainder
182182 ÷ 10182
1818 ÷ 1018
11 ÷ 1001

10110110 (base 2)182 (base 10)

Compare with

Open this example in the Binary ⇄ decimal ⇄ hex ⇄ octal

The field arrives filled in with this example’s input.

Note:

Notation this page assumes

  • Bit strings are written most significant bit first, and bit 0 is the least significant bit.
  • A width is stated explicitly wherever it changes the answer; nothing is silently sign-extended or truncated.
  • Fractions are converted digit by digit and shown to a stated number of places rather than rounded silently.

Sources

  • Knuth, The Art of Computer Programming, Vol. 2, §4.1 “Positional Number Systems” (1997)
  • IEEE 754-2019, Standard for Floating-Point Arithmetic