1 / 16

Number Systems

Number Systems. Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007. Binary Representations. What kind of numbers do you know how to represent using binary representations?. Fractional Numbers. Fixed-Point Floating-Point.

kosey
Download Presentation

Number Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007

  2. Binary Representations • What kind of numbers do you know how to represent using binary representations?

  3. Fractional Numbers • Fixed-Point • Floating-Point

  4. Fixed-Point Numbers • How do you represent 6.510 using an 8-bit binary representation with 4 integer bits and 4 fraction bits?

  5. Fixed-Point Numbers • How do you represent -6.510 using an 8-bit binary representation with 4 integer bits and 4 fraction bits?

  6. Floating-Point Numbers • Like scientific notation

  7. Floating-Point Numbers • How do you represent the value 22810 using a 32-bit floating point representation?

  8. Floating-Point Numbers

  9. Floating-Point Example • How do you represent the value 5810 using a 32-bit floating point representation?

  10. Floating-Point Numbers: Special Cases • How do you represent the value 0 using IEEE 754 32-bit floating-point notation?

  11. Floating-Point Numbers: Precision • Single-Precision: • 32-bit notation • 1 sign bit, 8 exponent bits, 23 fraction bits • bias = 127 • Double-Precision: • 64-bit notation • 1 sign bit, 11 exponent bits, 52 fraction bits • bias = 1023

  12. Floating-Point Numbers: Rounding • Overflow, Underflow • Rounding modes: • down • up • toward zero • to nearest

  13. Floating-Point Addition • Extract exponent and fraction bits • Prepend leading 1 to form mantissa • Compare exponents • Shift smaller mantissa if necessary • Add mantissas • Normalize mantissa and adjust exponent if necessary • Round result • Assemble exponent and fraction back into floating-point format

  14. Floating-Point Addition: Example Add the following floating-point numbers: 1.510 3.2510 Start by representing the numbers in IEEE 754 single-precision floating-point notation.

  15. Floating-Point Addition: Example

  16. Next Time • Sequential Building Blocks • Memory Arrays

More Related