 Hello everyone, this is Vishwana Chauhan, Assistant Professor, Department of Computer Science and Engineering, Valchan Institute of Technology, Solapur. Now I am here to explain IEEE standard for floating point number. At the end of this session, the students will be able to understand how to represent single precision format and double precision format according to IEEE standard. And they can make the difference between single precision and double precision. So let us see both single and double precision format. Single precision format is having 32 bit width. So these 32 bit width is divided into three parts. One first one is sine, second one is exponent and third one is fraction. The sine is having one bit, exponent is having 8 bit width, fraction is having 23 bits. Coming to double precision format whose width is 64 bit, divided into three parts, sine 1 bit, exponent 11 bit, fraction 52 bits. So these are the two formats to represent the number. Pause the video, think and write the answer for this question. The question is differentiate single precision and double precision format. I hope you have answered for this question. Let us see the difference. In case of single precision format, the width is 32 bit and in case of double precision format, the width is 64 bit. Single precision format is having 8 bit exponent width, double precision format is having 11 bit exponent width. Coming to fraction, single precision is having 23 bit fraction, double precision is having 52 bit. Now let us see how to represent a floating point number in single precision format. We are already familiar with the format of single precision, which includes sine, exponent and fraction. Let us see one example plus 12.375. So this is a positive number. So here the sine becomes 0. So 12.375 which can be represented as 12 plus 0.375. So whose binary equivalent value 1100 plus 0.011. 0.011 is equivalent binary value of 0.375. So ultimately it becomes 1100.011. So this number, now we have to represent in single precision format. So according to IEEE standard, we need to shift this point in such a way that it should appear immediately after the binary one value. Now at the left side, we will see two binary values. Now we need to put this point so that it appears after binary one immediately. So which makes 1.1000011 into 2 to the power plus 3. So in this example, we are having binary one values as left side of this point. If let us consider if there is an example in which if we found that all these four digits are 0, then we need to put this binary point value towards right side in such a way that it appears after binary one. Now we will focus on how to represent this in single precision format. Here the exponent is plus 3 and fraction is 1000011. So exponent width according to single precision format, it is 8 bit. In the sense that 2 raise to 8 which is equal to 256 different numbers can be represented. So these 256 numbers varies from 0 to 255. So this range is divided into two halves. One is for negative exponent range and second half is for positive exponent range. The negative exponent range varies from 0 to 126. That is minus 127 to minus 1. Exponents can be represented respectively. Similarly for positive exponent range it is 127 to 255. In the sense that 0 to 128 respectively. Which makes 0 is a standard reference whose equivalent value is 127. If exponent is 0, we need to write the binary equivalent value of 127 in the single precision format as a part of exponent. So in this example the exponent is plus 3 that is 130. Because the 0 exponent is 127 plus 3 indicates 127 plus 3 which makes 130 whose binary value is 1000010. So which is an exponent part. Now according to the format of single precision format, these 8 bits is a part of exponent. So which can be represented here as a 8 bit value. And 1 bit value which is sine. That is since it is a positive number this bit is 0. Coming to fraction part. So in the example here the fraction is 1000011. So this fraction is represented in this field. Appending all 0 so that it makes 23 bits. This is about representation of a given number in single precision format. So let us see how to represent the given floating point number in double precision format. We will take the same example. Now this is the double precision format which includes sine exponent and fraction bits. Let us see plus 12.375 which is equal to 12 plus 0.375 whose binary value is 1100 plus 0.011 which makes 1100.011. So we need to adjust this point so that it appears immediately after binary one value. So which makes 1000011 into 2 to the power plus 3. So here plus 3 is the exponent. So we will see how to represent this in double precision format. Since the width of exponent is 11 bit which makes 2 raise to 112048 different numbers can be represented. That is from 0 to 2047. So this range is divided into two equal half parts. One for negative exponent second is for positive exponent. For negative it is from 0 to 1022 that is minus 10242 minus 1 respectively. For positive 1023 to 2047 that is 0 to 2047 respectively. So if exponent is 0 then which is 1023 number is taken for reference to represent exponent. In this example the exponent is plus 3. So that is 1023 plus 10 plus 3 which makes 1023 whose binary value is 10011. So here this is the format. Since it is a plus sign is 0 it is equivalent 11 bit field next fraction 52. These are the references. Thank you.