0% found this document useful (0 votes)
44 views21 pages

Chapter 2-Part 4

The document discusses how floating point numbers are stored and represented using the IEEE 754 single-precision format, which uses 32 bits. It explains that the format consists of a sign bit, 8 bits for the biased exponent, and 23 bits for the mantissa. Examples are provided of how to convert decimal numbers to their hexadecimal IEEE 754 single-precision representation, and vice versa. Practice questions and solutions demonstrate how to perform these conversions step-by-step according to the standard.

Uploaded by

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

Chapter 2-Part 4

The document discusses how floating point numbers are stored and represented using the IEEE 754 single-precision format, which uses 32 bits. It explains that the format consists of a sign bit, 8 bits for the biased exponent, and 23 bits for the mantissa. Examples are provided of how to convert decimal numbers to their hexadecimal IEEE 754 single-precision representation, and vice versa. Practice questions and solutions demonstrate how to perform these conversions step-by-step according to the standard.

Uploaded by

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

CHAPTER 2(PART 4)

IEEE SINGLE PRECISION FORMAT

EDITED BY SALEHAH HAMZAH


FACULTY OF COMPUTER AND MATHEMMATICAL SCIENCES
UITM MELAKA KAMPUS JASIN
FLOATING POINT NUMBER
• CPU consists of ALU and FPU to process numbers
• FPU is a co processor which process the floating point
number.
• To represent the floating point number , it follows the
guideline from IEEE754 standard by IEEE researchers
• IEEE 754 consists of single precision IEEE (32 bit) ,
double precision IEEE (64bit)
STORING FLOATING POINT NUMBER USING IEEE 754
SINGLE PRECISION FORMAT

  Given example of floating point number in binary


1101100111010.11101
It will be written as normalize binary number as 1.MMMM x 2e
where
M is mantissa value and e is exponent value.
Thus 110110011101.11101 will be store as 1.1011001110111101 x 211

This normalize number will be read as floating point number using IEEE single precision
format which is 32 bit binary
STORING FLOATING POINT NUMBER USING IEEE 754
SINGLE PRECISION FORMAT

• There are two steps to read and store floating point number
using IEEE single precision format (32 bit) in computer
• Step 1: Storing decimal number as floating point number in
hexadecimal form
• Step 2 : Extracting floating point number in hexadecimal as
decimal number
EXAMPLE
How to store a decimal number to hexadecimal form
using IEEE single precision format ?

Assume a decimal number to be stored is 100.625


SOLUTION
• Step 1 : Convert into binary.
• 100.625d = 1100100.101

• Step 1.1 : normalize the number as 1.MMMMx 2^e


• = 1.100100101 x 2^6 ; e=6

• Step 1.2 : Extract the significand and mantissa value


• Significand = 1.100100101; Mantissa =100100101
SOLUTION

• Step 2 : Calculate biased exponent


• Unsigned number smallest 0 , largest 255
• The value e = 6; 8 bit signed number is 127 ,smallest
number -128 BE = 127 + (6) = 133
• Convert 133 into binary 8 bit = 1000 0101
SOLUTION
• Step 3 : Combine all elements in IEEE table
• BE = 133;10000101; Mantissa 100100101; sign =0

Sign(S) BE 8 bit Mantissa(M) 23


1 1----------------8 9-------------------------------------31
 0  10000101  100100101 00000000000000
SOLUTION

• Step 4 : Convert into hexadecimal number

• 100.625d = 0100 0010 1 100 1001 0100 0000 0000 0000

0 100 0010 1 100 1001 0100 0000 0000 0000


4 2 C 9 4 0 0 0
QUESTION 1A

Assume a number given to calculate is


-180.37510

Convert the number into hexadecimal form using


IEEE single precision format.
Ans : C3346000 exp = 7 BE = 134
QUESTION 1B

Assume a number given to calculate is


+644.12510
sign bit = 0
Convert the number into hexadecimal form using
IEEE single precision format.
Ans: 44210800 exp =9 ;BE 136
QUESTION 1C

Assume a number given to calculate is


-299.3125
sign bit = 1
Convert the number into hexadecimal form using
IEEE single precision format.
Ans : C395A800 exp =8 ;BE = 135
CHAPTER 2(PART 4B)
QUESTION 2

How to use IEEE Single Precision Format to convert


hexadecimal number into decimal number?

Assume given a hexadecimal number to be


converted is 431E8000h using IEEE format.
SOLUTION
• Step 1 : Convert 431E89000h into 32 bit binary
4 3 1 E 8 0 0 0
0 100 0011 0 001 1110 1000 0000 0000 0000

• Step 2 : Read as IEEE single precision format


Sign(S) (BE) Mantissa(M)
1----------------8 9--------------------------------------------31
0 10000110 0011110100000000000000
SOLUTION
• Step 3 : Extract the exponent,mantissa, sign

• BE = 100001102 = 134 ; e = 134 – 127 = 7


• Mantissa = 00111101; sign = +
• 1. MMMM X 2^e
SOLUTION
• Step 4 : Normalize the number

• BE = 100001102 = 134 ; e = 134 – 127 = 7


• Mantissa = 00111101; sign = +
• Put 1 as leading bit of mantissa
• Normalize number = 1.00111101 x 2^7
SOLUTION
• Step 5 : Convert into decimal number

• From 1.00111101 x 2^7 = 158.50


= 10011110. 1 x 2^0 x
• = 158. 5010
QUESTION 2B

Assume a hexadecimal number given is


4305F000h

Convert the number into decimal form using IEEE


single precision format.
Ans: 133.9375d exp 7
QUESTION 2C

Assume a hexadecimal number given is


C3C86000H =
1100 0011 1100 1000 0110 0000 0000 0000

Convert the number into decimal form using IEEE


single precision format.
Ans: -400.75
QUESTION 2D

Assume a hexadecimal number given is


C47AA000h

Convert the number into decimal form using IEEE


single precision format.
Ans: -1002.50

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy