 Hello dear learners, I am Srutish Rubabharali working in Krishna Kanta Handiko State Open University as an assistant professor in the department of computer science and today we are going to talk about number system. So we have been already familiar with a lot of number systems that are prevalent in our everyday life like the decimal number system. So let's start with that. So the decimal number system as we all know has been made up of 10 digits that is from 0 to 9. Similarly there are other number systems also like binary, octal and hexadecimal number system. So but let's start our focus on the decimal number system. So here how do we calculate the weight of a particular number in the decimal number system? The weight of the each digit is the upper number is dependent on the relative position within the number. For example if we take a number 6472. So now we know that it is 6742 but how do we calculate it? For that we'll take out that the 6402 represents the 6000, 4 represents the 400, 7 represents the 70 and 2 represents the just the digit 2. So now we know for calculating the weight of each digit it depends on the relative position and the position it starts from the left hand side. So now the position of the digit 2 is in the unit's place. So for this we'll calculate the weight by 2 into 10 to the power 0. Now we have taken 10 since the base of this decimal number system is 10. That is the total of all the unique digits that are present in a particular number system. Similarly the weight for the second digit will be 7 into 10 to the power 1. The weight of the third digit will be 4 into 10 to the power 2 and the weight of the fourth digit will be 6 into 10 to the power 3. And now if we want to calculate the total weight of this number we'll calculate the sum of all of these digits and we'll get a total of 6472. So if we calculate a particular formula using this derivation we'll get that it is the nth digit multiplied by the base to the power of n minus 1. So this works not only for the decimal number system this also works for the binary and the other number systems. So now let's move on to the binary number system. In the binary number system we have only two digits that are 0 and 1. Now since there are only two digits and we can represent 2 in mathematics as bi so from there comes the name binary. So here also there are only two digits 0 and 1 and if we take a particular number binary number say for example 10110. Then in this case the weight can be calculated by using the earlier formula that is the last digit that is 0 will have a weight of 0 into 2 to the power 0. The next number 1 into 2 to the power 1 again 1 into 2 to the power 2 again 0 into 2 to the power 3 and then 1 into 2 to the power 4. Now which will give us the decimal equivalent of this binary number which is 22. Now likewise we can calculate the weight of other binary numbers also. Now next look at this slide where we have the decimal number and its equivalent binary number. So here we can see that 0 is represented as 0 in binary number system also. 1 is represented as 1 but now for the value of 2 it is represented as 1 0. Again 3 is represented as 1 1. Again now 4 will be represented by 1 and then followed by 2 0s. The next number again will be represented as 101 that is the decimal number 5. Similarly we can see the equivalent binary numbers for the decimal number from 0 to 15. Now let us look at another number system that is the octal number system. Now the octal number system has 8 digits starting from 0 till 7 that is 0 1 2 3 4 5 6 and 7 and the base is the number of digits that are in the system and so it will be 8. So now how do we represent the decimal 9 or a decimal 10 in the octal number system? First of all for 8 it will represented as 1 and 0. For 9 it will be represented as 1 1. Again for 10 it will be represented as 1 and 2. Now since 8 is can be represented as 2 to the power of 3 so an octal number can be easily represented by a group of 3 binary digits. For example 3 can be represented as 0 1 1. 4 can be represented as 1 0 0. Now let us look at this slide. Here we can see that the decimal number is given and the octal number is given and their binary coded octal number has also been given. Here we can see that till 7 the octal number remains from 0 to 7 but after that for the decimal number 8 it has been represented as 1 and again we will start from a 0. Similarly for the decimal number 9 we have a 1 and then the next number after 0 is 1 so it will be 2 1s. Similarly for 10 it can be represented as 1 and then followed by the next number that is 2. Similarly if you have to represent decimal 11 in the octal number system it will be 1 followed by the next number that is 3. Similarly if we now look at the binary coded octal numbers we can see each individual octal number has been represented by its binary form that is for 0 in the binary coded octal number if we can go into a represented by 3 digits so 3 binary digits so it will be 0 0 0. Again 1 it will be 0 0 1. Similarly for 7 we can see it as 1 1 1. Likewise for the octal number 1 0 it will be represented 1 will be represented separately by 3 digits again 0 will be represented separately by 3 digits. So it will be 0 0 1 and 0 0 0. Similarly for the octal number 1 1 it will be represented as 0 0 1 0 0 1. Likewise it will be true for all the other octal numbers. Now let us look at the other number system that is the decimal number system. Now in the hexadecimal number system there are 16 numbers and so it has a base of 16 and the 16 numbers are 0 1 2 3 4 5 6 7 8 9 followed by we have using symbols now a b c d e f. So now since 16 can be represented as 2 to the power 4 so again this hexadecimal can be used to represent using a group of binary bits that is a group of four binary bits. For example if we have to represent five using binary bits it is going to be represented as 0 1 0 1. Now let us look at this slide where we have the decimal numbers the hexadecimal equivalent and the binary coded hexadecimal number. So here we can see from 0 to 9 the hexadecimal numbers are also 0 to 9 but when we need to represent the decimal number 10 then the hexadecimal number will be a. Similarly for 11 it goes to b then c d e f this continues till f so our next number if we have to represent then it will be f 0. Similarly we can see that the binary coded hexadecimal numbers are represented by four binary digits. So the binary equivalent of 0 is 0 0 0 the binary equivalent of 9 is 1 0 0 1. Similarly for binary equivalent of f is 1 1 1 1. So till now we have seen that these are the four number systems that are mostly used in the computer. Now next let us see look at something conversions of the binary systems that is from binary to decimal, decimal to binary, binary to octal and all this type of conversions. Now let us look at the number system conversions. So first of all we will try to convert the binary number into a decimal number. So for this we first mark the bit positions and then we give the weight of each bit of the number depending on its position. Then we sum all of the weights of the bits and which will give us the equivalent number. So let us look at an example first. So here we are trying to convert the binary number 1 1 0 1 0 0 to its equivalent decimal number. So here first of all what we will do is we will break up each of these bits and we will add its weight to each of the particular numbers. So now let us look at this example where we are trying to convert this binary number to its decimal equivalent. So if we need to express this we will calculate the weights. For example this 0 it is in the units place. So we will multiply this 0 with 2 to the power 0. Now this is in one's place so we will multiply this 0 with 2 to the power 1. Similarly the 1 will be multiplied with 2 to the power 2. The 0 will be multiplied by 2 to the power 3. The 1 again will be multiplied by 2 to the power 4 and this 2 to the power 5. Now when we calculate the sum of these now these 0's will be equivalent to 0. So we will consider only the ones here. So we will get 1 into 2 to the power 5 plus 1 into 2 to the power 4 plus 1 into 2 to the power 2. So if we calculate it we will get 32 plus 16 plus 4 which will give us a 52 that is the decimal equivalent of this binary number. Now next let us look at the binary to decimal conversion again but with some something that is a fraction that is we will have a decimal part binary to decimal conversions. So now this is our example the binary number is this. Now again for this part we know how to calculate this decimal equivalent. So here we will multiply this 1 with its weight that is 2 to the power 0. Again this 1 to 2 to the power 1 here the 0 with 2 to the power 2 again 1 with 2 to the power 3 1 with 2 to the power 4 and again the last one here 2 to the power 5. So we already know this part from the last example. So now for this part that the decimal part will multiply the first one with 2 to the power minus 1 then the 0 with 2 to the power minus 2 and 1 weighted 2 to the power minus 3 that is the weights are in the negative form here. Now if we calculate it if we sum it up then it will be 32 plus 16 plus 8 plus 0 plus 2 plus 1 and again the decimal part that is this will be 0.5 this will be 0 and again this will be 0.125. Now if we sum it up we will get 59.625 which is the decimal equivalent of this binary number decimal to binary conversions. So learners now we will see how to convert our decimal number to its binary equivalent. So this is a fraction which I have taken so first we will try to convert this 12 to its binary equivalent and then we will look at the 0.75 part. So for 12 what we do is we repeatedly divide this number by 2. Why 2? Because 2 is the base of the binary number and since we are trying to convert it to a binary number so we will divide the number with 2. Now till when do we need to divide till we get a remainder which is not which is not further divisible. Okay so now 2 if we divide if we divide 12 by 2 we will get 6 and the remainder will be 0. We need to keep track of these remainders again 6 again if we divide by 2 we get 3 again 3 if we divide by 2 we get 1. Now from 1 here we are not going to be able to divide it any further. So this 1 we need to add it in the as the MSB of the remainder that is the most significant bit of the remainder. So now this will calculate it in this way that is the binary number 12 will be represented now as 1100 that is here we can see 12 can be represented as 1100 that is we will go from the downward to the upward. Next now let us look at this 0.75 part so for this what we will do now we will multiply this 0.75 by 2. So here we can see 0.75 we have multiplied by 2 so what we have get is 1.50 now this 1 will keep it as a remainder part. So now again this 0.50 will be multiplied by 2. So next time we will get 1.00 now as soon as we get 00 here or till a particular number of decimal places whichever you choose then we can stop this calculation. Since we have got 00 here in the second attempt itself we will stop our calculation here. So now for getting the decimal equivalent of 0.75 we will calculate the we will join the bits in the downward form that is 11. So in this way 0.75 can be represented as 0.11 in its binary equivalent. Now if we combine these two numbers we will get 12.75 is equivalent to 1100 0.11 in its binary equivalent. Octel to decimal conversions. Okay learners so now let us look at octel to decimal conversion. So now here we have taken octel number 153. So to convert it to its decimal equivalent what we will do is we will multiply it every digit with its weighted sum. So now 3 will be multiplied with 8 to the power of 0. Now why 8? Because the base of the octel number system is 8 since there are 8 unique digits in it. Next again 5 will be multiplied by 8 to the power 1 and this 1 will be multiplied by 8 to the power 2. So we will get the equivalent 64, 40 and 3. So we will sum it up and we get 107. So the equivalent of this octel number is 107, 10 in its decimal form. Now let us look at another octel number which has a fraction in it. So now this again this 123 part can be easily done followed by the above procedure. We will multiply 3 with 8 to the power 0, 2 with 8 to the power 1 and 1 with 8 to the power 2. Now for this 0.21 part what we will do likewise we did in the binary number system earlier. We will multiply this 2 with 8 to the power minus 1 and again this 1 with 8 to the power minus 2. So now when we sum it up what we get is 64 plus 16 plus 3 plus the decimal part 0.25 plus 0.156 that is we get 83.2656 that is the decimal equivalent of 123.21 is this octel to binary and binary to octel conversions. So now let us look at octel to binary and then binary to octel conversion. So octel to binary conversion is very simple. We have this octel number and we will represent each of the digits of this octel number by its equivalent binary form. So now for example we have taken the number 124.73. So now 4 has been represented by its binary equivalent 100, 2 by its binary equivalent 010, 1 by its binary equivalent 001, 7 by its binary equivalent 111 and 3 by its binary equivalent 011. So now when we club it we get the binary equivalent of a particular octel number. Now again let us look at binary to octel conversion. So here we have a binary number and we are going to convert it into octel. So for this we need to make a group of three bits. So starting from the decimal point here we will make a group of three. So it will be 110 and again 011 and the last one it will be remain single. Again a group of three for the decimal part as well. We will start from here 111 and again this one will be left alone. So here we have to remember that for making a group for the number part we will start in this way and for making a group here in the fraction part we will go to this time. Now this equivalent is 1, this the equivalent of this octel number is 7. The equivalent of this is 3, the equivalent of 110 is 6 and equivalent of 1 is 1. So we will get a number 163.71. It is hexadecimal to decimal n, decimal to hexadecimal conversions. So learners now we will convert hexadecimal number to its decimal equivalent. So for this we have taken this example 53a 0.0 b4. So now we know the piece of a hexadecimal number is 16. So we will multiply each of this digits weighted 16, weighted corresponding weight. So now 5 it is in the third decimal place. So it will be 16 to the power of 2. 3 will be 3 into 16 to the power of 1. Now a it is in unit place. So the will be 16 to the power of 0. So now here a has been replaced by 10 because the decimal equivalent of a is 10. Again 0 into since this is a decimal part so this will be 0 into 16 to the power minus 1. Again b into 16 to the power minus 2. Now again b has been converted to its decimal equivalent that is 11. Now last 4 into 16 to the power minus 3. So now when we calculate the sum of all these numbers we get 1338 into 40439. That is its decimal equivalent. Now let us again look at decimal to hexadecimal conversion. Now for this we have taken a number 1234 that is a decimal number. Now we need to convert it to a hexadecimal number. Now similar to decimal to binary conversion where we divided the decimal number by 2. Again in octal where we converted divided the decimal number by 8. So here since the base is 16 we will divide the decimal number by 16. So here if we divide 1234 by 16 we get a quotient of 77 and a remainder of 2. Where this is the decimal form and this is the hexadecimal form. So 2 in this hexadecimal form is also represented as 2. Now again 77 it is again divided by 16. So we get the remainder of 4 here when here we get 13. So now this 13 in the hexadecimal form it is again represented as d. So now this 4 since it cannot be divided by any further this is added as the MSP that is the most significant bit of this part. So now this 4 will again be taken as 4 in the hexadecimal stem. So now we read the numbers from down to top. So it will be 4d2. So 1234 in its decimal form it is represented as 4d2 in its hexadecimal form. It is hexadecimal to binary conversions. So learners the last number system conversion that we are going to do now is hexadecimal to binary. So here we can see that we have taken a hexadecimal number 12a point d3. So now we are going to convert this number to its binary equivalent form. So for that we have taken this number 12a.d3. So we are going to convert each of this digits into its equivalent binary form. So 1 will be converted to its binary form again 2 is converted again a is separately converted after the point also d is converted and again 3 is converted. So now the decimal the binary equivalent of 1 is 0001 for 280010 we have taken a group of 4 bits here because the base of hexadecimal number 16 and 16 can be represented as 2 to the power 4. So we need to use a group of 4 bits here. So again a is 1010 d is 1101 and 3 is 0011. So when we club it together we get the equivalent binary representation for this hexadecimal number. So learners today in this video we have learned about the number system. The different types of number system that is the binary number system, the decimal number system, the octal number system and the hexadecimal number system. We have also learned how to convert a number from a particular number system to another number system. For example from a binary number system to its equivalent octal decimal or hexadecimal number system. In the next video we will learn about the binary arithmetic operations that is how to do addition, multiplication, subtraction and division using binary digits. Thank you.