| 2โฟ | Decimal | Hex |
|---|
= 8 + 0 + 2 + 1
= 11
MSB has weight โ2โฟโปยน instead of +2โฟโปยน
Convert binary numbers to decimal, hex, octal, and more โ with interactive bit-toggle input, live positional breakdown, signed integer support, and batch mode.
| 2โฟ | Decimal | Hex |
|---|
Binary uses base-2 positional notation. Each bit position represents a successive power of 2, starting from 2โฐ = 1 on the right. To convert to decimal, multiply each bit (0 or 1) by its positional value and sum the results.
Two's complement is the standard way computers represent negative numbers. The most significant bit (MSB) has a negative weight (โ2โฟโปยน). For example, 11111111 in 8-bit two's complement = โ128 + 64+โฆ+1 = โ1 rather than 255.
Every group of 4 binary digits maps directly to a single hex digit (0โF). This makes hex a convenient shorthand for binary: 0000=0, 0001=1, โฆ 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F.
An n-bit unsigned integer can hold values 0 to 2โฟโ1. An n-bit signed (two's complement) integer holds โ2โฟโปยน to 2โฟโปยนโ1. Common sizes: 8-bit (0โ255 / โ128 to 127), 16-bit (0โ65535 / โ32768 to 32767), 32-bit, 64-bit.