0% found this document useful (0 votes)
15 views4 pages

bc240219177 CS302 Assignment

This document provides a detailed solution for converting a 32-bit binary floating-point number, 11000100110110101011010111000111, into its decimal equivalent using the IEEE 754 single-precision format. The conversion process includes breaking down the number into its sign, exponent, and mantissa, followed by calculations to derive the final decimal value. The final result of the conversion is -1751.5.

Uploaded by

mdanish90454
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

bc240219177 CS302 Assignment

This document provides a detailed solution for converting a 32-bit binary floating-point number, 11000100110110101011010111000111, into its decimal equivalent using the IEEE 754 single-precision format. The conversion process includes breaking down the number into its sign, exponent, and mantissa, followed by calculations to derive the final decimal value. The final result of the conversion is -1751.5.

Uploaded by

mdanish90454
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Digital Logic Design (CS302)

Assignment # 01
BC240219177

Question#1 Solution:

11000100110110101011010111000111.
Convert the following 32-Bit Binary Floating-Point Number into a Decimal Number.

To convert the 32-bit binary floating-point number


11000100110110101011010111000111 into its decimal equivalent, we need to
follow the IEEE 754 single-precision floating-point format.
IEEE 754 Single-Precision Format Breakdown:
 1 bit for the sign (S)
 8 bits for the exponent (E)
 23 bits for the fraction (mantissa) (M)
Given Number:
11000100110110101011010111000111
This is a 32-bit number, so we will break it down into its parts:
 Sign bit (S): 1
 Exponent bits (E): 10001001
 Mantissa bits (M): 10110101011010111000111

Step-by-Step Conversion:
1. Sign (S):
 The sign bit S = 1, so the number is negative.
2. Exponent (E):
 The exponent is given by the 8 bits 10001001. First, convert it to decimal:
100010012
= 1 * 2 7+ 0 * 2 6 + 0 * 2 5 + 0 * 2 4 + 1 * 2 3 + 0 * 2 2 + 0 * 2 1 + 1 * 2 0
= 128 + 0 + 0 + 0 + 8 + 0 + 0 + 1
= 137
100010012=13710
The exponent in IEEE 754 is stored with a bias of 127. So, we subtract 127 from
the exponent value to get the actual exponent:
137−127=10
Therefore, the exponent E = 10.
3. Mantissa (M):
10110101011010111000111

In IEEE 754 format, the mantissa (or fraction) is assumed to have an implicit
leading 1 in normalized form. So, we can write the mantissa as:

1.10110101011010111000111

Convert 1.10110101011010111000111 to decimal

The integer part is 1

For the fractional part 10110101011010111000111, we interpret each binary digit


after the decimal point as a negative power of 2:

Now, convert this binary number to decimal:


1.101101010110101110001112
= 1 * 2-1 + 0 * 2-2 + 1 * 2-3 + 1 * 2-4 + 0 * 2-5 + 1 * 2-6 + 0 * 2-7 + 1 * 2-8 + 0 * 2-9 + 1 * 2-
10
+ 1 * 2-11 + 0 * 2-12 + 1 * 2-13 + 0 * 2-14 + 1 * 2-15 + 1 * 2-16 + 1 * 2-17 + 0 * 2-18 + 0 * 2-
19
+ 0 * 2-20 + 1 * 2-21 + 1 2-22 + 1 2-23
=0.5 + 0 + 0.125 + 0.0625 + 0 + 0.0156 + 0 + 0.0039 + 0 + 0.0009 + 0.0004 + 0 +
0.0001 + 0 + 0.00003 +0.00001 + 0.000007 + 0 + 0 + 0 + 0 + 0 + 0
=0.7109375
So, the mantissa in decimal is:
Integer Part + Fractional Part
1 + 0.7109375
1.7109375 (approximately)
4. Final Calculation:
Now we can calculate the decimal value using the formula for IEEE 754
representation:
(−1) S × 1.M × 2E
Substitute the values we have:
(−1)1 × 1.7109375 × 210
Since the sign bit is 1, the result is negative:
−1.7109375 × 1024 = −1751.5
Final Answer:
The decimal equivalent of the 32-bit binary floating-point number
11000100110110101011010111000111 is -1751.5.

You might also like