**MASTER OF COMPUTER APPLICATIONS**

Course Code : MCS-012

Course Title : Computer Organisation and Assembly Language Programming

Assignment Number : MCA (2)/012/Assign /2014-15

Maximum Marks : 100

Weightage : 25%

**Explain the single precision floating point single IEEE 754 representation. Represent the number (63.125) _{10} using IEEE 754 single precision and double precision representations.**

**Single Precision**

S stands for ** Sign **(white color)

E stands for ** Exponent **(yellow color)

N stands for ** Number (**also called

**or**

*Mantissa***(green color)**

*Significand)*

** 0^{th}**is Sign bit (1 bit)

** 1^{st }to 8^{th}**is Exponent bits (7 bits)

*9 ^{th}*

**is Exponent bits (24 bits)**

*to 31*^{th}**Double Precision**

S stands for ** Sign **(white color)

E stands for ** Exponent **(yellow color)

N stands for ** Number (**also called

**or**

*Mantissa***(green color)**

*Significand)*

** 0^{th}**is Sign bit (1 bit)

** 1^{st }to 11^{th}**is Exponent bits (10 bits)

*12 ^{th}*

**is Exponent bits (53 bits)**

*to 63*^{th}

First of all to represent we have (63.125)_{10} using IEEE 754

Since number is a ** positive** number

Sign bit is: 0

0 |

Now let’s work on Mantissa part

Convert 63 into binary form *i.e* 11111

Remaining is fraction part 0.125

Now we multiply fraction value with 2 till we get whole number 1 at the end.

We reach 1 so we stop

Write number from top to bottom

We get 0.125 = 001

Number (63.125)_{10 }= (11111.001)_{2}

Convert Binary number to Exponent Form

**11111.001 **Will be *1.1111001 * 2 ^{4}*

Discard 1.

Take ** 1111001** as Significand

Significand number _{=} (1111001)_{2}

Significand bits are:

1 | 1 | 1 | 1 | 0 | 0 | 1 |

Fill the Significand in the beginning

Rest all fills it with 0’s

We will have

Significand bits are:

1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

+4 is the Exponent

So we have to subtract it with 127

Exponent = 127+4=130

Exponent number (130)_{10 }= (10000010)_{2}

Discard overflow bit

Exponent bits are:

0 | 0 | 0 | 0 | 0 | 1 | 0 |

* *

*Note: we have to discard overflow bit since we have only 7 bits*

*For Double Precision Only Exponent*

+4 is the Exponent

So we have to subtract it with 1023

Exponent = 1023+4=1027

Exponent number (1027)_{10 }= (10000000011)_{2}

Discard overflow bit

Exponent bits are:

0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |

*Note: we have to discard overflow bit since we have only 11 bits*

Significand bits are:

1 | 1 | 1 | 1 | 0 | 0 | 1 |

Significand will ** only** have a change in terms of

**which are added at the end.**

*Zero’s*For single precision **23-7=16** *Zero’s*

For double precision **53-7=46** *Zero’s*