Free tool
Binary to decimal converter
To convert binary to decimal, add the place values (1, 2, 4, 8, 16…) of every bit that is 1: 1011 = 8 + 2 + 1 = 11. Paste any binary number below to get the decimal value, the working bit by bit, and its signed reading.
Free · no sign-up · runs in your browser, nothing is uploaded
182
3 digits
Binary (2)
1011 0110
Octal (8)
266
Decimal (10)
182
Hex (16)
B6
- 8-bit pattern
- 1011 0110
- hex
- 0xB6
- as unsigned
- 182
- as signed
- -74
The top bit is set, so a signed 8-bit type reads these bits as -74.
Click a bit to flip it. The numbers under each byte are bit positions (0 is the lowest bit).
Multiply each digit by its place value (2 to the power of its position, counting from 0 at the right of the point), then add them up.
| digit | value | place | digit × place |
|---|---|---|---|
| 1 | 1 | 2^7 = 128 | 128 |
| 0 | 0 | 2^6 = 64 | 0 |
| 1 | 1 | 2^5 = 32 | 32 |
| 1 | 1 | 2^4 = 16 | 16 |
| 0 | 0 | 2^3 = 8 | 0 |
| 1 | 1 | 2^2 = 4 | 4 |
| 1 | 1 | 2^1 = 2 | 2 |
| 0 | 0 | 2^0 = 1 | 0 |
128 + 0 + 32 + 16 + 0 + 4 + 2 + 0 = 182
Result: 182 (decimal)
Method 1: add up the place values
Write the place values over the bits, starting with 1 on the right and doubling to the left. Then add the place values that sit over a 1.
| Place | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| Bit | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 |
| Adds | 128 | 32 | 16 | 4 | 2 |
128 + 32 + 16 + 4 + 2 = 182, so 10110110 is 182. Spaces between groups of four (1011 0110) only help reading; the converter ignores them, along with _ and a 0b prefix.
Method 2: double and add, left to right
Faster in your head for long numbers: start at 0, and for each bit from the left, double the running total and add the bit. You never need to know the place values.
bits: 1 0 1 1 0 1 1 0
total: 0×2+1 = 1
1×2+0 = 2
2×2+1 = 5
5×2+1 = 11
11×2+0 = 22
22×2+1 = 45
45×2+1 = 91
91×2+0 = 182This is also how parsers read numbers in any base: multiply the total by the base, add the next digit.
Signed binary: when the top bit is negative
Computers store signed integers in two’s complement. In an N-bit value the top bit is worth -2^(N-1) instead of +2^(N-1); every other bit keeps its usual value. In 8 bits the top place is -128:
| Bits | Unsigned | Signed 8-bit |
|---|---|---|
| 0111 1111 | 127 | 127 |
| 1000 0000 | 128 | -128 |
| 1000 0001 | 129 | -127 |
| 1111 1011 | 251 | -5 |
| 1111 1111 | 255 | -1 |
Shortcut: if the top bit is 1, the signed value is the unsigned value minus 2^N. 251 - 256 = -5. The converter shows both readings for 8, 16, 32, 64 and 128 bits.
Binary fractions
Bits after the point are worth ½, ¼, ⅛ and so on. 101.101 is 4 + 1 + ½ + ⅛ = 5.625. Every binary fraction ends in decimal, because each place is a power of ½. The other way round is not true: decimal 0.1 never ends in binary.
Binary to decimal in code
// JavaScript
parseInt('10110110', 2) // 182
0b10110110 // 182 (literal)
BigInt('0b' + bits) // exact for any length
# Python
int('10110110', 2) # 182
int('0b1011_0110', 0) # 182, prefix and underscores allowed
// Go
n, _ := strconv.ParseInt("10110110", 2, 64) // 182
# Bash
echo $((2#10110110)) # 182Going the other way? Use decimal to binary. For hex, use hex to decimal, and for bits that encode text, the binary to text translator.
Binary to decimal table, 0 to 255
Every 8-bit value with its unsigned and signed (two’s complement) decimal value.
| binary | dec | signed |
|---|---|---|
| 00000000 | 0 | 0 |
| 00000001 | 1 | 1 |
| 00000010 | 2 | 2 |
| 00000011 | 3 | 3 |
| 00000100 | 4 | 4 |
| 00000101 | 5 | 5 |
| 00000110 | 6 | 6 |
| 00000111 | 7 | 7 |
| 00001000 | 8 | 8 |
| 00001001 | 9 | 9 |
| 00001010 | 10 | 10 |
| 00001011 | 11 | 11 |
| 00001100 | 12 | 12 |
| 00001101 | 13 | 13 |
| 00001110 | 14 | 14 |
| 00001111 | 15 | 15 |
| 00010000 | 16 | 16 |
| 00010001 | 17 | 17 |
| 00010010 | 18 | 18 |
| 00010011 | 19 | 19 |
| 00010100 | 20 | 20 |
| 00010101 | 21 | 21 |
| 00010110 | 22 | 22 |
| 00010111 | 23 | 23 |
| 00011000 | 24 | 24 |
| 00011001 | 25 | 25 |
| 00011010 | 26 | 26 |
| 00011011 | 27 | 27 |
| 00011100 | 28 | 28 |
| 00011101 | 29 | 29 |
| 00011110 | 30 | 30 |
| 00011111 | 31 | 31 |
| 00100000 | 32 | 32 |
| 00100001 | 33 | 33 |
| 00100010 | 34 | 34 |
| 00100011 | 35 | 35 |
| 00100100 | 36 | 36 |
| 00100101 | 37 | 37 |
| 00100110 | 38 | 38 |
| 00100111 | 39 | 39 |
| 00101000 | 40 | 40 |
| 00101001 | 41 | 41 |
| 00101010 | 42 | 42 |
| 00101011 | 43 | 43 |
| 00101100 | 44 | 44 |
| 00101101 | 45 | 45 |
| 00101110 | 46 | 46 |
| 00101111 | 47 | 47 |
| 00110000 | 48 | 48 |
| 00110001 | 49 | 49 |
| 00110010 | 50 | 50 |
| 00110011 | 51 | 51 |
| 00110100 | 52 | 52 |
| 00110101 | 53 | 53 |
| 00110110 | 54 | 54 |
| 00110111 | 55 | 55 |
| 00111000 | 56 | 56 |
| 00111001 | 57 | 57 |
| 00111010 | 58 | 58 |
| 00111011 | 59 | 59 |
| 00111100 | 60 | 60 |
| 00111101 | 61 | 61 |
| 00111110 | 62 | 62 |
| 00111111 | 63 | 63 |
| binary | dec | signed |
|---|---|---|
| 01000000 | 64 | 64 |
| 01000001 | 65 | 65 |
| 01000010 | 66 | 66 |
| 01000011 | 67 | 67 |
| 01000100 | 68 | 68 |
| 01000101 | 69 | 69 |
| 01000110 | 70 | 70 |
| 01000111 | 71 | 71 |
| 01001000 | 72 | 72 |
| 01001001 | 73 | 73 |
| 01001010 | 74 | 74 |
| 01001011 | 75 | 75 |
| 01001100 | 76 | 76 |
| 01001101 | 77 | 77 |
| 01001110 | 78 | 78 |
| 01001111 | 79 | 79 |
| 01010000 | 80 | 80 |
| 01010001 | 81 | 81 |
| 01010010 | 82 | 82 |
| 01010011 | 83 | 83 |
| 01010100 | 84 | 84 |
| 01010101 | 85 | 85 |
| 01010110 | 86 | 86 |
| 01010111 | 87 | 87 |
| 01011000 | 88 | 88 |
| 01011001 | 89 | 89 |
| 01011010 | 90 | 90 |
| 01011011 | 91 | 91 |
| 01011100 | 92 | 92 |
| 01011101 | 93 | 93 |
| 01011110 | 94 | 94 |
| 01011111 | 95 | 95 |
| 01100000 | 96 | 96 |
| 01100001 | 97 | 97 |
| 01100010 | 98 | 98 |
| 01100011 | 99 | 99 |
| 01100100 | 100 | 100 |
| 01100101 | 101 | 101 |
| 01100110 | 102 | 102 |
| 01100111 | 103 | 103 |
| 01101000 | 104 | 104 |
| 01101001 | 105 | 105 |
| 01101010 | 106 | 106 |
| 01101011 | 107 | 107 |
| 01101100 | 108 | 108 |
| 01101101 | 109 | 109 |
| 01101110 | 110 | 110 |
| 01101111 | 111 | 111 |
| 01110000 | 112 | 112 |
| 01110001 | 113 | 113 |
| 01110010 | 114 | 114 |
| 01110011 | 115 | 115 |
| 01110100 | 116 | 116 |
| 01110101 | 117 | 117 |
| 01110110 | 118 | 118 |
| 01110111 | 119 | 119 |
| 01111000 | 120 | 120 |
| 01111001 | 121 | 121 |
| 01111010 | 122 | 122 |
| 01111011 | 123 | 123 |
| 01111100 | 124 | 124 |
| 01111101 | 125 | 125 |
| 01111110 | 126 | 126 |
| 01111111 | 127 | 127 |
| binary | dec | signed |
|---|---|---|
| 10000000 | 128 | -128 |
| 10000001 | 129 | -127 |
| 10000010 | 130 | -126 |
| 10000011 | 131 | -125 |
| 10000100 | 132 | -124 |
| 10000101 | 133 | -123 |
| 10000110 | 134 | -122 |
| 10000111 | 135 | -121 |
| 10001000 | 136 | -120 |
| 10001001 | 137 | -119 |
| 10001010 | 138 | -118 |
| 10001011 | 139 | -117 |
| 10001100 | 140 | -116 |
| 10001101 | 141 | -115 |
| 10001110 | 142 | -114 |
| 10001111 | 143 | -113 |
| 10010000 | 144 | -112 |
| 10010001 | 145 | -111 |
| 10010010 | 146 | -110 |
| 10010011 | 147 | -109 |
| 10010100 | 148 | -108 |
| 10010101 | 149 | -107 |
| 10010110 | 150 | -106 |
| 10010111 | 151 | -105 |
| 10011000 | 152 | -104 |
| 10011001 | 153 | -103 |
| 10011010 | 154 | -102 |
| 10011011 | 155 | -101 |
| 10011100 | 156 | -100 |
| 10011101 | 157 | -99 |
| 10011110 | 158 | -98 |
| 10011111 | 159 | -97 |
| 10100000 | 160 | -96 |
| 10100001 | 161 | -95 |
| 10100010 | 162 | -94 |
| 10100011 | 163 | -93 |
| 10100100 | 164 | -92 |
| 10100101 | 165 | -91 |
| 10100110 | 166 | -90 |
| 10100111 | 167 | -89 |
| 10101000 | 168 | -88 |
| 10101001 | 169 | -87 |
| 10101010 | 170 | -86 |
| 10101011 | 171 | -85 |
| 10101100 | 172 | -84 |
| 10101101 | 173 | -83 |
| 10101110 | 174 | -82 |
| 10101111 | 175 | -81 |
| 10110000 | 176 | -80 |
| 10110001 | 177 | -79 |
| 10110010 | 178 | -78 |
| 10110011 | 179 | -77 |
| 10110100 | 180 | -76 |
| 10110101 | 181 | -75 |
| 10110110 | 182 | -74 |
| 10110111 | 183 | -73 |
| 10111000 | 184 | -72 |
| 10111001 | 185 | -71 |
| 10111010 | 186 | -70 |
| 10111011 | 187 | -69 |
| 10111100 | 188 | -68 |
| 10111101 | 189 | -67 |
| 10111110 | 190 | -66 |
| 10111111 | 191 | -65 |
| binary | dec | signed |
|---|---|---|
| 11000000 | 192 | -64 |
| 11000001 | 193 | -63 |
| 11000010 | 194 | -62 |
| 11000011 | 195 | -61 |
| 11000100 | 196 | -60 |
| 11000101 | 197 | -59 |
| 11000110 | 198 | -58 |
| 11000111 | 199 | -57 |
| 11001000 | 200 | -56 |
| 11001001 | 201 | -55 |
| 11001010 | 202 | -54 |
| 11001011 | 203 | -53 |
| 11001100 | 204 | -52 |
| 11001101 | 205 | -51 |
| 11001110 | 206 | -50 |
| 11001111 | 207 | -49 |
| 11010000 | 208 | -48 |
| 11010001 | 209 | -47 |
| 11010010 | 210 | -46 |
| 11010011 | 211 | -45 |
| 11010100 | 212 | -44 |
| 11010101 | 213 | -43 |
| 11010110 | 214 | -42 |
| 11010111 | 215 | -41 |
| 11011000 | 216 | -40 |
| 11011001 | 217 | -39 |
| 11011010 | 218 | -38 |
| 11011011 | 219 | -37 |
| 11011100 | 220 | -36 |
| 11011101 | 221 | -35 |
| 11011110 | 222 | -34 |
| 11011111 | 223 | -33 |
| 11100000 | 224 | -32 |
| 11100001 | 225 | -31 |
| 11100010 | 226 | -30 |
| 11100011 | 227 | -29 |
| 11100100 | 228 | -28 |
| 11100101 | 229 | -27 |
| 11100110 | 230 | -26 |
| 11100111 | 231 | -25 |
| 11101000 | 232 | -24 |
| 11101001 | 233 | -23 |
| 11101010 | 234 | -22 |
| 11101011 | 235 | -21 |
| 11101100 | 236 | -20 |
| 11101101 | 237 | -19 |
| 11101110 | 238 | -18 |
| 11101111 | 239 | -17 |
| 11110000 | 240 | -16 |
| 11110001 | 241 | -15 |
| 11110010 | 242 | -14 |
| 11110011 | 243 | -13 |
| 11110100 | 244 | -12 |
| 11110101 | 245 | -11 |
| 11110110 | 246 | -10 |
| 11110111 | 247 | -9 |
| 11111000 | 248 | -8 |
| 11111001 | 249 | -7 |
| 11111010 | 250 | -6 |
| 11111011 | 251 | -5 |
| 11111100 | 252 | -4 |
| 11111101 | 253 | -3 |
| 11111110 | 254 | -2 |
| 11111111 | 255 | -1 |
More free developer tools
FAQ
What is 1010 in decimal?+
10. The bits are worth 8, 4, 2 and 1 from left to right, and the 1 bits are 8 and 2, so 8 + 2 = 10.
What is 11111111 in decimal?+
255 as an unsigned number (128 + 64 + 32 + 16 + 8 + 4 + 2 + 1), the largest value of a byte. As a signed 8-bit number in two’s complement it is -1.
What is 1010111 in decimal?+
87: 64 + 16 + 4 + 2 + 1. As an ASCII code, 87 is the capital letter W. To read longer binary as letters, use the binary to text side of the text to binary translator.
How do you read a binary number?+
From the right, the places are worth 1, 2, 4, 8, 16, 32, 64, 128 and so on, doubling each time. Add the place values where there is a 1 and skip the places with a 0. That sum is the decimal number.
What is the largest number in 8, 16, 32 or 64 bits?+
Unsigned: 255, 65,535, 4,294,967,295 and 18,446,744,073,709,551,615 (2 to the power of the width, minus 1). Signed: 127, 32,767, 2,147,483,647 and 9,223,372,036,854,775,807, because one bit is used for the sign.
How do I convert a negative binary number to decimal?+
If it has a minus sign, convert the digits and keep the sign. If it is a fixed-width two’s complement value with the top bit set, the top bit counts as negative: 11111011 in 8 bits is -128 + 64 + 32 + 16 + 8 + 2 + 1 = -5. The converter shows this as the signed reading.
Sources: MDN: parseInt() · MDN: Numeric literals (0b) · MDN: Bitwise operators (two’s complement) · Python: int() · Go: strconv.ParseInt. Checked 2026-10-30.