Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


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

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

2 Signed Binary Integers:

3 2’s Complement Arithmetic Addition Subtraction Multiplication, Division

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

5 Alphanumeric Data Representation: ASCII Code Table (7 bit) Packed? Unpacked? UNICODE (16 bit) - UTF-8 provides a 16 bit superset of ASCII

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

7 Single Precision Floating Point Numbers IEEE Standard 32 bit Single Precision Floating Point Numbers are stored as: S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF S: Sign – 1 bit E: Exponent – 8 bits F: 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) (exponent range = -127 to +128) 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 Note: 255 decimal = 11111111 in binary (8 bits)

8 Double Precision Floating Point Numbers IEEE Standard 64 bit Double Precision Floating Point Numbers are stored as: S EEEEEEEEEEE FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF S: Sign – 1 bit E: Exponent – 11 bits F: 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) (exponent range = -1023 to +1024) 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 Note: 2047 decimal = 11111111111 in binary (11 bits)

9 Underflow A calculation in floating point that results in a result that is “essentially” zero, i.e. too small to represent in floating point notation.

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

11 Chapter 3 Digital Logic Structures The Transistor CMOS Devices Implementing Logic with CMOS Devices Combinational Logic Circuits Decoders Mux’s Full Adder PLA’s

12 Introduction to MOS MOS = Metal Oxide Semiconductor technology NMOS =N-Type MOS device (N Channel transistor) PMOS = P-Type MOS device (P Channel transistor) CMOS = Complementary MOS device N-type MOS: 2.5 to 5 volt supply (battery) ground A logic 1 (battery voltage) on the “Gate” turns on the light

13 Basic Logic Gate Symbols

14 N-Type MOS Devices

15 P-Type MOS Devices

16 CMOS Device - Inverter p channel device n channel device CMOS Inverter 3-5 volts

17 CMOS NOR Gate NOR Gate

18 CMOS OR Gate OR Gate

19 CMOS AND Gate AND Gate

20 Basic Logic Gate Symbols Note: NAND and NOR gates are “universal” gates. AND, OR, NOT gates can all be created by either NAND or NOR gates.

21 DeMorgan’s Theorem/Law (NOT A) and (NOT B) = NOT (A or B) (NOT A) or (NOT B) = NOT (A and B) Prove DeMorgan’s with truth tables A or B = NOT( (NOT A) and (NOT B) ) NOT (A or B) = (NOT A) and (NOT B)


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

Similar presentations


Ads by Google