One of the first things we stated learning in class was Logic Gates and Binary Mathematics. I learned the rules of addition subtraction, multiplication and division of binary numbers. In binary, counting follows similar procedure, except that only the two symbols 0 and 1 are used. Thus, after a digit reaches 1 in binary, an increment resets it to 0 but also causes an increment of the next digit to the left:
0000,0001, (rightmost digit starts over, and next digit is incremented)0010, 0011, (rightmost two digits start over, and next digit is incremented)0100, 0101, 0110, 0111, (rightmost three digits start over, and the next digit is incremented)1000, 1001, 1011, 1100, ...Since binary is a base-2 system, each digit represents an increasing power of 2, with the rightmost digit representing 20, the next representing 21, then 22, and so on. To determine the decimal representation of a binary number simply take the sum of the products of the binary digits and the powers of 2 which they represent. For example, the binary number 100101 is converted to decimal form as follows:
1001012 = [ ( 1 ) × 25 ] + [ ( 0 ) × 24 ] + [ ( 0 ) × 23 ] + [ ( 1 ) × 22 ] + [ ( 0 ) × 21 ] + [ ( 1 ) × 20 ]1001012 = [ 1 × 32 ] + [ 0 × 16 ] + [ 0 × 8 ] + [ 1 × 4 ] + [ 0 × 2 ] + [ 1 × 1 ]1001012 = 3710
0000,0001, (rightmost digit starts over, and next digit is incremented)0010, 0011, (rightmost two digits start over, and next digit is incremented)0100, 0101, 0110, 0111, (rightmost three digits start over, and the next digit is incremented)1000, 1001, 1011, 1100, ...Since binary is a base-2 system, each digit represents an increasing power of 2, with the rightmost digit representing 20, the next representing 21, then 22, and so on. To determine the decimal representation of a binary number simply take the sum of the products of the binary digits and the powers of 2 which they represent. For example, the binary number 100101 is converted to decimal form as follows:
1001012 = [ ( 1 ) × 25 ] + [ ( 0 ) × 24 ] + [ ( 0 ) × 23 ] + [ ( 1 ) × 22 ] + [ ( 0 ) × 21 ] + [ ( 1 ) × 20 ]1001012 = [ 1 × 32 ] + [ 0 × 16 ] + [ 0 × 8 ] + [ 1 × 4 ] + [ 0 × 2 ] + [ 1 × 1 ]1001012 = 3710