Bit - Binary to Decimal

Cpu Moore Law Transistor

About

Binary number to decimal

See Decimal - Decimal to Binary for the inverse

Type

Calculator

Windows calculator:

  • select the Programmer mode
  • select the BIN format
  • enter the bits
  • copy the DEC value

Windows Calculator

Manual: Binary number with Radix to Decimal

Binary number with Radix to Decimal

1101.101

The binary number 1101.101 has the following digits:

Power of 2 3 2 1 0 −1 −2 −3
Binary digit 1 1 0 1 . 1 0 1

In Decimal, you get:

<math> \begin{array}{llr} 1101.101_2 &= 1 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 + 1 \times 2^{-1} + 0 \times 2^{-2} + 1 \times 2^{-3} \\ &= 1 \times 8 + 1 \times 4 + 0 \times 2 + 1 \times 1 + 1 \times 0.5 + 0 \times 0.25 + 1 \times 0.125 \\ &= 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125 \\ &= 13.625_{10} \end{array} </math>

Python - Mapping generation

Python representation code to generate the mapping between decimal number and binary number (It work also in an other base)

base = 2
digits = set(range(base))
{((base**2)*a + base*b + c):[a,b,c] for a in digits for b in digits for c in digits}

Output:

0: [0, 0, 0]
1: [0, 0, 1]
2: [0, 1, 0]
3: [0, 1, 1]
4: [1, 0, 0]
5: [1, 0, 1]
6: [1, 1, 0]
7: [1, 1, 1]

Documentation / Reference





Discover More
Cpu Moore Law Transistor
Bit - Bit Point (Or Radix Point)

The radix point in base 2 (Binary). See Radix_point
Windows Calculator
Decimal - Decimal to Binary

How to transform a decimal value to a binary. Windows calculator: select the Programmer mode select the DEC format enter the decimal number copy the BIN value Decimal to Binary to...
Javascript - Number (Double)

Most programming languages have several types of numeric data, but JavaScript gets away with just one. All numbers are and are stored as doubles. See also': 32 bit 53 bit - the max of double-precision...



Share this page:
Follow us:
Task Runner