BINARY NUMBER SYSTEM
The number system which we use in our daily life is decimal number system. We can represent all digits from zero to infinity as a combination of numbers from 0 to 9. For example, 63 is represented as a combination of 6 and 3. In decimal system, each digit used to represent a particular number has a particular weight. A digit in unit place, has a lesser weight than a digit in ten's place. This is clear from the following illustration.
Let a decimal number be "ABCD". Here A, B, C, D are all decimal digits. The weight of these digits are given below :
Weight ⟶ 10³ 10² 10¹ 10⁰
Digit ⟶ A B C D
Therefore, the number 'N' can be written as
N = A × 10³ + B × 10² + C × 10¹ + D × 10⁰
If A = 5, B = 3, C = 7, D = 0
Then N = 5 × 10³ + 3 × 10² + 7 × 10¹ + 0 × 10⁰
= 5000 + 300 + 70 + 0
= 5370.
Binary system runs in a similar manner with a difference that it expresses all numbers as a combination of 0 and 1 while the 'weight' is assigned to the place as powers of 2 (instead of powers of 10 as in decimal system) : 0 and 1 are called binary digits or simply bits ('b' is taken from binary and 'it's from digits).
Illustration. Let a number written in binary system be 01011.
Weight ⟶ 2⁴ 2³ 2² 2¹ 2⁰
Digit ⟶ 0 1 0 1 1
Therefore, the number 'N' can be written as
N = 0 ×2⁴ + 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰
= 0 + 8 + 0 + 2 + 1
= 11
Thus, '01011' in binary system represents 11 in decimal system.
Conversion of a number from binary system to decimal system
Procedure
- Write the binary number and then multiply the binary number with the power of 2 (from right to left).
- Add the products after multiplication.
- That is the decimal equivalent of the binary number.
Example
Therefore, the required decimal number is "52". The result can be written in either of the following two ways :
(110100)₂ = (52)₁₀
(110100)binary = (52)decimal
Conversion of a number from binary system to octal system
As we know in octal system there is 3 digits.
- First write the binary numbers; example - 110010.
- Then grouped them in 3 digits; example - 110 010.
- Write the value of each 3 digits; example - 110 = 6, 010 = 2.
- Then add the values ; example - 110010 = 62.
- That is the octal equivalent of the binary number.
Example
Conversion of a number from binary system to hexadecimal system
As we know in hexadecimal system there is 4 digits.
- First write the binary numbers; example - 10011100.
- Then grouped them in 4 digits; example - 1001 1100.
- Write the value of each 4 digits; example - 1001 = 9, 1100 = 12.
- Then add the values; example - 10011100 = 912 = 9C.
- That is the hexadecimal equivalent of the binary number.
Example
Therefore, the required hexadecimal number is "34". The result can be written in either of the following two ways :
(110100)₂ = (34)₁₆
(110100)binary = (34)hexadecimal
Conversion of a number from decimal system to binary system
Procedure
- Take the integral decimal number and divided by 2.
- Represent the reminder value at the right hand side.
- Assume the quotient value as the dividend and continue the step 1 and 2 untill unless you are not getting the quotient value below 2.
- Represent the right hand side value from button to top.
- This is the binary equivalent of the decimal number.
Example
Therefore, the required binary number is "110100". The result can be written in either of 5he following two ways :
(52)₁₀ = (110100)₂
or (52)decimal = (110100)binary
It may be noted that the indices 10 and 2 in the two representations give the base of the system of representation.
This can be easily verified as follows
Weight ⟶ 2⁵ 2⁴ 2³ 2² 2¹ 2⁰
Bites ⟶ 1 1 0 1 0 0
∴ N = 1 × 2⁵ + 1 × 2⁴ + 0 × 2³ + 1 × 2² + 0 × 2¹ + 0 × 2⁰
= 32 + 16 + 4
= 52
Conversion of a number from decimal to octal
Procedure
- Take the decimal number and divided by 8.
- Represent the reminder value at the right hand side.
- Assume the quotient as dividend and continue step 1 and 2 until unless you are not getting a value less than 8.
- Represent the right hand side value from buttom to top.
- That is the octal equivalent of the decimal number.
Example
Let us write 165 in octal system
Therefore, the required octal number is "245". The result can be written in either of the following two ways :
(165)₁₀ = (245)₈
or (165)decimal = (245)octal
It may be noted that the indices 10 and 8 in the two representations give the base of the system of representation.
This can be easily verified as follows
Weight ⟶ 8² 8¹ 8⁰
Bites ⟶ 2 4 5
∴ N = 2 × 8² + 4 × 8¹ + 5 × 8⁰
= 128 + 32 + 5
= 165
Conversion of a number from decimal system to hexadecimal system
Procedure
- Take the decimal number and divided by 16.
- Represent the reminder value of the result at right hand side.
- Assume the quotient value of the result on dividend and continue step 1 and 2 until unless you are not getting value less than 16.
- Represent the right hand side value from buttom to top.
- That is the hexadecimal equivalent of the decimal number.
Example
Therefore, the required hexadecimal number is "2A". The result can be written in either of the following two ways :
(42)₁₀ = (2A)₁₆
or (42)decimal = (2A)hexadecimal
It may be noted that the indices 10 and 16 in the two representations give the base of the system of representation.
This can be easily verified as follows
Weight ⟶ 16¹ 16⁰
Bites ⟶ 2 10
∴ N = 2 × 16¹ + 10 × 16⁰
= 32 + 10
= 42
Conversion of a number from octal system to binary system
We know in octal system there is 3 digits.
- First write the octal numbers; example - (305)₈
- Then write the binary numbers of each octal numbers; example - 3 = 011, 0 = 000, 5 = 101.
- Add the binary numbers; 011 000 101 = 011000101.
- That is the binary equivalent of the octal number.
Example
(245)₈ = (010100101)₂
(245)octal = (010100101)binary
Conversion of a number from octal system to decimal system
- Write the octal number and then multiply the octal numbers with the power of 8 (from right to left).
- Add the products after multiplication.
- Then the final result is the decimal equivalent of the octal number.
Example
Conversion of a number from octal system to hexadecimal system
We know in hexadecimal system there us 4 digits.
- First write the octal number; example - 425.
- Then write the binary numbers of each octal numbers; example - 4 = 0100, 2 = 0010, 5 = 0101.
- Add the binary numbers like this - 0100 0010 0101 = 010000100101 = 115.
- The final result is the hexadecimal equivalent of the octal number.
Example
Therefore, the required hexadecimal number is "A5". The result can be written in the following two ways :
(245)₈ = (A5)₁₆
(245)octal = (A5)hexadecimal
Conversion of a number from hexadecimal system to binary system
- Write the hexadecimal number; example - 8B (B = 12).
- Then write the binary numbers if each hexadecimal number; example - 8 = 1000, 12 = 1100.
- Add the binary numbers; example - 10001100.
- That is the binary equivalent of the hexadecimal number.
Example
Therefore, the required binary number is "101010". The result can be written in the following two ways :
(2A)₁₆ = (101010)₂
(2A)hexadecimal = (101010)binary
Conversion of a number from hexadecimal system to decimal system
- Take the hexadecimal number; example - 6C (C = 13).
- Multiply the hexadecimal number with the power of 16; example - 6 × 16¹ + 13 × 16⁰.
- Add the product after multiplication.
- The final result is the decimal equivalent of the hexadecimal number.
Example
Therefore, the required decimal number is "42". The result can be written in the following two ways :
(2A)₁₆ = (42)₁₀
(2A)hexadecimal = (42)decimal
Conversion of a number from hexadecimal system to octal system
We know in octal system there is 3 digits.
- Take the hexadecimal number; example - 3B (B=11).
- Write the hexadecimal numbers into binary numbers; example - 3 = 0011, 11 = 1011.
- Then grouped them in 3 digits like this - 00111011 = 111 011.
- Write the octal number of each binary numbers like this - 111 = 7, 011 = 3.
- Add the octal numbers = 73.
- The final result is the octal equivalent of the hexadecimal number.
Example
Addition in binary system - "concept of carry"
Let us suppose the reading of speedometer of a car at any instant is 000999. When the next kilometer is covered one has to be added to the first nine on the right hand side (in unit place). So, it becomes 0 and 1 is added at tens place. This 1, which is added to the next place when the count at a particular place increases to highest digit of the system is called carry. So, addition of 0 and 1 is 1. In case of addition of 1 and 1 the result increases beyond the highest available digit (1) in binary system. So, we write 0 and carry 1 to the next column as was done in case of addition of 000999 + 1. Thus, following rule shall be obeyed in addition of binary system.
(i) 0 + 0 = 0
(ii) 0 + 1 = 1
(iii) 1 + 0 = 1
(iv) 1 + 1 = 0 ; carry 1
Example
1011 = 11, 0111 = 7
1011 + 0111 = 10010
(11) + (7) = 18
Subtraction in binary system
Subtraction of binary numbers result is binary number.
(i) 0 - 0 = 0
(ii) 0 - 1 = 1 ; borrow 1
(iii) 1 - 0 = 1
(iv) 1 - 1 = 0
Example
1101 = 13, 0110 = 6
1101 - 0110 = 0111
(13) - (6) = 7
Multiplication in binary system
Multiplication of binary numbers is same as multiplication of natural numbers.
Example
0101 = 5, 1101 = 13
0101 × 1101 = 1000001
(5) × (13) = 65
Division in binary system
Division of binary numbers is similar to division of natural numbers.
Example
1100 = 12, 10 = 2
1100 ÷ 10 = 110
(12) ÷ (2) = 6
No comments:
Post a Comment