Day 41: Number System Conversions

Hello Dear Students,
Hope you all are doing good.

So, in previous lecture, we have studied about the number system, and now we will study about the conversions of number system.

Let's get started...

Ek number system ko doosre number system mein convert karne ke liye various conversions technique use ki jati hai. The possible types of conversions are as follows-
  1. Other Base System to Decimal
  2. Decimal to Other Base System
  3. Other Base System to Non-Decimal

1. OTHER BASE SYSTEM TO DECIMAL - Binary number, octal number and hexadecimal number ko Decimal number mein convert karne ke liye following steps-
  • Find place value of each digit, place value is the base of number system.
  • Multiply the place value with their place holders.
  • Find the sum of all products.
 Number in any base Conversion Decimal Number 
 Binary Number (1010)        1*23+0*22+1*21+0*20    
=1*6+0*4+1*2+0*1
=6+0+2+0
=8 
 8
 Octal Number(504)5*82+0*81+4*80
=5*64+0*8+4*1
=320+0+4
=324 
 324
Hexadecimal Number(A6)  A*161+6*160
=10*16+6*1
=160+16
=166 
 166

We know that the Base of Binary Number = 2, Octal Number base = 8, and Hexadecimal number Base = 16. So, above method se hum binary, octal, hexadecimal numbers ko decimal number mein convert kar sakte hain. 


2. DECIMAL TO OTHER BASE SYSTEM - The decimal number can be converted to other base system, such as Decimal to Binary, Octal or Hexadecimal. 

Decimal number to other number convert karne ke liye basically Division method ko use kiya jata hai, in which -
  1. Decimal number ko jis number mein convert karna hai, uske base value se decimal number ko divide karenge.
  2. Get remainder of the division.

Decimal to Binary - Let Decimal number= 51. Converting 51 to binary number,

 Division ExpressionQuotient Remainder 
 51/2 25 1
 25/2  12 1
 12/2 6 0
 6/2 3 0
 3/2
 1 1
 1/2 0 1

As binary number has base value of 2, then divide by 2.
So, the binary number of 51 = 110011, i.e. the remainder direction from backwards to upwards.


Decimal to Octal - Let Decimal number = 51. Converting 51 to octal number,

 Division ExpressionQuotient Remainder 
 51/8 6 3
 6/8 0 6

As octal number has base value of 8, then divide by 8.
So, the octal number of 51 = 63, i.e. the remainder direction from backwards to upwards.


Decimal to Hexadecimal - Let Decimal number = 51. Converting 51 to hexadecimal number,

 Division ExpressionQuotient Remainder 
 51/16 3 3
 3/16  0 3

As hexadecimal number has base value of 16, then divide by 16.
So, the hexadecimal number of 51 = 33, i.e. the remainder direction from backwards to upwards.


3. OTHER BASE SYSTEM TO NON-DECIMAL BASE SYSTEM - The conversion like -
  • Binary to Octal
  • Octal to Binary
  • Binary to Hexadecimal
  • Hexadecimal to Binary
  • Hexadecimal to Octal
  • Octal to Hexadecimal

1. Binary to Octal - Binary to octal convert karne ke liye 3 numbers ke groups bana kar unhe octal mein convert karte hain and then combine kar dete hain. 

Let Binary Number = 101111100 and we have to convert this binary number to octal number.

 Binary Groups101  111 100
Octal Number  7 4

The conversion is done as - 
101 = 1*22+0*21+1*20 
= 1*4+0*2+1*1
 = 4+0+1 = 5

So, by combining, the octal number from binary = 574, so the value of 101111100 in octal is 574.

2. Octal to Binary - Octal to binary conversion is very simple. Isme simply hum octal number ko single digits mein divide karke uske binary values ko likh denge, then usse combine kar denge.

Let Octal number = 574

Octal Number 74
Binary Number 101  111100


So, the binary number of 574 = 101111100.

3. Binary to Hexadecimal - Binary to Hexadecimal is same as Binary to Octal, but the difference is that, binary to octal mein 3 digits ke group mein divide kiya jata hai, but binary to hexadecimal mein 4 digits groups mein divide kiya jata hai. Groups hum last digits se banate hain.

Let Binary Number = 101100 and we have to convert this into hexadecimal number.

 Binary Groups10  1100
 Extended Binary Group 0010 1100
Hexadecimal Number  2  12

So, the hexadecimal number is = 212, but we should convert 12 into hexadecimal value, so it is C, 
So, the hexadecimal value of 101100 = 2C.

Note:- Agar digits 4 nahi hain, then number ke starting mein 0 ko put kar diya jata hai, 4 digits banane ke liye.

4. Hexadecimal to Binary - Hexadecimal to binary number mein convert karne ke liye single digits mein divide karke uski binary value ko find out kiya jata hai, and then combine kar diya jata hai. 

Let Hexadecimal number = 2CD

Hexadecimal Number 2  C D
Binary Number 0010  1100 1101

So, binary conversion of hexadecimal number 2CD = 001011001101.

5. Hexadecimal to Octal number and Vice-Versa - For these conversions, two steps are there-
  1. Convert the number to binary number
  2. Convert this binary number to desired number system.
Let hexadecimal number = 2CD and we want to convert it in octal number. 

Hexadecimal Number 2  C D
Binary Number 0010  1100 1101

So, after completing 1st step to convert this into binary number, we have binary value = 001011001101.

Now, just like we have convert binary to octal, same follows here.

 Binary Groups001  011 001 101
Octal Number  1 3 1
 5

So, the value of 2CD hexadecimal number = 1315 in Octal.

Now, converting Octal to Hexadecimal - Let Octal number = 457, so converting 457 into hexadecimal.

1st step is to convert it into binary number, so,

Octal Number 4 5 7
Binary Number 100  101111

So binary value = 100101111
Now, just like we have convert binary to hexadecimal, same follows here,


 Binary Groups 0010 1111
 Extended Binary Group 0001 0010 1111
Hexadecimal Number  1 2 F

So, the value of octal number 457 = 12F in Hexadecimal value.


Best of Luck Students,
Do visit our website regularly for more content and for daily tests.

Regards,
UGC NET EXPERTS