We use the decimal numeral system in our daily life, which is based on 10 numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The binary numeral system, however, is based on 2 numbers: 0 and 1.
In the binary system, each digit represents an increasing power of 2 from 20, 21, 22…. and so on. Please refer to the table below to convert a binary number into the decimal number, or please check here to convert decimal to binary.
Power | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Power of 2 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |
Results | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Example 1: 01001111
01001111 = [ ( 0 ) × 27 ] + [ ( 1 ) × 26 ] + [ ( 0 ) × 25 ] + [ ( 0 ) × 24 ] + [ ( 1 ) × 23 ] + [ ( 1 ) × 22 ] + [ ( 1 ) × 21 ] + [ ( 1 ) × 20 ]
01001111 = 0 + 64 + 0 + 0 + 8 + 4 + 2 + 1 = 79
Example 2: 10010000
10010000 = [ ( 1 ) × 27 ] + [ ( 0 ) × 26 ] + [ ( 0 ) × 25 ] + [ ( 1 ) × 24 ] + [ (0 ) × 23 ] + [ ( 0 ) × 22 ] + [ ( 0 ) × 21 ] + [ ( 0 ) × 20 ]
10010000 = 128 + 0 + 0 + 16 + 0 + 0 + 0 + 0 = 144
The following is the Binary to Decimal Conversion Table from 1 to 255:
Binary | D | Binary | D | Binary | D | Binary | D |
---|---|---|---|---|---|---|---|
00000001 | 1 | 01000001 | 65 | 10000001 | 129 | 11000001 | 193 |
00000010 | 2 | 01000010 | 66 | 10000010 | 130 | 11000010 | 194 |
00000011 | 3 | 01000011 | 67 | 10000011 | 131 | 11000011 | 195 |
00000100 | 4 | 01000100 | 68 | 10000100 | 132 | 11000100 | 196 |
00000101 | 5 | 01000101 | 69 | 10000101 | 133 | 11000101 | 197 |
00000110 | 6 | 01000110 | 70 | 10000110 | 134 | 11000110 | 198 |
00000111 | 7 | 01000111 | 71 | 10000111 | 135 | 11000111 | 199 |
00001000 | 8 | 01001000 | 72 | 10001000 | 136 | 11001000 | 200 |
00001001 | 9 | 01001001 | 73 | 10001001 | 137 | 11001001 | 201 |
00001010 | 10 | 01001010 | 74 | 10001010 | 138 | 11001010 | 202 |
00001011 | 11 | 01001011 | 75 | 10001011 | 139 | 11001011 | 203 |
00001100 | 12 | 01001100 | 76 | 10001100 | 140 | 11001100 | 204 |
00001101 | 13 | 01001101 | 77 | 10001101 | 141 | 11001101 | 205 |
00001110 | 14 | 01001110 | 78 | 10001110 | 142 | 11001110 | 206 |
00001111 | 15 | 01001111 | 79 | 10001111 | 143 | 11001111 | 207 |
00010000 | 16 | 01010000 | 80 | 10010000 | 144 | 11010000 | 208 |
00010001 | 17 | 01010001 | 81 | 10010001 | 145 | 11010001 | 209 |
00010010 | 18 | 01010010 | 82 | 10010010 | 146 | 11010010 | 210 |
00010011 | 19 | 01010011 | 83 | 10010011 | 147 | 11010011 | 211 |
00010100 | 20 | 01010100 | 84 | 10010100 | 148 | 11010100 | 212 |
00010101 | 21 | 01010101 | 85 | 10010101 | 149 | 11010101 | 213 |
00010110 | 22 | 01010110 | 86 | 10010110 | 150 | 11010110 | 214 |
00010111 | 23 | 01010111 | 87 | 10010111 | 151 | 11010111 | 215 |
00011000 | 24 | 01011000 | 88 | 10011000 | 152 | 11011000 | 216 |
00011001 | 25 | 01011001 | 89 | 10011001 | 153 | 11011001 | 217 |
00011010 | 26 | 01011010 | 90 | 10011010 | 154 | 11011010 | 218 |
00011011 | 27 | 01011011 | 91 | 10011011 | 155 | 11011011 | 219 |
00011100 | 28 | 01011100 | 92 | 10011100 | 156 | 11011100 | 220 |
00011101 | 29 | 01011101 | 93 | 10011101 | 157 | 11011101 | 221 |
00011110 | 30 | 01011110 | 94 | 10011110 | 158 | 11011110 | 222 |
00011111 | 31 | 01011111 | 95 | 10011111 | 159 | 11011111 | 223 |
00100000 | 32 | 01100000 | 96 | 10100000 | 160 | 11100000 | 224 |
00100001 | 33 | 01100001 | 97 | 10100001 | 161 | 11100001 | 225 |
00100010 | 34 | 01100010 | 98 | 10100010 | 162 | 11100010 | 226 |
00100011 | 35 | 01100011 | 99 | 10100011 | 163 | 11100011 | 227 |
00100100 | 36 | 01100100 | 100 | 10100100 | 164 | 11100100 | 228 |
00100101 | 37 | 01100101 | 101 | 10100101 | 165 | 11100101 | 229 |
00100110 | 38 | 01100110 | 102 | 10100110 | 166 | 11100110 | 230 |
00100111 | 39 | 01100111 | 103 | 10100111 | 167 | 11100111 | 231 |
00101000 | 40 | 01101000 | 104 | 10101000 | 168 | 11101000 | 232 |
00101001 | 41 | 01101001 | 105 | 10101001 | 169 | 11101001 | 233 |
00101010 | 42 | 01101010 | 106 | 10101010 | 170 | 11101010 | 234 |
00101011 | 43 | 01101011 | 107 | 10101011 | 171 | 11101011 | 235 |
00101100 | 44 | 01101100 | 108 | 10101100 | 172 | 11101100 | 236 |
00101101 | 45 | 01101101 | 109 | 10101101 | 173 | 11101101 | 237 |
00101110 | 46 | 01101110 | 110 | 10101110 | 174 | 11101110 | 238 |
00101111 | 47 | 01101111 | 111 | 10101111 | 175 | 11101111 | 239 |
00110000 | 48 | 01110000 | 112 | 10110000 | 176 | 11110000 | 240 |
00110001 | 49 | 01110001 | 113 | 10110001 | 177 | 11110001 | 241 |
00110010 | 50 | 01110010 | 114 | 10110010 | 178 | 11110010 | 242 |
00110011 | 51 | 01110011 | 115 | 10110011 | 179 | 11110011 | 243 |
00110100 | 52 | 01110100 | 116 | 10110100 | 180 | 11110100 | 244 |
00110101 | 53 | 01110101 | 117 | 10110101 | 181 | 11110101 | 245 |
00110110 | 54 | 01110110 | 118 | 10110110 | 182 | 11110110 | 246 |
00110111 | 55 | 01110111 | 119 | 10110111 | 183 | 11110111 | 247 |
00111000 | 56 | 01111000 | 120 | 10111000 | 184 | 11111000 | 248 |
00111001 | 57 | 01111001 | 121 | 10111001 | 185 | 11111001 | 249 |
00111010 | 58 | 01111010 | 122 | 10111010 | 186 | 11111010 | 250 |
00111011 | 59 | 01111011 | 123 | 10111011 | 187 | 11111011 | 251 |
00111100 | 60 | 01111100 | 124 | 10111100 | 188 | 11111100 | 252 |
00111101 | 61 | 01111101 | 125 | 10111101 | 189 | 11111101 | 253 |
00111110 | 62 | 01111110 | 126 | 10111110 | 190 | 11111110 | 254 |
00111111 | 63 | 01111111 | 127 | 10111111 | 191 | 11111111 | 255 |
01000000 | 64 | 10000000 | 128 | 11000000 | 192 |