- October 28, 2015
- Posted by: Syed Shujaat
- Category: Uncategorized

In binary arithmetic, each bit within a group represents a power of two. Specifically, the first bit in a group represents 2^{0} [Editor’s note for non-math majors: mathematicians stipulate that any number raised to the power of zero equals 1], the second bit represents 2^{1}, the third bit represents 2^{2}, and so on. It’s easy to understand binary because each successive bit in a group is exactly **twice** the value of the previous bit.

The following table represents the value for each bit in a byte (remember, a byte is 8 bits). In binary math, the values for the bits ascend from right to left, just as in the decimal system you’re accustomed to:

8^{th} bit |
7^{th} bit |
6^{th} bit |
5^{th} bit |
4^{th} bit |
3^{rd} bit |
2^{nd} bit |
1^{st} bit |

128 (2^{7}) |
64 (2^{6}) |
32 (2^{5}) |
16 (2^{4}) |
8 (2^{3}) |
4 (2^{2}) |
2 (2^{1}) |
1 (2^{0}) |

Now that we know how to calculate the value for each bit in a byte, creating large numbers in binary is simply a matter of turning on certain bits and then adding together the values of those bits. So what does an 8-bit binary number like 01101110 represent? The following table dissects this number. Remember, a computer uses 1 to signify “on” and 0 to signify “off”:

128 (2^{7}) |
64 (2^{6}) |
32 (2^{5}) |
16 (2^{4}) |
8 (2^{3}) |
4 (2^{2}) |
2 (2^{1}) |
1 (2^{0}) |

0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 |

In the table above, you can see that the bits with the values 64, 32, 8, 4 and 2 are all turned on. As mentioned before, calculating the value of a binary number means totaling all the values for the “on” bits. So for the binary value in the table, 01101110, we add together 64+32+8+4+2 to get the number 110. Binary arithmetic is pretty easy once you know what’s going on.

### Leave a Reply

You must be logged in to post a comment.