 Hello everyone. This is Vishwanath Chauhan, assistant professor from the CAC department, Walchand Institute of Technology, Solapur. Now I am here to explain the concept of floating point arithmetic. At the end of this session, students will be able to solve the arithmetic operations on floating point numbers. So we will see the different operations. There are very few standard arithmetic operations such as addition, subtraction, multiplication, division, comparison, square root, etc. In today's session, we will focus on addition, subtraction, multiplication, and division. So let us see the formulas. For addition, if you take two numbers x and y, then x plus y is equal to xm into 2 raised to xc minus y plus ym, close the bracket, into 2 raised to y, where the xm indicates mantessa and xc indicates the respective exponent. Similarly for subtraction, x minus y is equal to into bracket xm into 2 raised to xc minus y minus ym, close the bracket, into 2 raised to y. For multiplication, x into y is equal to xm into ym into 2 raised to xc plus y. And for division, x divided by y is equal to xm divided by xm into 2 raised to xc minus y. So where x and y are two floating point numbers, xm and ym are respective mantissa, xc and y are respective exponent. Now we will see the addition. x plus y are the two numbers, we need to find the sum of two numbers. Let us consider x is equal to plus 12.375 and y is equal to plus 54.125. If we represent the plus 12.375 in binary, then it becomes 1100.011, which is equal to 110011 to the base 2 into 2 raised to 3, which is in the form of xm into 2 raised to xc, where xm is nothing but 110011, which is equal to 99 in decimal and xc exponent of x, which is equal to minus 3. For second number plus 54.125, in terms of binary, it is 11001100.001 to the base 2, which is equal to 110011001 to the base 2 into 2 raised to minus 3, which is equal to ym into 2 raised to y, where ym is equal to 110011001, which is equal to 433 and y is equal to minus 3. Now, the sum of x and y, which is equal to, according to the above formula, substitute the respective values xm, xc, ym and y in this formula will get 66.5, but here the condition is that xc should be less than or is equal to y, is fe floating point addition associative? To answer for this question, now we will see the associative law. According to this law for addition, it should be equal to like this, a plus into bracket b plus c is equal to into bracket a plus b, close the bracket plus c. If these two values are matching, then we will see that it is associative. Let us consider a number a is equal to minus 2.7 into 10 to the power 23, b is equal to 2.7 into 10 to the power 23 and c is equal to 1.0. So left hand side, a plus into bracket b plus c is equal to minus 2.7 into 10 to the power 23 plus into bracket 2.7 into 10 to the power 23 plus 1.0 close the bracket, which leads to 0.0. This is left side. So according to this formula, let us find out right side value, which is into bracket a plus b, close the bracket plus c, which is equal to minus 2.7 into 10 to the power 23 plus 2.7 into 10 to the power 23, close the bracket plus 1.0, which leads to 1.0. Now the left hand side value is 0.0 and right side value is 1.0. They are not equal and hence this is not an associative. Let us see subtraction x minus y, xm into 2 to the power xc minus y, minus ym close the bracket 2 to the power y. So where xc is less than y. So let us consider the same example as that we have taken in addition. X is equal to plus 12.375. So this number is written in binary as 1100011 into 2 to the power minus 3. So which is equal to xm into 2 raise to xc, where xm is equal to 99 and xc is equal to minus 3. So we require these two values to put in this formula. Similarly for y variable, we have taken it as a 54.125, which is equal to 110011001 into 2 to the power minus 3. So here ym is 433, y is minus 3. So if we substitute all four values xm, xc, ym and y in the above formula will get x minus y is equal to minus 41.75. Pause this video, think and write the answer for this question. Find the mantissa and exponents of the following number plus 10.375. I hope you have worked out. So the mantissa is 83 and the exponent is minus 3. You will see the multiplication. So already we know this formula will take same example as that of previous one. So according to that, if we substitute the respective values in the formula, we will get x into y is equal to 669.79. For division x divided by y, substitute the same values in the above equation, we will get x divided by y is equal to 0.2286, floating point instructions. So there are a few floating point instructions. According to the assumption, there is one architecture which includes 80 bit stack registers and these are 80 numbers like st0, 1, 2, 3. We will see the floating point operations push which push and pop which is required to perform the operations. So these are the different instructions push and pop, FLD, FSTP which is push and pop concerned with floating point operation. FILD, FIR, STP are concerned with push and pop for integer data. Arithmetic operations like F addition, F subtraction, F multiplication, F division. These are the respective description for addition, subtraction, multiplication and division. Now third type of instruction trigonometry like F sign, cosine, tangent and this is for pi. So all these are having the respective values. These are the references. Thank you.