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

Slides:



Advertisements
Similar presentations
Computer Organization and Architecture Tutorial 6 Kenneth Lee.
Advertisements

Fixed Point Numbers The binary integer arithmetic you are used to is known by the more general term of Fixed Point arithmetic. Fixed Point means that we.
CSCE 212 Chapter 3: Arithmetic for Computers Instructor: Jason D. Bakos.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
©Brooks/Cole, 2003 Chapter 4 Operations on Bits. ©Brooks/Cole, 2003 Apply arithmetic operations on bits when the integer is represented in two’s complement.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
COMP3221: Microprocessors and Embedded Systems Lecture 14: Floating Point Numbers Lecturer: Hui Wu Session 2, 2004.
Logic Circuits Another look at Floating Point Numbers Common Combinational Logic Circuits Timing Sequential Circuits Note: Multiplication & Division in.
ASCII Code Table (7 bit) UNICODE (16 bit) - UTF-8 provides a 16 bit superset of ASCII.
TCSS 371A Machine Organization. Getting Started Get acquainted (take pictures) Discuss purpose, scope, and expectations of the course Discuss personal.
TCSS 371A Machine Organization. Getting Started Get acquainted Review syllabus Understand purpose, scope, and expectations of the course Discuss personal.
Number Systems Standard positional representation of numbers:
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
Major Numeric Data Types Unsigned Integers Signed Integers Alphanumeric Data – ASCII & UNICODE Floating Point Numbers.
TCSS 371A Machine Organization. Getting Started Get acquainted (take pictures) Discuss purpose, scope, and expectations of the course Discuss personal.
1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:
Representation and Conversion of Numeric Types 4 We have seen multiple data types that C provides for numbers: int and double 4 What differences are there.
Operations on data CHAPTER 4.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 2 Bits, Data Types & Operations Integer Representation Floating-point Representation.
Simple Data Type Representation and conversion of numbers
Computer Architecture Lecture 3: Logical circuits, computer arithmetics Piotr Bilski.
Number Systems II Prepared by Dr P Marais (Modified by D Burford)
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
Computing Systems Basic arithmetic for computers.
Computer Architecture
Binary Arithmetic & Data representation
COMPSCI 210 Semester Tutorial 1
Data Representation in Computer Systems
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
07/19/2005 Arithmetic / Logic Unit – ALU Design Presentation F CSE : Introduction to Computer Architecture Slides by Gojko Babić.
9.4 FLOATING-POINT REPRESENTATION
Figure 1.1 Block diagram of a digital computer. Functional Units.
Floating Point Arithmetic
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Floating Point Representation.
©Brooks/Cole, 2003 Chapter 4 Operations on Bits. ©Brooks/Cole, 2003 Apply arithmetic operations on bits when the integer is represented in two’s complement.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Floating Point Arithmetic
1 Floating Point Operations - Part II. Multiplication Do unsigned multiplication on the mantissas including the hidden bits Do unsigned multiplication.
Integer and Fixed Point P & H: Chapter 3
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
Binary Arithmetic.
Number Representation and Arithmetic Circuits
Lecture 2 Number Representation, Overflow and Logic Topics Adders Math Behind Excess-3 Overflow Unsigned, signed-magnitude Two’s Complement Gray Code Boolean.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
Chapter 4 Operations on Bits. Apply arithmetic operations on bits when the integer is represented in two’s complement. Apply logical operations on bits.
COSC2410: LAB 2 BINARY ARITHMETIC SIGNED NUMBERS FLOATING POINT REPRESENTATION BOOLEAN ALGEBRA 1.
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
Floating Point Arithmetic – Part I
Floating Point Representations
Programming and Data Structure
Binary Numbers The arithmetic used by computers differs in some ways from that used by people. Computers perform operations on numbers with finite and.
Chapter 4 Operations on Bits.
Floating Point Number system corresponding to the decimal notation
IEEE floating point format
Chapter 6 Floating Point
Topic 3d Representation of Real Numbers
Chapter 2 Bits, Data Types & Operations Integer Representation
Number Representations
Floating Point Arithmetic
Overview Fractions & Sign Extension Floating Point Representations
靜夜思 床前明月光, 疑是地上霜。 舉頭望明月, 低頭思故鄉。 ~ 李白 李商隱.
Number Representations
Floating Point Arithmetic
Lecture 9: Shift, Mult, Div Fixed & Floating Point
Presentation transcript:

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

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?)

Signed Binary Integers:

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

Floating Point Numbers Example: x Sign Fraction Exponent

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

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

2’s Complement Sign Extention Positive numbers Negative numbers

2’s Complement Arithmetic Addition Subtraction Multiplication, Division ?

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

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

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

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