Outline Introduction Floating Point Arithmetic Adder Multiplier Introduction

  • Slides: 17
Download presentation

Outline • Introduction • Floating Point Arithmetic Ø Adder Ø Multiplier

Outline • Introduction • Floating Point Arithmetic Ø Adder Ø Multiplier

Introduction • Floating point numbers are one possible way of representing real numbers in

Introduction • Floating point numbers are one possible way of representing real numbers in binary format. • The IEEE 754 standard presents two different formats: 1. Binary interchange format 2. Decimal interchange format. • Where we require this? Multiplying floating point numbers is a critical requirement for DSP applications involving large dynamic range.

The IEEE Floating-Point Standard Representation of a real number in floating point format :

The IEEE Floating-Point Standard Representation of a real number in floating point format :

Flow Chart *

Flow Chart *

Example • Addition of two 5 -digit Binary Floating Point numbers: • Step 1:

Example • Addition of two 5 -digit Binary Floating Point numbers: • Step 1: Get the number with the larger exponent and subtract it from the smaller exponent. e. L = 24, e. S = 22 , so difference = 4 -2 = 2

 • Step 2: Shift the fraction with the smaller exponent different positions to

• Step 2: Shift the fraction with the smaller exponent different positions to the right. We can now leave out the exponent since they are both equal. This gives us the following:

 • Step 3: Add both the fractions • Step 4: Round-to-nearest-even 1. 1110

• Step 3: Add both the fractions • Step 4: Round-to-nearest-even 1. 1110 • Result: 24 × 1. 1110

Adder Circuit

Adder Circuit

Flow Chart

Flow Chart

Block Diagram

Block Diagram

Example • Multiplication of two 5 -digit Floating Point numbers: A = 0 10000100

Example • Multiplication of two 5 -digit Floating Point numbers: A = 0 10000100 = 40, B = 1 10000001 1110 = -7. 5 • Step 1: Multiply the significands • Step 2: Place the decimal point: 10. 01011000

 • Step 3: Adding the exponents i. e. (E 1 + E 2

• Step 3: Adding the exponents i. e. (E 1 + E 2 – Bias) • Step 4: Obtain the sign bit and put the result together. 1 10000110 10. 01011000

 • Step 5: Normalize the result 1 10000110 10. 01011000 (before normalizing) 1

• Step 5: Normalize the result 1 10000110 10. 01011000 (before normalizing) 1 10000111 1. 001011000 (normalized) • Result: 1 10000111 00101100 (before rounding) 1 10000111 0010 (rounding)