You are on page 1of 1

CMP-140 Programming Fundamentals

BS SE/CS Fall 2018 Issue Date: 11-Mar-2019


Practice - 09

Objective:
• To get to know about floating point number representation in computer and its issues
related to floating point numbers manipulation.

It is unthinkable that computer science undergraduate doesn’t know about IEEE-754 format (Single
Precision i.e. float (32 bit) in C/C++) and double precision i.e. double (64 bit).
Please go through the all three links and have a basic understanding of the concept. I am not
expecting a 100% concept clarity from you guys but an initial reading/effort for a couple of hours
should give you basic understanding, which will help us to discuss together about the issues related to
floating point operations.
The first link will help you understand the single precision format. It is recommended to go through the
examples of converting a floating-point value into 32-bit pattern and vice versa given on the
webpage.
The second and third link is a web program, which implements the theory of single precision format. It
will help you to verify your conversion examples.

Link 1: https://en.wikipedia.org/wiki/Single-precision_floating-point_format

Link 2: http://www.h-schmidt.net/FloatConverter/IEEE754.html

Link 3: http://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html

PUCIT, University of the Punjab, Lahore, Pakistan. Page 1 of 1


© Fareed Ul Hassan Baig

You might also like