Sunday, December 16, 2012
How to convert binary to decimal and decimal to binary number
Binary numbers are used in digital technology such as in telecommunications, banking, computers, gaming, and multimedia. Binary numbers have 2 as their base and have only two possible values, 0 and 1. Decimal numbers have 10 as their base and have ten possible values, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). Decimal is the default base whenever you turn on your scientific calculator from off position. Decimal numbers are the numbers that we use in ordinary day to day transactions. It is also what we teach our children in our homes to count 1 to 10. This article will demonstrate how to convert binary numbers to decimal numbers and the other way around, how to convert decimal numbers to binary numbers.
How to convert a binary number to a decimal number: (only 5 easy steps)
Example:
Convert 1001101 to decimal number.
Given:
1001101 binary number
Required:
Decimal number equivalent to 1001101 binary number
Solution:
1. Copy the binary number and separate each binary number with a space.
1 0 0 1 1 0 1
2. Count the total number of binary numbers. In this example, there are seven binary numbers. Because there are seven binary numbers we will place 0, 1, 2, 3, 4, 5, 6 at the bottom of each binary number starting from the left to the right. These are the exponents to which the bases of two will be raised to.
1 0 0 1 1 0 1
6 5 4 3 2 1 0
3. Put 2 as the base for all the binary numbers.
1 0 0 1 1 0 1
6 5 4 3 2 1 0
2 2 2 2 2 2 2
4. Looking at the given binary number, determine which binary numbers are switched ON (those with values 1). Switched OFF means those binary numbers having values of 0 (zero). Starting from the right to left, the values that are 'switched on' are the first, third, fourth, and seventh. The 'switched on' positions have 0, 2, 3, 6 as their corresponding exponents.
1 1 1 1
6 3 2 0
2 2 2 2
5. Raise the 'switched on' positions using 2 as the base to their corresponding exponents. After raising to their corresponding exponents, their invidivual results will be added.
2^0 + 2^2 + 2^3 + 2^6
1 + 4 + 8 + 64
= 77
Answer:
1001101 binary number = 77 decimal number
Example:
Convert 110001 binary number to decimal number.
Solution:
Place the exponents 0, 1, 2, 3, 4, 5
1 1 0 0 0 1
5 4 3 2 1 0
Place the base 2 in all of the numbers.
1 1 0 0 0 1
5 4 3 2 1 0
2 2 2 2 2 2
Remove all 'switched off' values.
1 1 1
5 4 0
2 2 2
Raise 2 to the exponents and add the results.
2^0 + 2^4 + 2^5
1 + 16 + 32
= 49
Answer:
110001 binary number = 49 decimal number
-------------------------------------------------------------
How to convert a decimal number to a binary number: (in 5 simple steps)
Example:
Convert 12 (decimal number) to a binary number.
Given:
12 (decimal number)
Required:
Binary representation of 12 (decimal number).
Solution:
1. Determine if the given decimal number is even or odd. In this example, 12 is an even number.
2. The result of adding two even numbers is EVEN, e.g. 4 + 8 = 12.
3. Arrange the exponents 0, 1, 2, 3. In this case, the maximum exponent is 3 because 2^4 is equal to 16 which will be greater than 12. After laying out the exponents, put 2 as bases.
3 2 1 0
2 2 2 2
4. Assuming, they are all 'switched on', the equivalent decimal will be,
2^0 + 2^1 + 2^2 + 2^3
1 + 2 + 4 + 8
= 15
5. Because we are getting the equivalent binary number for the decimal number 12, and knowing that adding two even numbers would yield an even number, and we must remove 3 from 15, therefore:
2^0 and 2^1 must be switched off --> first position is 0, second position is 0
2^2 and 2^3 must be switched on --> third position is 1, fourth position is 1
so that,
2^2 + 2^3
4 + 8
= 12
Answer:
Starting from right to left and combining the first to the fourth positions, we will get 1100.
1100 binary = 12 decimal
Example:
What is the binary representation of the decimal number 25?
Solution:
The given decimal number 25 is an odd number. Even number plus Odd number is an ODD number, e.g. 24 + 1 = 25.
In order to obtain 25, the fifth position, fourth position, and first positions must all be switched on.
The second and third positions must be switched off.
So that,
1 1 0 0 1
4 3 2 1 0
2 2 2 2 2
Adding only the switched on positions,
2^0 + 2^3 + 2^4
1 + 8 + 16
= 25
Therefore,
11001 is the binary number equivalent to the decimal number 25.
(I chose the number 25, in memory of my father's basketball shirt's number).
Subscribe to:
Post Comments (Atom)
great ,.,,i just want to share link talking about binary number
ReplyDeletehttp://www.math-worksheets.co.uk/141-tmd-what-are-binary-numbers-part-1/
Wow! this is Amazing! I got free 10,000 instagram followers! Click here to get your free instagram followers!
ReplyDelete