|
|
|
Decimal to binary conversion Here I am discussing a shortcut for decimal to binary conversion and vice versa. I am taking it for granted that you already know the conventional method of dividing the given decimal number by 2 and writing down the remainders upside down to calculate binary equivalent. In this shortcut method you will have to make a table which looks like:
This is not at all difficult as you just have to start from the extreme right with 1 and as u proceed towards left just double up the digits. You can extend the table up to any limit but since one octet is comprised of 8 bits we will take only eight columns in our table.
Step 1:
Try to locate the given number
in the table.
Step 2:
If you find it in the table the
just write “1” below that number.
Step 3:
Write “0” below the rest of the
numbers on the right.
Step 4:
If you don’t find the number in
the table, look for the combination of digits which
are present in the table with
which the given decimal number can be formed and
write “1” below all
those digits and “0” below the remaining ones. Let’s discuss this procedure with the help of some examples:
1.
Converting 4 into binary number:
Step 1: locate 4 in the table Step 2: write “1” below 4 in the table. Step 3: write “0” below the rest of the digits on the right. So the binary equivalent of 4 is 100. it is expressed
as (4)10=(100)2 Let’s take another example.
1.
Converting 64 into binary number:
Step 1: locate 64 in the table Step 2: write “1” below 64 in the table. Step 3: write “0” below the rest of the digits on the right. So the binary equivalent of 64 is 1000000. it is
expressed as (64)10=(1000000)2 Now let’s try to convert a digit which is not there in the table.
2.
Converting 10 into binary number:
Step 1: try to locate 10 in the table. But 10 is not located in the table. Step 2: so the trick is to look for the digits that are present in the table which when added gives the result as 10. 10 can be formed by 8 and 2. Step 3:
Write “1” below the numbers we have identified in the table which when added when added gives the rest as 10 i.e. 8 and 2. Step 4:
After writing the binary “1”s in the above step the job is almost done. All you need is to write “0” below the remaining digits. So the binary equivalent of 10 is 1010. It is
expressed as (10)10= (1010)2 Let’s discuss one more example.
3.
Converting 90 into binary number:
Step 1: try to locate 90 in the table. But 90 is not located in the table. Step 2: so the trick is to look for the digits that are present in the table which when added gives the result as 90. 90 can be formed by 64, 16, 8 and 2. Step 3:
Write “1” below the numbers we have identified in the table which when added when added gives the rest as 90 i.e. 64, 16, 8 and 2. Step 4:
After writing the binary “1”s in the above step the job is almost done. All you need is to write “0” below the remaining digits. So the binary equivalent of 90 is 1011010. It is
expressed as (90)10= (1011010)2 This method looks bit complicated but once you practice it will pay good result.
|
|
|