Presentation is loading. Please wait.

Presentation is loading. Please wait.

EEL 3705 / 3705L Digital Logic Design

Similar presentations


Presentation on theme: "EEL 3705 / 3705L Digital Logic Design"— Presentation transcript:

1 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

2 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

3 Radix Fractions In decimal, we write digits after the decimal point to denote coefficients of negative powers of 10. Example: means: 3× ×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

4 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: ½ + 1/8 = 4 3 2 1 −1 −2 −3 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

5 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 × 1011 × 0101 round to: = 3.510 Decimal equivalent: 2.75 × round to nearest 0.25 3.5 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006

6 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

7 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

8 Simple Floating-Point Example
Represent the number − 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. − = − = −.1101×22 Mantissa bits: (leading 1 is implicit) Biased exponent = 2+8 = 1010 = Complete representation: sign exp mantissa 11/20/2018 M. Frank, EEL3705 Digital Logic, Fall 2006


Download ppt "EEL 3705 / 3705L Digital Logic Design"

Similar presentations


Ads by Google