The binary number system (which is composed of 0's and 1's) is predominantly used in the logic operations processed by computers. Therefore, the conversion rules from decimal number system to binary number system are of primary importance in digital electronics. In this post, we summarize how to convert a decimal number (whole or fractional) to a binary number. This is also a fun activity that you can carry out with your kids.

First we focus on how to convert a whole decimal number to a binary number. In binary system (base 2), each digit corresponds to a power of 2, as opposed to 10 which is the case for the decimal system (or base 10). Thus, the very first digit is assigned to "2 to the power 0", the second digit is to "2 to the power 1", and so for and so forth. As a simple example, a whole decimal number **5** = **1 **x (2^2) + **0 **x (2^1) + **1 **x (2^0) is written as **101** in binary number system. Below shows a more systematic way to convert a whole decimal number to its binary counterpart.