 Hello friends. I am Sanjay Gupta. I welcome you on my YouTube channel. My channel contains more than 800 videos related to various programming languages. You can search those videos through the keyword programming by Sanjay Gupta. You can also search my channel by typing my name Sanjay Gupta in YouTube. Don't forget to subscribe my YouTube channel. For queries, you can connect with me by following these details. In this video, I am going to discuss how you can convert a number whose base is other than 10 to a number whose base is other than 10. It means we are going to convert any octal number into binary or binary to octal or octal to hexadecimal or hexadecimal to octal. So the number which we are going to convert is not decimal and the resultant number is also not decimal number. So now I am going to convert integer numbers first. So first have a look on the steps. So first step is convert the original number into decimal by following the multiplication method. So you have to convert the source or original number into decimal first and then you have to convert the decimal number into the required number or you can say new base number by following the divisional remainder method. So these two steps we have to follow. So let's understand these steps with the help of an example. So this is example one. Question is we have to convert 11011 the number is having base two into octal number. So here I am going to use the multiplication method. First I am going to convert this binary number into decimal. So I have identified the positions of each number sorry each digit. So this first digit is having the position zero. Then second digit position one third digit position two fourth digit position three and fifth digit is position is having position number four. So this way these positions are multiplied here with this formula. So first I have mentioned the number and then it is multiplied with its base raised its position. So one into two is four. So two is the base of the number and four is the position of the digit and the digit is one. Similarly, all the digits are multiplied. The multiplication are added further and the addition result is 27 which is decimal number. So 11011 which is the binary number its equivalent decimal number is 27. So here I have performed only step number one. Now I have to apply a step number two. It means I have to convert this 27 into octal number. So for that I am going to use this division remainder method. So 27 is the decimal number. I am going to convert it into octal. So 27 will be divided by eight. So it will be divisible three times. So remainder will be three. Then further we can divide three by eight. So remainder will be three. Now if you combine three three number will be three three and its base is octal. So 11011 which is the binary number. Its octal representation is three three. So this way I have converted binary to octal. Now example number two here I am going to convert octal number into binary. So first I am going to convert octal to decimal and then decimal will be converted into binary. So for octal I have identified the position. Position of six is zero. Position of two is one. Then I have multiplied these digits. So two is multiplied with eight raised one. Here eight is the base and one is the position. And then six is multiplied with eight raised zero. Then these multiplications are added and finally the result is 22 which is decimal. So this is the step number one. Now I have to apply it. I have to apply step number two. So here I am going to convert 22 whose bases stand into binary. So 22 will be divided by two each time and the remainder is mentioned here. So we have to put all these remainder values from bottom to up. So you can see the number 10110. This is the binary conversion of 22. So original number was 26 which is an octal number and it is converted into 10110 which is its equivalent binary number. So I have applied multiplication method as well as division remainder method to convert octal number into binary. One more example is here. Here I am going to convert hexadecimal number into octal. So first I am going to convert hexadecimal number into decimal and then that decimal number will be converted into octal. So you can see here 25a. Three digits are available. Position of a is zero. Position of five is one. Position of two is two and a will be converted into one zero because we can't use a for any calculation. So its representation is 10. So here I have multiplied the digit two with 16 days to why 16 because base of the number is 16 and position of this visit to is to that's why it's far is to then five is multiplied with 16 days one. So the position of five is one. That's why 16 days one and similarly 10 into 16 days zero. So all these multiplications are added further to find out decimal number. So 25a is hexadecimal number and its equivalent decimal number is 602. Now I have to convert this decimal number into octal number. And also I am using divisional remainder method. So 602 is divided by 875 times remainder is to 75 is divided by eight nine times remainder is three nine is divided by eight one time remainder is one one can't be divisible. That's why remainder is one. So we have to put all these remainder digits from bottom to up. So the final outcome will be 1132. Hexadecimal number is 25a and it's equivalent octal number is 1132. So friends this way by applying these two different methods multiplication and division remainder method you can find out conversion of a number whose basis other than 10 and that number will be converted into the number which doesn't belong to decimal. So after conversion of integers, now I'm moving to conversion of fractional numbers. So here we are going to convert octal to hexadecimal. So first convert octal into decimal by applying this multiplication method. So here you can see the digits which are available at left inside of decimal point. Their positions are 012 and the digits which are available at right inside of decimal point their positions are minus one minus two. And with these positions, I have multiplied all the digits. So one into eight raise to eight is the base of original number and it's power is position of this visit one. So here you can see the position of one is to that's why power is to for this to position is one. Position is one. That's why eight raised one for seven position is zero. That's why eight raise zero for three position is minus one. That's why eight raise minus one and so on. Finally, these multiplication results are added and the outcome is eight seven point four zero six to five. So one to seven point three two which is octal number. It is converted into decimal. Now this decimal will be converted into hexadecimal. Now we are going to see how we can convert that. So here you can see first we are going to convert integer part by division remainder method. So this 87 will be converted first. So you can see it is converted through this division remainder method and the result is five seven, which isn't hexadecimal. So here we have only converted it into the part that is eight seven. Now we have to convert this four zero six to five into hexadecimal. So for that purpose, I'm going to this, I'm going to use this method, which I have already discussed in my another video. So four zero six to five will be multiplied with 16 because targeted numbers basis 16. So result is 6.5. We have to keep the integer part on the here and the fractional value will be available here for further multiplications. So this point five will be multiplied by 16 result is 8.0. So integer part eight is maintained here and the fractional value zero is available here, which can't be multiplied further because if you multiply any number with zero, the result will be always zero. Now we have to put these two digits together. So the result is six, sorry, 0.68. So this fractional parts hexadecimal equivalent value is 0.68. So finally, if we combine all the values together, so eight seven point four zero six to five is converted into this five seven point six eight. And finally, if we find out the complete answer, so original number was one two seven point three two, which is octal. Then I converted it into decimal. That was eight seven point four zero six to five. Then it is converted into hexadecimal. So finally result is five seven point six eight. So this way I converted octal number into hexadecimal number. I hope you have understood whatever I have explained in this video. If you want to watch more programming related videos, you can subscribe my YouTube channel. If you have any queries, you can connect with me by following these details which are available in front of you. Thank you for watching this video.