×

Close

- Operating Systems - OS
- Note
- Computer Science Engineering
**7 Views**- Uploaded 10 months ago

Systems I: Computer Organization and Architecture Lecture 12: Floating Point Data Floating Point Representation • Numbers too large for standard integer representations or that have fractional components are usually represented in scientific notation, a form used commonly by scientists and engineers. • Examples: 4.25 × 101 -3.35 × 3 10-3 -1.42 × 102

Normalized Floating Point Numbers • We are most interested in normalized floating-point numbers, a format which includes: – sign – significand (1.0 ≤ Significand < Radix) – integer power of the radix Examples of Normalized Floating Point Numbers These are normalized: • +1.23456789 × 101 • -9.987654321 × 1012 • +5.0 × 100 These are not normalized: • +11.3 × 103 significand > radix • -0.0002 × 107 significand < 1.0 • -4.0 × 10½ exponent not integer

Converting From Binary To Decimal 1.00101 2 = 1 × 20 + 0 × 2-1 + 0 × 2-2 + 1 × 2-3 + 0 × 2-4 + 1 × 2-5 = 1 + 0/2 + 0/4 + 1/8 + 0/16 + 1/32 = 1 + 0.125 + 0.03125 = 1.5625 = 37/32 = 1.5625 Converting From Decimal To Binary Let’s start with 3.4625 × 101 = 34.625 Let’s deal separately with the 34 (which equals 1000102) 2 × .625 = 1.25 (save the integer part) 2 × .25 = 0.5 (no integer part to save) 2 × .50 = 1.00 (save the integer part) Let’s write them left to right in order: 34.625 10 = 100010.1012

Converting From Decimal To Binary – Another Example 1.23125 × 101 = 12.3125 1210 = 11002 2 × .3125 = 0.625 2 × .625 = 1.25 2 × .25 = 0.50 2 × .50 = 1.0 12.3125 10 = 1100.01012 Normalizing Floating Point Data Floating point data is normalized so that there is the significand is always one: 100001.1012 = 1.00001101 × 25 1100.0101 2 = 1.1000101 × 23 Since the most significant bit is always 1, we can assume that it is implied and that we do not actually have to represent it.

## Leave your Comments