Use Binary to Decimal Converter

Enter your data below to use the Binary to Decimal Converter

📌 Try these examples:
RESULT

Last updated

How Binary Numbers Work

Binary is a base-2 number system that uses only two digits: 0 and 1. Every digital computer stores and processes all data — text, images, audio, code — as sequences of binary digits (bits). Understanding binary-to-decimal conversion is fundamental to computer science, networking, and low-level programming.

In decimal (base 10), each digit position represents a power of 10. In binary (base 2), each position represents a power of 2, starting from 20 = 1 on the right.

Step-by-Step Conversion

To convert binary 1011010 to decimal:

Text
Position:  6    5    4    3    2    1    0
Bit:       1    0    1    1    0    1    0
Power:    2⁶   2⁵   2⁴   2³   2²   2¹   2⁰
Value:    64    0   16    8    0    2    0

Sum: 64 + 16 + 8 + 2 = 90

So binary 1011010 = decimal 90

Common Binary Values Reference

BinaryDecimalHexNotes
0000 000000x00Null byte
0100 0001650x41ASCII 'A'
0110 0001970x61ASCII 'a'
0111 11111270x7FMax 7-bit value / DEL
1000 00001280x80First bit of high byte
1111 11112550xFFMax 8-bit unsigned value
1111 1111 1111 1111655350xFFFFMax 16-bit unsigned value

Binary in Programming

Most languages let you write binary literals directly using a 0b prefix. Bitwise operators work directly on the binary representation:

JavaScript
// Binary literals
const a = 0b1010;  // 10
const b = 0b0110;  // 6

// Bitwise AND — both bits must be 1
console.log(a & b);   // 0b0010 = 2

// Bitwise OR — either bit can be 1
console.log(a | b);   // 0b1110 = 14

// Bitwise XOR — bits must differ
console.log(a ^ b);   // 0b1100 = 12

// Left shift — multiply by 2^n
console.log(1 << 4);  // 16 (1 shifted left 4 positions)

// Right shift — divide by 2^n
console.log(64 >> 2); // 16

// Convert decimal to binary string
(90).toString(2);     // "1011010"

// Convert binary string to decimal
parseInt('1011010', 2); // 90

Two's Complement: Negative Numbers in Binary

Computers represent negative integers using two's complement. To negate a number: flip all bits, then add 1. For example, -5 in 8-bit two's complement:

Text
+5  = 0000 0101
Flip = 1111 1010
Add 1= 1111 1011  ← this is -5 in two's complement

Range of 8-bit signed integer: -128 to +127
Range of 8-bit unsigned integer: 0 to 255

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.