Multiply each bit by its weight, which is a power of 2 counted from the right starting at 2 to the power of 0, and add the results. For example, binary 1011 is 1x8 + 0x4 + 1x2 + 1x1 = 11. A quick check: 11111111 is always 255, because it is eight set bits, 2^8 - 1. To see the weight table laid out, use the Step by step tab.