EEL 3705 / 3705L Digital Logic Design

Slides:



Advertisements
Similar presentations
CENG536 Computer Engineering department Çankaya University.
Advertisements

Floating Point Numbers
Chapter 5 Floating Point Numbers. Real Numbers l Floating point representation is used whenever the number to be represented is outside the range of integer.
CSE 378 Floating-point1 How to represent real numbers In decimal scientific notation –sign –fraction –base (i.e., 10) to some power Most of the time, usual.
1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:
Quiz 1.1 Convert the following unsigned binary numbers to their decimal equivalent: Number2 Number
Number Systems Lecture 02.
Chapter3 Fixed Point Representation Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
The Binary Number System
Simple Data Type Representation and conversion of numbers
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
Number Systems II Prepared by Dr P Marais (Modified by D Burford)
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
Computer Architecture
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Floating Point Arithmetic
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
Floating Point Arithmetic – Part I
Chapter 9 Computer Arithmetic
MATH Lesson 2 Binary arithmetic.
CHAPTER 5: Representing Numerical Data
Floating Point Numbers
Floating Point Representations
Lecture 6. Fixed and Floating Point Numbers
Department of Computer Science Georgia State University
Fundamentals of Computer Science
Introduction To Computer Science
Computer Architecture & Operations I
Dr. Clincy Professor of CS
Floating Point Numbers: x 10-18
Floating Point Number system corresponding to the decimal notation
April 2006 Saeid Nooshabadi
William Stallings Computer Organization and Architecture 7th Edition
Data Structures Mohammed Thajeel To the second year students
Topic 3d Representation of Real Numbers
Luddy Harrison CS433G Spring 2007
ECE/CS 552: Floating Point
CSCI206 - Computer Organization & Programming
Number Representations
Data Representation Data Types Complements Fixed Point Representation
EEL 3705 / 3705L Digital Logic Design
Computer Science 210 Computer Organization
Dr. Clincy Professor of CS
Arithmetic Logical Unit
How to represent real numbers
How to represent real numbers
ECEG-3202 Computer Architecture and Organization
EEL 3705 / 3705L Digital Logic Design
October 17 Chapter 4 – Floating Point Read 5.1 through 5.3 1/16/2019
Chapter 8 Computer Arithmetic
Numbers representations
Floating Point Numbers
Prof. Giancarlo Succi, Ph.D., P.Eng.
COMS 161 Introduction to Computing
Topic 3d Representation of Real Numbers
CS 286 Computer Architecture & Organization
Chapter3 Fixed Point Representation
Numbers with fractions Could be done in pure binary
Number Representations
Chapter 1 Introduction.
Lecture 9: Shift, Mult, Div Fixed & Floating Point
Presentation transcript:

EEL 3705 / 3705L Digital Logic Design Fall 2006 Instructor: Dr. Michael Frank Lecture Module #5: Radix Number Systems & Arithmetic 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

Fixed-Point and Floating-Point Binary Fractional Numbers Binary Fractions Fixed-Point and Floating-Point Binary Fractional Numbers 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

Radix Fractions In decimal, we write digits after the decimal point to denote coefficients of negative powers of 10. Example: 3.14159 means: 3×100 + 1×10−1 + 4×10−2 + 1×10−3 + 5×10−4 + 9×10−5 By the same token, in any base b, digits after the “radix point” denote coefficients of negative powers of b. General form: dk−1dk−2…d2d1d0.d−1d−2d−3…d−j+1d−j k digits before the radix point j digits after the radix point 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

Fixed-Point Binary Fractions In a fixed-width, fixed-point binary representation of a fractional number, the “binary point” is always implicitly at some predefined location (independent of the data) E.g., suppose it is defined to be in between the first 5 and last 3 bits of an 8-bit word… Then k=5, j=3… The value of the bit pattern shown is then: 8 + 2 + 1 + ½ + 1/8 = 11.62510 0 1 0 1 1 1 0 1 4 3 2 1 −1 −2 −3 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

Fixed-Point Binary Arithmetic Analogous to arithmetic with ordinary decimal fractions. Just like binary integer arithmetic, except that you must align the binary points, and ensure that the radix point of the result is positioned as expected, and round as needed. Example: In k=2,j=2 fixed point, multiply 10.112 × 1.012. 1011 × 0101 1011 0000 1011 110111 round to: 11.102 = 3.510 Decimal equivalent: 2.75 × 1.25 3.4375 round to nearest 0.25 3.5 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

Fixed-Point Two’s Complement Can represent signed fractional numbers using fixed-point two’s complement representation. Just as with integers, the bit in the most significant position (position k−1) represents the coefficient of the highest power of two, 2k−1, except that its value is negative. Arithmetic procedures and overflow conditions are essentially the same as with integer two’s complement. 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

Floating-Point Numbers Similar to scientific notation, but not based on the radix 10… The radix that is standardly used in digital floating-point representations is 2 Advantages include: Precisely handles a wider range of numeric magnitudes. General mathematical form: ±N = ±M × rE M, the mantissa, is a fixed-point number, usually normalized to [0,1). r, the radix, is an implicitly agreed upon constant. E, the exponent, is a signed integer (usu. in biased representation). The fixed point number (dk−1…d0.d−1…d−j)r gets represented in normalized FP as (.dk−1…d0d−1…d−j)×rk. Mantissa signs are usually represented in sign-magnitude form The leading 1 of normalized binary mantissas can be left implicit 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

Simple Floating-Point Example Represent the number −3.2510 as a 10-bit floating-point binary number composed of a sign bit, a 4-bit exponent with a bias of 8, and a 5-bit mantissa with an implicit leading 1. −3.2510 = −11.012 = −.1101×22 Mantissa bits: 10100 (leading 1 is implicit) Biased exponent = 2+8 = 1010 = 10102. Complete representation: 11010101002 sign exp mantissa 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006