Skip to content

Binary to denary

Binary to denary

Convert a binary number, written as a string, to denary (base 10).

Read the bits from left to right. Each new bit doubles the value so far and then adds itself: for "101" the value goes 1, then 1 * 2 + 0 = 2, then 2 * 2 + 1 = 5. int("1") turns the character into the number 1.

Log in or create account

IGCSE, A-Level & AP