Presentation is loading. Please wait.

Presentation is loading. Please wait.

Major Numeric Data Types Unsigned Integers Signed Integer Alphanumeric Data – ASCII & UNICODE Floating Point Numbers.

Similar presentations


Presentation on theme: "Major Numeric Data Types Unsigned Integers Signed Integer Alphanumeric Data – ASCII & UNICODE Floating Point Numbers."— Presentation transcript:

1 Major Numeric Data Types Unsigned Integers Signed Integer Alphanumeric Data – ASCII & UNICODE Floating Point Numbers

2 Become proficient with binary number representation Unsigned binary Integers Signed Binary Integers (see Text Figure 2.1) 1’s Complement Binary Integers 2’s complement Binary Integers The binary point (what does it mean?)

3 Signed Binary Integers:

4 ASCII Code Table (7 bit) UNICODE (16 bit) - UTF-8 provides a 16 bit superset of ASCII

5 Floating Point Numbers Example: -56.67534 x 10 -5 Sign Fraction Exponent

6 Single Precision Floating Point Numbers IEEE Standard Single Precision Floating Point Numbers are 32 bits long: S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF Sign – 1 bit Exponent – 8 bits Fraction – 23 bits The value V: If E=255 and F is nonzero, then V= NaN ("Not a number") If E=255 and F is zero and S is 1, then V= - Infinity If E=255 and F is zero and S is 0, then V= Infinity If 0<E<255 then V= (-1)**S * 2 ** (E-127) * (1.F) If E=0 and F is nonzero, then V= (-1)**S * 2 ** (-126) * (0.F) ("unnormalized" values”) If E=0 and F is zero and S is 1, then V= - 0 If E=0 and F is zero and S is 0, then V = 0

7 Double Precision Floating Point Numbers IEEE Standard Double Precision Floating Point Numbers are 64 bits long: S EEEEEEEEEEE FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Sign – 1 bit Exponent – 11 bits Fraction – 52 bits The value V: If E=2047 and F is nonzero, then V= NaN ("Not a number") If E=2047 and F is zero and S is 1, then V= - Infinity If E=2047 and F is zero and S is 0, then V= Infinity If 0<E<2047 then V= (-1)**S * 2 ** (E-1023) * (1.F) If E=0 and F is nonzero, then V= (-1)**S * 2 ** (-1022) * (0.F) ("unnormalized" values) If E=0 and F is zero and S is 1, then V= - 0 If E=0 and F is zero and S is 0, then V= 0

8 2’s Complement Sign Extention Positive numbers Negative numbers

9 2’s Complement Arithmetic Addition Subtraction Multiplication, Division ?

10 Round off Errors Errors due to inherent imprecision of computers / computation

11 Overflow Adding two numbers which results In a sum that is too large to store: A + B A - B

12 Underflow A calculation in floating point that results in an intermediate result that is essentially zero.

13 Binary Logic AND OR NOT NAND NOR XOR Truth tables DeMorgan’s Theorem Bit vectors


Download ppt "Major Numeric Data Types Unsigned Integers Signed Integer Alphanumeric Data – ASCII & UNICODE Floating Point Numbers."

Similar presentations


Ads by Google