Binary Number System
This number system has base 2 and use only 0 and 1; whereas the conventional decimal system having a base 10, uses 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
The positional weight of a binary number:-
Positions from right to left | 8th
7 | 7th
6 | 6th
5 | 5th
4 | 4th
3 | 3rd
2 | 2nd
1 | 1st
0 | ||
Positional weight of a Binary number | 27
128 | 26
64 | 25
32 | 24
16 | 23
8 | 22
4 | 21
2 | 20
1 |
By using this table:-
The decimal equivalents of any binary number can be found out.
(10101)2 = 1 x 24 + 0 x 23 + 1 x 22 + 0 x 21 + 1 x 20
= 16 + 0 + 4 + 0 + 1 = (21)10
Alternatively,
1 | 0 | 1 | 0 | 1 |
16 |
| 4 |
| 1 |
Hence, (10101)2 = 16 + 4 + 1= (21)10
Conversion of a Decimal Number to Binary Number
To convert a decimal number to a binary number, the following steps are to be considered.
Step 1:- Divide the decimal number by 2.
Step 2:- Go on dividing the quotients (obtained at each stage) by 2 till the quotient is 0.
Step 3:- Write down the remainders on the right side after each of the above divisions.
Step 4:- Arrange the remainders ( as obtained in Step 3) in the reverse order to get the equivalent binary number.
Ex.:- convert a decimal number (25)10 to the equivalent Binary number.
Soln.:- Divide the given number 25 by 2 and go on dividing the quotient by 2 till the quotient is 0.
Then we get the remainder in every step like 1, 0, 0, 1, 1 respectively.
Now, arrange the remainder in reverse order like, 11001. This is the required Binary number.
So, (25)10 = (11001)2
Calculation in the Binary System
Mathematical calculations (i.e. addition, subtraction and multiplication) in the binary system follow their own rules and are similar to those in the decimal system.
Binary Addition
It is easy to add two binary numbers. The rules for binary addition are as follows:-
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10 (put 0 to the same column and carry 1 to the next left column)
Binary Subtraction
It is easy to subtract a binary number from another binary number. The rules for binary subtraction are as follows:
0 – 0 = 0
1 – 1 = 0
1 – 0 = 1
To find 0 – 1, we write 1 in the result and also we borrow 1 from the next left column.
Binary Multiplication
Binary multiplication is similar as decimal multiplication. The four rules that are followed in multiplication of two binary numbers are following:-
0 x 0 = 0
0 x 1 = 0
1 x 0 = 0
1 x 1 = 1
Binary Division
In the division, the method that is applied is similar to that in decimal system. The two rules which are followed here are,
0/1 = 0 and 1/1 = 1
Here also, the value of 1/0 is undefined.
0 comments:
Post a Comment