So hello, everyone.
Welcome back to the course.
So in this glass, we will learn convergence.
Convergence means how will you convert a binary number to a decimal number?
Always I was a.
OK, so let us get started.
So first of all, how will you convert our decimal number?
Duodecimal number, Nacimiento decimal.
For example, 250 trees are decimal number.
OK, so what I will do.
What is the word of three?
Ten to the power zero.
What is the word of five?
Ten to the power one.
What is the word of two?
Ten to the power two.
OK, so what will I do?
I really want to play each digit with its weight.
So to multiply by ten squared plus five and to turn to the power one plus three in two.
Ten to the power zero.
Uncivilly 253.
And that is perfectly fine.
250 teaser decimal number.
And I will.
And if I will convert this decimal number into decimal number, the answer should be 253.
And we are getting the same output.
OK.
Just a second.
Now, the second conclusion.
How will you convert a binding omelet?
Duodecimal number.
That brutal with him?
What will I do?
So what will I do?
For example, two of the three was a dismal number and I have to convert into a decimal number.
Similarly, one zero one is a tiny number.
I have to convert this number in to our decimal number.
So I will debate each digit with it, with and then add them up.
Okay, so what is the rate of digit one?
Read about zero.
What is a very tough budget, zero for the department?
And what is the weight of the Jetman to do the power to?
So what we will do, we will multiply each digit with its corresponding with and add them up.
So one multiply where two to the power, two plus zero multiplied by two to the power one.
Plus one in two to that, about zero.
OK, so four plus zero plus one.
That is five.
So one zero one in binary.
It was five in decimal.
OK, so one zero one in binary, is it close to five in decimal?
OK, so let us look at Tarkan Vision.
OK, tell you decimal.
Supposed to 07 is a decimal, I'm sorry.
Supposed to do seven is a octal number.
You have to convert disappear number into decimal number.
What is that weird?
Double digit seven.
It will about zero.
What is the rate of digit zero?
It's the bottom one.
What is the rate of digital?
It's great.
So multiply each digit with its corresponding grid and add them up.
So do and do it the power to.
Plus zero.
And do it to the power of.
Plus seven to eight with about zero.
OK, so here I am having 128 plus zero plus seven.
That is one thirty five.
So two zero seven in octal is equal to 135.
In decimal.
So the approach is very simple, if we want to convert any number to decimal number.
Multiply each digit with its corresponding weight and add them up.
So let us convert hexadecimal decimal.
So the fourth conclusion is, how will you convert hexadecimal number to a decimal number?
Hexadecimal to decimal, suppose one day three is my hexadecimal number.
I can read this a mango decimal number.
What is that with a double digit tree?
Sixteen to the power zero.
What is the weight of digit D..
Sixteen to the power on.
And similarly, sixteen to the power to so multiply each digit with its corresponding weight and add
them up.
So one in two.
Sixteen to the power to.
Bless deals in sixteen to the power when.
Blessed clean to 60 and with about zero.
So 256 glass, what is the value of is it goes to 13.
If you remember A, B, C, D, E and F.
So ten, eleven, twelve and thirteen.
So these 13.
So 13 multiply where 16.
Gless three.
So to have these six plus.
Two zero eight.
Plus three.
So the answer will be four, six and seven.
OK, so one lately in hexadecimal, that is with the base, 16 is equals two four, six, seven with
the base 10.
OK, so the approach is very simple.
So let us revise.
So first we have to convert any number to a decimal number, for example, given our decimal number.
I have to convert this decimal number to decimal again.
So I told you, that approach is very simple.
Multiply each digit with its corresponding with and add them up.
For example, we're double digit to is ten to the power to Weirton.
Digit favors tend to the Barwin assembly.
Elevator to your trees.
Ten to the power.
Zero.
So multiply each digit with its corresponding with and add them up.
Okay.
We have to add them.
For example, if you want to convert a binding number to a decimal number, suppose one zero one is
a binary number.
The first step is to find weird of each digit.
So the good one has a word often with about zero zero zero has a rate of 10 to the Parvin.
And the good one has a rate of two square.
Simple multiply each digit with its corresponding weight and add them up.
Simple.
OK, let's take another example.
One one.
One in binary.
One one in binary is equal to how much in decimal.
So what is the rate of digit one toward about zero?
Then I am having to to the power one.
And then I am I mean, to the power two.
So two squared plus two.
The one that's true to the power to zero.
The answer is seven.
So one one one in binary equals two seven in decimal.
OK, so the approach is very simple.
Now, the car can imagine that we did was how we look on Murdoch.
The number two decimal number seems step find words for each digit, multiply the digit with the corresponding
word.
And added them up.
OK, so the approach is very, very simple.
Now, the next convention that we looked was hexadecimal to decimal.
Again, the approach was very simple.
So the approach is very simple.
Find a way out of each digit and multiply the digit with its corresponding with.
And finally, Adam.
Very simple.
OK.
So let us do the reverse.
Reverse means how will you convert a decimal to binary?
So first, if I remember weighted by neutral decimal, now we will do.
How will you convert a decimal number to a binding number?
How will you convert decimal to binary so wedded to the load for conversions?
We should say three because it is not a conversion for about it.
So the main conversions were three by four decimal octal decimal and hexadecimal decimal.
Now we will reverse that as decimal to hexadecimal and then decimal to octal and then.
I do, bindery.
So first let us do decimal to binary.
So decimal to binary.
But there are some steps and we have to follow the steps.
So the approach is very simple.
I have to repeatedly divide.
Reportedly a bitterly divided.
By base, who is a base, for example, in this case, I have to report you divided by two.
Okay, till we get zero.
Let us understand the state run with the help of an example.
Suppose.
In another example, one zero one in binary corresponds to five in decimal.
So let's convert five into one zero one.
So what do I do here?
I have to repeatedly divide by two.
Why do.
Because two is to be a binary.
So two here.
So, too, does our food.
What is the reminder when?
Right here.
So this is a reminder.
Then again, divide by two.
So the remainder is zero.
Then again, divide by two.
So here I am having zero.
And the remainder is one.
OK, so your answer will be from bottom to top.
So the answer is one zero and one, this will be my MSP and Masowe means most significant, but that
is this bit.
And this is least significant bit.
That is this bit.
So the most important step is you have to right from bottom to top your answer, be from bottom to top.
OK, so let us take another example.
Suppose one zero zero one zero.
Suppose this is my binary number.
I will first convert this number into decimal.
And then I will convert that decimal number again to binary.
Okay, so one zero zero one zero.
We're double digit.
Zero is to the power zero.
Then I'm having to do the power one.
Then I'm having to give the power to then to the power forward.
Then I'm having so to do the power tree.
And then I'm having all of the power for.
I can write simply like one, two, four, eight and sixteen.
And so these are my words.
Okay, so my answer will be 16 plus zero plus zero plus two plus zero.
So we're did my output 18, so one zero zero one zero.
In binary, is it close to it being in decimal?
Symbol.
Now we will convert it, Dean, that is decimal to binary.
What was our approach?
Our approach was very simple.
We will repeatedly divide by two by two because I have to convert this decimal number into binary.
So two.
Do nyanza it?
What is the remainder?
Zero.
Dofor WSA, it.
It is a reminder when.
To do the four remaining days zero.
Two Anzar to remain there is zero.
Two zero zero remainder is when and amounts will be from bottom to top.
So my answer is one zero zero one zero.
You can see here.
They both are same.
So I hope you got the idea.
How will we convert by nature, decimal and decimal to bring the.
So let us look at Antiguan vision.
We have to convert a decimal number to the lumber.
So let's take an example, so here I was having.
OK, so let's take an example.
I will convert one thirty five to two zero seven.
OK.
So I will convert 135 to two zero seven.
This is my decimal number.
And this is my OCTA number.
Okay.
So the approach is very simple.
I will here.
I will repeatedly redivide away it.
OK.
So I will divide by eight repeatedly because I have to convert and two of the lumber till we get a zero.
So I am having 135, my decimal number.
And we have to liberty to lead the way by it.
OK.
So when and then six, that is seven.
And then I will have it.
Who's 16 when there is zero and eight zero?
And the remainder is two.
So as I will be from bottom to top, so to 07.
OK.
So we have to repeatedly divide May eight.
Divide by it repeatedly till we get to zero.
In another example, when I was to convert.
When I was converting a decimal to binary, I was repeatedly divided by two.
Will we get a zero?
OK, so now our last conclusion, hexadecimal to decimal.
We will do reverse from decimal to hexadecimal.
Okay, so let's take four, six to seven.
So four, six to seven in decimal equals one.
The three in hexadecimal, four.
Six to seven.
Okay.
So we have to convert our decimal number to hexadecimal.
How we will convert?
We will repeatedly divide by 16 because we have to convert and to hexadecimal number and tell how much
we will divide.
Till we get to zero.
So 467.
And here I am having 16.
OK.
So 16 to an.
Nine.
And the remainder is.
Three.
16.
Winzer 16 and the remainder is 13, 16 zero, and the remainder is when.
So my output will be from boredom to top.
That is one 13 and three.
So today is D.
And guess what are dynasty?
So for six to seven in decimal equals one day, three in hexadecimal.
So I hope you got diarrhea.
Basically the airfield and we will follow that cruise only, so let us advise.
OK, so if we want to convert an enormous system into decimal number system, our approach will be very
simple.
What we will do, we will find veered off each digit.
Find a way out of each digit
and multiply digit with their weight and add them up.
OK, so for example, here I was having binary decimal.
Find a way out of each digit and multiplied them with their corresponding word.
And then add them up.
So this conclusion was very easy.
Now the second type of conversion, how will you convert a decimal number to any other number system?
OK.
So decimal to any approach was very simple.
We will divide decimal number repeatedly by the base of any number that we want to convert to.
So the approach is very simple.
If you want to convert decimal to binary, I will repeatedly divide by two.
So divide by two.
Divide by two.
And divide by two.
And write remainder here.
And till we get to zero, we have to divide.
And our answer will be from bottom to top.
Okay.
You can see when one example here.
We want to convert.
That's my daughter.
So we'll divide by eight, divided by eight, divided by age divide.
Wait till we get to zero.
And here I am having Remender.
And our answer will be from bottom to top.
OK.
Similarly for a dismal number.
I will divide by 16, divide by 16, divide by 16.
Then we get to zero.
And here I am, I being remender.
And our answer will be from bottom to top.
OK, so here we are converting numbers manually.
We are using pen and paper for convergence in upcoming videos when we will learn C++.
When we learn C++, we will write code for this.
Okay, so the input will be a decimal number and the output will be hexadecimal number.
Okay.
So in upcoming, we do we will write code for it.
We will write code.
So now you may be thinking, how will you convert a hexadecimal number.
Do I know?
No.
We have not covered this.
But how will you convert?
So the approach is very simple.
First come, first convert the decimal to decimal and then convert decimal to octal.
Simple.
What if we want to convert a binary number to, let's say, hexadecimal number?
So that when the approach is very simple.
What do you do?
You will first convert by nature decimal and then you'll convert the decimal to hexadecimal.
OK, so all of that convergence can be derived from the convergence that we have, Denbo.
So no need of learning how we look onward decimal too often.
Actually, there are some ways there are some ways in which we can directly convert, but there is no
need.
Actually, they are never used.
We will never use it, at least in C++, at least in this language, at least in discourse.
We will never require this type of convergence.
Okay.
OK, so we have done many conversions, so out of this conversion.
There are two very important conversion there.
You must remember.
So the first one is buying into decimal.
And the second one is decimal to binary.
So these two numbers system, these two conversions, you should must remember.
So these are most.
So you have to practice that much.
That you can or convert a binding number to a decimal number.
OK, so do so my situation.
Will we do some practice, take some examples and do a little bit practice.
How will you convert a binding number to a decimal number?
OK.
So I think that's enough.
So this is it for today's video.
I will see you in the next one.