Chapter 4 Number Representations

Size: px
Start display at page:

Download "Chapter 4 Number Representations"

Transcription

1 Chapter 4 Number Representations SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 9, 2016

2 Table of Contents 1 Fundamentals 2 Signed Numbers 3 Fixed-Point Numbers 4 Floating Point

3 Taxonomy of Number Systems Numbers Integers Reals Unsigned Signed Fixed Point Floating Point Signed- Magnitude Ones' Complement Two's Complement

4 Integers Number of bits Number of values Machine 4 16 Intel , PDP11, 8086, , VAX11, IEEE single Unisys Cray, IEEE double

5 Integers Value for integer bit pattern: Example : V unsigned = N 1 i=0 b i 2 i = = 22 10

6 Signed-Magnitude Value for N-bit signed-magnitude pattern is: Example 1010 SM : N 2 V SM = ( 1) b N 1 b i 2 i i=0 V SM = ( 1) b 3 [b b b ] = ( 1) 1 [0(4) + 1(2) + 0(1)] = 1 2 = 2

7 Signed-Magnitude Signed Integer Signed-Magnitude

8 Ones Complement Value for N-bit ones complement pattern is: Example C : N 2 V 1C = b N 1 2 N 1 + b i 2 i + b N 1 i=0 V 1C = b b b b b 3 = 1(8) + 0(4) + 1(2) + 0(1) + 1 = = 5

9 Ones Complement Signed Integer Ones Complement

10 Two s Complement Value for N-bit Two s complement pattern is: Example C : N 2 V 2C = b N 1 2 N 1 + b i 2 i i=0 V 2C = b b b b = 1(8) + 0(4) + 1(2) + 0(1) = = 6

11 Twos Complement Signed Integer Twos Complement

12 Sign Extension convert a number to a larger format. just copy the sign bit to fill the new high order bits in 8-bit two s-complement binary in 16-bit two s-complement binary in 8-bit two s-complement binary in 16-bit two s-complement binary

13 Offset binary a.k.a. biased-k representation Variation of two s complement Uses a value K as biasing value Applications: Exponent of floating-point number (biased-127 or biased-1023) Analog interfacing Excess-3 code (actual value = binary - 3)

14 Comparing Number Systems Decimal Signed- One s Two s Offset Magnitude Complement Complement Binary

15 Signed Systems Compared Unsigned Signed- Ones Two s Magnitude Complement Complement Smallest 0 (2 n 1 1) (2 n 1 1) 2 n 1 Largest 2 n 1 +(2 n 1 1) +(2 n 1 1) +(2 n 1 1)

16 Real Numbers Number System Format Characteristics Fixed-point ±i.f Low-precision Rational ±p/q Difficult to work with Floating-point ±m b e Most common way to handle reals

17 Fixed-Point Numbers The general expression for an N-bit fixed point 2 s complement where: N = total #bits x = b N 12 N 1 + N 2 i=0 b i 2 i 2 f f = #bits in fraction (0 f N 1) N-1 0 S int frac imaginary binary point

18 Expression for Two s Comp. Value of N-bit two s complement integer, f = 0 x = b N 12 N 1 + N 2 i=0 b i 2 i 2 0 = b N 1 2 N 1 + b N 2 2 N b b N-1 0 S int imaginary binary point

19 Expression for Q-Format Value of N-bit fixed point, f = N 1 x = b N 12 N 1 + N 2 i=0 b i 2 i 2 N 1 = b 0 + b b b (N 1) 2 (N 1) N-1 0 S frac imaginary binary point

20 N = 8, f = 4 Weights Bit value = = = OR Weights Bit value x = ( ) 2 4 = ( ) 16 =

21 N = 8, f = 7 Q7format Weights Bit value max = = ( ) 2 7 = 127/128 = Weights Bit value min = 2 0 = 1

22 Multiplying Q15 Numbers Q S x Q15 S Q30 31 S S Q30 31 S S r rounding by addition a '1' here

23 What is Floating Point? = = = = Binary point floats to a pre-defined position Process is called normalization

24 Floating Point Parts x Exponent Sign of mantissa Location of decimal point Mantissa Sign of exponent Radix ±X = m b e where m = mantissa, b = number base and e = exponent.

25 IEEE Single-Precision Format S 8-bit exp 23-bit frac ±X = ( 1) s 1.m 2 e 127 Sign field: 0 for positive numbers (-1 0 = +1) 1 for negative numbers (-1 1 = -1). Exponent field: Unsigned 8 bit, biased-127. Mantissa field: Bits to the right of normalized binary number.

26 IEEE Single-Precision Format X = ( 1) = = 7

27 IEEE Double-Precision Format Double precision is more common S 11-bit exp 52-bit frac ±X = ( 1) s 1.m 2 e 1023 public class TryFP { public static void main(string[ ] args) { double d = 1/3.; // Java likes double-prec more float f = 1f/3f; // Must force use of single-prec System.out.println("Value of d="+d); System.out.println("Value of f="+f); } } Value of d= Value of f=

28 FX vs FP Fixed Point Arithmetic Simple circuit Small area and faster Less accurate (the result is truncated if it exceeds the size) Smaller range of values can be handled Floating-Point Arithmetic Complex circuit (due to rounding and normalization) Large area and slower More accurate (high precision) Wider range of values can be handled

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic Computer Arithmetic MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Fall 2013 Machine Numbers When performing arithmetic on a computer (laptop, desktop, mainframe, cell phone,

More information

Number Representation and Waveform Quantization

Number Representation and Waveform Quantization 1 Number Representation and Waveform Quantization 1 Introduction This lab presents two important concepts for working with digital signals. The first section discusses how numbers are stored in memory.

More information

ENGIN 112 Intro to Electrical and Computer Engineering

ENGIN 112 Intro to Electrical and Computer Engineering ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems Overview Hexadecimal numbers Related to binary and octal numbers Conversion between hexadecimal, octal and binary Value

More information

How do computers represent numbers?

How do computers represent numbers? How do computers represent numbers? Tips & Tricks Week 1 Topics in Scientific Computing QMUL Semester A 2017/18 1/10 What does digital mean? The term DIGITAL refers to any device that operates on discrete

More information

Mathematical preliminaries and error analysis

Mathematical preliminaries and error analysis Mathematical preliminaries and error analysis Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan September 12, 2015 Outline 1 Round-off errors and computer arithmetic

More information

Notes for Chapter 1 of. Scientific Computing with Case Studies

Notes for Chapter 1 of. Scientific Computing with Case Studies Notes for Chapter 1 of Scientific Computing with Case Studies Dianne P. O Leary SIAM Press, 2008 Mathematical modeling Computer arithmetic Errors 1999-2008 Dianne P. O'Leary 1 Arithmetic and Error What

More information

Chapter 1: Introduction and mathematical preliminaries

Chapter 1: Introduction and mathematical preliminaries Chapter 1: Introduction and mathematical preliminaries Evy Kersalé September 26, 2011 Motivation Most of the mathematical problems you have encountered so far can be solved analytically. However, in real-life,

More information

Complement Arithmetic

Complement Arithmetic Complement Arithmetic Objectives In this lesson, you will learn: How additions and subtractions are performed using the complement representation, What is the Overflow condition, and How to perform arithmetic

More information

ALU (3) - Division Algorithms

ALU (3) - Division Algorithms HUMBOLDT-UNIVERSITÄT ZU BERLIN INSTITUT FÜR INFORMATIK Lecture 12 ALU (3) - Division Algorithms Sommersemester 2002 Leitung: Prof. Dr. Miroslaw Malek www.informatik.hu-berlin.de/rok/ca CA - XII - ALU(3)

More information

Arithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460

Arithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460 Notes for Part 1 of CMSC 460 Dianne P. O Leary Preliminaries: Mathematical modeling Computer arithmetic Errors 1999-2006 Dianne P. O'Leary 1 Arithmetic and Error What we need to know about error: -- how

More information

Ex code

Ex code Ex. 8.4 7-4-2-1 code Codeconverter 7-4-2-1-code to BCD-code. When encoding the digits 0... 9 sometimes in the past a code having weights 7-4-2-1 instead of the binary code weights 8-4-2-1 was used. In

More information

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Computer Representation of Numbers Counting numbers (unsigned integers) are the numbers 0,

More information

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary. Numbering Systems Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary. Addition & Subtraction using Octal & Hexadecimal 2 s Complement, Subtraction Using 2 s Complement.

More information

Chapter 1 Error Analysis

Chapter 1 Error Analysis Chapter 1 Error Analysis Several sources of errors are important for numerical data processing: Experimental uncertainty: Input data from an experiment have a limited precision. Instead of the vector of

More information

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System?

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System? :33:3 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 3 Lecture #: Binary Number System Complement Number Representation X Y Why Binary Number System? Because

More information

Introduction CSE 541

Introduction CSE 541 Introduction CSE 541 1 Numerical methods Solving scientific/engineering problems using computers. Root finding, Chapter 3 Polynomial Interpolation, Chapter 4 Differentiation, Chapter 4 Integration, Chapters

More information

Introduction to Scientific Computing Languages

Introduction to Scientific Computing Languages 1 / 21 Introduction to Scientific Computing Languages Prof. Paolo Bientinesi pauldj@aices.rwth-aachen.de Numerical Representation 2 / 21 Numbers 123 = (first 40 digits) 29 4.241379310344827586206896551724137931034...

More information

ACM 106a: Lecture 1 Agenda

ACM 106a: Lecture 1 Agenda 1 ACM 106a: Lecture 1 Agenda Introduction to numerical linear algebra Common problems First examples Inexact computation What is this course about? 2 Typical numerical linear algebra problems Systems of

More information

UNIT V FINITE WORD LENGTH EFFECTS IN DIGITAL FILTERS PART A 1. Define 1 s complement form? In 1,s complement form the positive number is represented as in the sign magnitude form. To obtain the negative

More information

The Euclidean Division Implemented with a Floating-Point Multiplication and a Floor

The Euclidean Division Implemented with a Floating-Point Multiplication and a Floor The Euclidean Division Implemented with a Floating-Point Multiplication and a Floor Vincent Lefèvre 11th July 2005 Abstract This paper is a complement of the research report The Euclidean division implemented

More information

Fundamentals of Digital Design

Fundamentals of Digital Design Fundamentals of Digital Design Digital Radiation Measurement and Spectroscopy NE/RHP 537 1 Binary Number System The binary numeral system, or base-2 number system, is a numeral system that represents numeric

More information

Binary Floating-Point Numbers

Binary Floating-Point Numbers Binary Floating-Point Numbers S exponent E significand M F=(-1) s M β E Significand M pure fraction [0, 1-ulp] or [1, 2) for β=2 Normalized form significand has no leading zeros maximum # of significant

More information

DSP Design Lecture 2. Fredrik Edman.

DSP Design Lecture 2. Fredrik Edman. DSP Design Lecture Number representation, scaling, quantization and round-off Noise Fredrik Edman fredrik.edman@eit.lth.se Representation of Numbers Numbers is a way to use symbols to describe and model

More information

ECE380 Digital Logic. Positional representation

ECE380 Digital Logic. Positional representation ECE380 Digital Logic Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Dr. D. J. Jackson Lecture 16-1 Positional representation First consider integers Begin with

More information

Number Representations

Number Representations Computer Arithmetic Algorithms Prof. Dae Hyun Kim School of Electrical Engineering and Computer Science Washington State University Number Representations Information Textbook Israel Koren, Computer Arithmetic

More information

Introduction to Scientific Computing Languages

Introduction to Scientific Computing Languages 1 / 19 Introduction to Scientific Computing Languages Prof. Paolo Bientinesi pauldj@aices.rwth-aachen.de Numerical Representation 2 / 19 Numbers 123 = (first 40 digits) 29 4.241379310344827586206896551724137931034...

More information

What Every Programmer Should Know About Floating-Point Arithmetic DRAFT. Last updated: November 3, Abstract

What Every Programmer Should Know About Floating-Point Arithmetic DRAFT. Last updated: November 3, Abstract What Every Programmer Should Know About Floating-Point Arithmetic Last updated: November 3, 2014 Abstract The article provides simple answers to the common recurring questions of novice programmers about

More information

Introduction and mathematical preliminaries

Introduction and mathematical preliminaries Chapter Introduction and mathematical preliminaries Contents. Motivation..................................2 Finite-digit arithmetic.......................... 2.3 Errors in numerical calculations.....................

More information

Computing Machine-Efficient Polynomial Approximations

Computing Machine-Efficient Polynomial Approximations Computing Machine-Efficient Polynomial Approximations N. Brisebarre, S. Chevillard, G. Hanrot, J.-M. Muller, D. Stehlé, A. Tisserand and S. Torres Arénaire, LIP, É.N.S. Lyon Journées du GDR et du réseau

More information

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications n-bit unsigned integer representation Represent integer x as sum of powers of 2: If x = n 1 i=0 b i 2 i where each b i

More information

Menu. Review of Number Systems EEL3701 EEL3701. Math. Review of number systems >Binary math >Signed number systems

Menu. Review of Number Systems EEL3701 EEL3701. Math. Review of number systems >Binary math >Signed number systems Menu Review of number systems >Binary math >Signed number systems Look into my... 1 Our decimal (base 10 or radix 10) number system is positional. Ex: 9437 10 = 9x10 3 + 4x10 2 + 3x10 1 + 7x10 0 We have

More information

ECE260: Fundamentals of Computer Engineering

ECE260: Fundamentals of Computer Engineering Data Representation & 2 s Complement James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy Data

More information

Computer Architecture, IFE CS and T&CS, 4 th sem. Representation of Integer Numbers in Computer Systems

Computer Architecture, IFE CS and T&CS, 4 th sem. Representation of Integer Numbers in Computer Systems Representation of Integer Numbers in Computer Systems Positional Numbering System Additive Systems history but... Roman numerals Positional Systems: r system base (radix) A number value a - digit i digit

More information

Floating-point Computation

Floating-point Computation Chapter 2 Floating-point Computation 21 Positional Number System An integer N in a number system of base (or radix) β may be written as N = a n β n + a n 1 β n 1 + + a 1 β + a 0 = P n (β) where a i are

More information

History & Binary Representation

History & Binary Representation History & Binary Representation C. R. da Cunha 1 1 Instituto de Física, Universidade Federal do Rio Grande do Sul, RS 91501-970, Brazil. August 30, 2017 Abstract In this lesson we will review the history

More information

1. Write a program to calculate distance traveled by light

1. Write a program to calculate distance traveled by light G. H. R a i s o n i C o l l e g e O f E n g i n e e r i n g D i g d o h H i l l s, H i n g n a R o a d, N a g p u r D e p a r t m e n t O f C o m p u t e r S c i e n c e & E n g g P r a c t i c a l M a

More information

Round-off Errors and Computer Arithmetic - (1.2)

Round-off Errors and Computer Arithmetic - (1.2) Round-off Errors and Comuter Arithmetic - (.). Round-off Errors: Round-off errors is roduced when a calculator or comuter is used to erform real number calculations. That is because the arithmetic erformed

More information

Four Important Number Systems

Four Important Number Systems Four Important Number Systems System Why? Remarks Decimal Base 10: (10 fingers) Most used system Binary Base 2: On/Off systems 3-4 times more digits than decimal Octal Base 8: Shorthand notation for working

More information

Lecture 7. Floating point arithmetic and stability

Lecture 7. Floating point arithmetic and stability Lecture 7 Floating point arithmetic and stability 2.5 Machine representation of numbers Scientific notation: 23 }{{} }{{} } 3.14159265 {{} }{{} 10 sign mantissa base exponent (significand) s m β e A floating

More information

Numerical Methods - Preliminaries

Numerical Methods - Preliminaries Numerical Methods - Preliminaries Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Preliminaries 2013 1 / 58 Table of Contents 1 Introduction to Numerical Methods Numerical

More information

ECE 372 Microcontroller Design

ECE 372 Microcontroller Design Data Formats Humor There are 10 types of people in the world: Those who get binary and those who don t. 1 Information vs. Data Information An abstract description of facts, processes or perceptions How

More information

Conversions between Decimal and Binary

Conversions between Decimal and Binary Conversions between Decimal and Binary Binary to Decimal Technique - use the definition of a number in a positional number system with base 2 - evaluate the definition formula ( the formula ) using decimal

More information

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 9. Datapath Design Jacob Abraham Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 October 2, 2017 ECE Department, University of Texas at Austin

More information

Optimizing MPC for robust and scalable integer and floating-point arithmetic

Optimizing MPC for robust and scalable integer and floating-point arithmetic Optimizing MPC for robust and scalable integer and floating-point arithmetic Liisi Kerik * Peeter Laud * Jaak Randmets * * Cybernetica AS University of Tartu, Institute of Computer Science January 30,

More information

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

More information

Software implementation of ECC

Software implementation of ECC Software implementation of ECC Radboud University, Nijmegen, The Netherlands June 4, 2015 Summer school on real-world crypto and privacy Šibenik, Croatia Software implementation of (H)ECC Radboud University,

More information

Floating Point Number Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

Floating Point Number Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le Floating Point Number Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview Real number system Examples Absolute and relative errors Floating point numbers Roundoff

More information

Chapter 5 Arithmetic Circuits

Chapter 5 Arithmetic Circuits Chapter 5 Arithmetic Circuits SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 11, 2016 Table of Contents 1 Iterative Designs 2 Adders 3 High-Speed

More information

Tu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1

Tu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1 Tu: 9/3/13 Math 71, Fall 2013, Section 001 Lecture 1 1 Course intro Notes : Take attendance. Instructor introduction. Handout : Course description. Note the exam days (and don t be absent). Bookmark the

More information

Next, we include the several conversion from type to type.

Next, we include the several conversion from type to type. Number Conversions: Binary Decimal; Floating Points In order to communicate with a computer, we need, at some point, to speak the same language. The words of our language are made up of combinations of

More information

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Hakim Weatherspoon CS 3410 Computer Science Cornell University Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. memory inst 32 register

More information

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and

More information

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b.

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b. CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5 GENE H GOLUB Suppose we want to solve We actually have an approximation ξ such that 1 Perturbation Theory Ax = b x = ξ + e The question is, how

More information

Logic and Computer Design Fundamentals. Chapter 5 Arithmetic Functions and Circuits

Logic and Computer Design Fundamentals. Chapter 5 Arithmetic Functions and Circuits Logic and Computer Design Fundamentals Chapter 5 Arithmetic Functions and Circuits Arithmetic functions Operate on binary vectors Use the same subfunction in each bit position Can design functional block

More information

What is Binary? Digital Systems and Information Representation. An Example. Physical Representation. Boolean Algebra

What is Binary? Digital Systems and Information Representation. An Example. Physical Representation. Boolean Algebra What is Binary? Digital Systems and Information Representation CSE 102 Underlying base signals are two valued: 0 or 1 true or false (T or F) high or low (H or L) One bit is the smallest unambiguous unit

More information

Lecture Notes 7, Math/Comp 128, Math 250

Lecture Notes 7, Math/Comp 128, Math 250 Lecture Notes 7, Math/Comp 128, Math 250 Misha Kilmer Tufts University October 23, 2005 Floating Point Arithmetic We talked last time about how the computer represents floating point numbers. In a floating

More information

Representing Numbers on the Computer

Representing Numbers on the Computer Representing Numbers on the Computer Let s calculate J! Program Maxnumber * * Check what the max numbers are on the computer * Integer N * * N= Do J=,2 N=N*J Print *,J,N Enddo stop end What happened? J

More information

8/13/16. Data analysis and modeling: the tools of the trade. Ø Set of numbers. Ø Binary representation of numbers. Ø Floating points.

8/13/16. Data analysis and modeling: the tools of the trade. Ø Set of numbers. Ø Binary representation of numbers. Ø Floating points. Data analysis and modeling: the tools of the trade Patrice Koehl Department of Biological Sciences National University of Singapore http://www.cs.ucdavis.edu/~koehl/teaching/bl5229 koehl@cs.ucdavis.edu

More information

Notes on floating point number, numerical computations and pitfalls

Notes on floating point number, numerical computations and pitfalls Notes on floating point number, numerical computations and pitfalls November 6, 212 1 Floating point numbers An n-digit floating point number in base β has the form x = ±(.d 1 d 2 d n ) β β e where.d 1

More information

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri MATH 1101 haalshehri@ksu.edu.sa 1 Introduction To Number Systems First Section: Binary System Second Section: Octal Number System Third Section: Hexadecimal System 2 Binary System 3 Binary System The binary

More information

Cs302 Quiz for MID TERM Exam Solved

Cs302 Quiz for MID TERM Exam Solved Question # 1 of 10 ( Start time: 01:30:33 PM ) Total Marks: 1 Caveman used a number system that has distinct shapes: 4 5 6 7 Question # 2 of 10 ( Start time: 01:31:25 PM ) Total Marks: 1 TTL based devices

More information

0,..., r 1 = digits in radix r number system, that is 0 d i r 1 where m i n 1

0,..., r 1 = digits in radix r number system, that is 0 d i r 1 where m i n 1 RADIX r NUMBER SYSTEM Let (N) r be a radix r number in a positional weighting number system, then (N) r = d n 1 r n 1 + + d 0 r 0 d 1 r 1 + + d m r m where: r = radix d i = digit at position i, m i n 1

More information

CSE 1400 Applied Discrete Mathematics Definitions

CSE 1400 Applied Discrete Mathematics Definitions CSE 1400 Applied Discrete Mathematics Definitions Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Arithmetic 1 Alphabets, Strings, Languages, & Words 2 Number Systems 3 Machine

More information

Identify the specified numbers by circling. 1) The integers in the following list: 8 16, 8, -10, 0, 9, - 9

Identify the specified numbers by circling. 1) The integers in the following list: 8 16, 8, -10, 0, 9, - 9 MAT 105-01C TEST 1 REVIEW NAME Identify the specified numbers by circling. 1) The integers in the following list: 8 16, 8, -10, 0, 9, - 9, 5.5, 16 8 2) The rational numbers in the following list: 0 14,

More information

Solutions - Homework 1 (Due date: September 25 th ) Presentation and clarity are very important! Show your procedure!

Solutions - Homework 1 (Due date: September 25 th ) Presentation and clarity are very important! Show your procedure! c 10 =0 c 9 =0 c 8 =0 c 7 =0 c 6 =0 c 5 =0 c 10 =1 c 9 =1 c 8 =1 c 7 =0 c 6 =1 c 5 =1 c 4 =1 c 8 =1 c 7 =1 c 6 =0 c 5 =0 c 8 =0 c 7 =0 c 6 =0 c 5 =0 c 8 =1 c 7 =1 c 6 =1 c 5 =0 c 4 =1 b 7 =0 b 6 =0 b 5

More information

Jim Lambers MAT 610 Summer Session Lecture 2 Notes

Jim Lambers MAT 610 Summer Session Lecture 2 Notes Jim Lambers MAT 610 Summer Session 2009-10 Lecture 2 Notes These notes correspond to Sections 2.2-2.4 in the text. Vector Norms Given vectors x and y of length one, which are simply scalars x and y, the

More information

NUMBER SYSTEMS. and DATA REPRESENTATION. for COMPUTERS (PROBLEM ANSWERS)

NUMBER SYSTEMS. and DATA REPRESENTATION. for COMPUTERS (PROBLEM ANSWERS) NUMBER SYSTEMS and DATA REPRESENTATION for COMPUTERS (PROBLEM ANSWERS) 05 March 2008 Number Systems and Data Representation 2 Table of Contents Table of Contents... 2 Conversion Between Binary and Hexadecimal

More information

1 ERROR ANALYSIS IN COMPUTATION

1 ERROR ANALYSIS IN COMPUTATION 1 ERROR ANALYSIS IN COMPUTATION 1.2 Round-Off Errors & Computer Arithmetic (a) Computer Representation of Numbers Two types: integer mode (not used in MATLAB) floating-point mode x R ˆx F(β, t, l, u),

More information

FYSE410 DIGITAL ELECTRONICS [1] [2] [3] [4] [5] A number system consists of an ordered set of symbols (digits).

FYSE410 DIGITAL ELECTRONICS [1] [2] [3] [4] [5] A number system consists of an ordered set of symbols (digits). FYSE4 DIGITAL ELECTRONICS Litterature: LECTURE [] [] [4] [5] DIGITAL LOGIC CIRCUIT ANALYSIS & DESIGN Victor P. Nelson, H. Troy Nagle J. David Irwin, ill D. Carroll ISN --4694- DIGITAL DESIGN M. Morris

More information

Tunable Floating-Point for Energy Efficient Accelerators

Tunable Floating-Point for Energy Efficient Accelerators Tunable Floating-Point for Energy Efficient Accelerators Alberto Nannarelli DTU Compute, Technical University of Denmark 25 th IEEE Symposium on Computer Arithmetic A. Nannarelli (DTU Compute) Tunable

More information

Chapter 1 Mathematical Preliminaries and Error Analysis

Chapter 1 Mathematical Preliminaries and Error Analysis Numerical Analysis (Math 3313) 2019-2018 Chapter 1 Mathematical Preliminaries and Error Analysis Intended learning outcomes: Upon successful completion of this chapter, a student will be able to (1) list

More information

QUADRATIC PROGRAMMING?

QUADRATIC PROGRAMMING? QUADRATIC PROGRAMMING? WILLIAM Y. SIT Department of Mathematics, The City College of The City University of New York, New York, NY 10031, USA E-mail: wyscc@cunyvm.cuny.edu This is a talk on how to program

More information

ENGG 1203 Tutorial_9 - Review. Boolean Algebra. Simplifying Logic Circuits. Combinational Logic. 1. Combinational & Sequential Logic

ENGG 1203 Tutorial_9 - Review. Boolean Algebra. Simplifying Logic Circuits. Combinational Logic. 1. Combinational & Sequential Logic ENGG 1203 Tutorial_9 - Review Boolean Algebra 1. Combinational & Sequential Logic 2. Computer Systems 3. Electronic Circuits 4. Signals, Systems, and Control Remark : Multiple Choice Questions : ** Check

More information

What s the Deal? MULTIPLICATION. Time to multiply

What s the Deal? MULTIPLICATION. Time to multiply What s the Deal? MULTIPLICATION Time to multiply Multiplying two numbers requires a multiply Luckily, in binary that s just an AND gate! 0*0=0, 0*1=0, 1*0=0, 1*1=1 Generate a bunch of partial products

More information

Chapter 1 Mathematical Preliminaries and Error Analysis

Chapter 1 Mathematical Preliminaries and Error Analysis Chapter 1 Mathematical Preliminaries and Error Analysis Per-Olof Persson persson@berkeley.edu Department of Mathematics University of California, Berkeley Math 128A Numerical Analysis Limits and Continuity

More information

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors Roundoff errors and floating-point arithmetic

More information

Chapter 4: Radicals and Complex Numbers

Chapter 4: Radicals and Complex Numbers Chapter : Radicals and Complex Numbers Section.1: A Review of the Properties of Exponents #1-: Simplify the expression. 1) x x ) z z ) a a ) b b ) 6) 7) x x x 8) y y y 9) x x y 10) y 8 b 11) b 7 y 1) y

More information

EE260: Digital Design, Spring n Digital Computers. n Number Systems. n Representations. n Conversions. n Arithmetic Operations.

EE260: Digital Design, Spring n Digital Computers. n Number Systems. n Representations. n Conversions. n Arithmetic Operations. EE 260: Introduction to Digital Design Number Systems Yao Zheng Department of Electrical Engineering University of Hawaiʻi at Mānoa Overview n Digital Computers n Number Systems n Representations n Conversions

More information

Residue Number Systems Ivor Page 1

Residue Number Systems Ivor Page 1 Residue Number Systems 1 Residue Number Systems Ivor Page 1 7.1 Arithmetic in a modulus system The great speed of arithmetic in Residue Number Systems (RNS) comes from a simple theorem from number theory:

More information

Chapter 1 CSCI

Chapter 1 CSCI Chapter 1 CSCI-1510-003 What is a Number? An expression of a numerical quantity A mathematical quantity Many types: Natural Numbers Real Numbers Rational Numbers Irrational Numbers Complex Numbers Etc.

More information

ECS 231 Computer Arithmetic 1 / 27

ECS 231 Computer Arithmetic 1 / 27 ECS 231 Computer Arithmetic 1 / 27 Outline 1 Floating-point numbers and representations 2 Floating-point arithmetic 3 Floating-point error analysis 4 Further reading 2 / 27 Outline 1 Floating-point numbers

More information

Chapter 1: Solutions to Exercises

Chapter 1: Solutions to Exercises 1 DIGITAL ARITHMETIC Miloš D. Ercegovac and Tomás Lang Morgan Kaufmann Publishers, an imprint of Elsevier, c 2004 Exercise 1.1 (a) 1. 9 bits since 2 8 297 2 9 2. 3 radix-8 digits since 8 2 297 8 3 3. 3

More information

Lecture 11. Advanced Dividers

Lecture 11. Advanced Dividers Lecture 11 Advanced Dividers Required Reading Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design Chapter 15 Variation in Dividers 15.3, Combinational and Array Dividers Chapter 16, Division

More information

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods Numerical Methods - Lecture 1 Numerical Methods Lecture. Analysis o errors in numerical methods Numerical Methods - Lecture Why represent numbers in loating point ormat? Eample 1. How a number 56.78 can

More information

Arithmetic, Algebra, Number Theory

Arithmetic, Algebra, Number Theory Arithmetic, Algebra, Number Theory Peter Simon 21 April 2004 Types of Numbers Natural Numbers The counting numbers: 1, 2, 3,... Prime Number A natural number with exactly two factors: itself and 1. Examples:

More information

Design of Digital Circuits Reading: Binary Numbers. Required Reading for Week February 2017 Spring 2017

Design of Digital Circuits Reading: Binary Numbers. Required Reading for Week February 2017 Spring 2017 Design of Digital Circuits Reading: Binary Numbers Required Reading for Week 1 23-24 February 2017 Spring 2017 Binary Numbers Design of Digital Circuits 2016 Srdjan Capkun Frank K. Gürkaynak http://www.syssec.ethz.ch/education/digitaltechnik_16

More information

Elements of Floating-point Arithmetic

Elements of Floating-point Arithmetic Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow

More information

Lecture 2: Number Representations (2)

Lecture 2: Number Representations (2) Lecture 2: Number Representations (2) ECE 645 Computer Arithmetic 1/29/08 ECE 645 Computer Arithmetic Lecture Roadmap Number systems (cont'd) Floating point number system representations Residue number

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 1 Chapter 4 Roundoff and Truncation Errors PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

mith College Computer Science CSC231 - Assembly Week #7 Dominique Thiébaut

mith College Computer Science CSC231 - Assembly Week #7 Dominique Thiébaut mith College Computer Science CSC231 - Assembly Week #7 Dominique Thiébaut dthiebaut@smith.edu public class JavaLimits { public static void main(string[] args) { // -----------------------------------------------

More information

Numerical Analysis and Computing

Numerical Analysis and Computing Numerical Analysis and Computing Lecture Notes #02 Calculus Review; Computer Artihmetic and Finite Precision; and Convergence; Joe Mahaffy, mahaffy@math.sdsu.edu Department of Mathematics Dynamical Systems

More information

Combinational Logic. By : Ali Mustafa

Combinational Logic. By : Ali Mustafa Combinational Logic By : Ali Mustafa Contents Adder Subtractor Multiplier Comparator Decoder Encoder Multiplexer How to Analyze any combinational circuit like this? Analysis Procedure To obtain the output

More information

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors 3-1 Roundoff errors and floating-point arithmetic

More information

CHAPTER 2 NUMBER SYSTEMS

CHAPTER 2 NUMBER SYSTEMS CHAPTER 2 NUMBER SYSTEMS The Decimal Number System : We begin our study of the number systems with the familiar decimal number system. The decimal system contains ten unique symbol 0, 1, 2, 3, 4, 5, 6,

More information

Numbering Systems. Computational Platforms. Scaling and Round-off Noise. Special Purpose. here that is dedicated architecture

Numbering Systems. Computational Platforms. Scaling and Round-off Noise. Special Purpose. here that is dedicated architecture Computational Platforms Numbering Systems Basic Building Blocks Scaling and Round-off Noise Computational Platforms Viktor Öwall viktor.owall@eit.lth.seowall@eit lth Standard Processors or Special Purpose

More information

Chapter 1. Binary Systems 1-1. Outline. ! Introductions. ! Number Base Conversions. ! Binary Arithmetic. ! Binary Codes. ! Binary Elements 1-2

Chapter 1. Binary Systems 1-1. Outline. ! Introductions. ! Number Base Conversions. ! Binary Arithmetic. ! Binary Codes. ! Binary Elements 1-2 Chapter 1 Binary Systems 1-1 Outline! Introductions! Number Base Conversions! Binary Arithmetic! Binary Codes! Binary Elements 1-2 3C Integration 傳輸與介面 IA Connecting 聲音與影像 Consumer Screen Phone Set Top

More information

NUMBERS AND CODES CHAPTER Numbers

NUMBERS AND CODES CHAPTER Numbers CHAPTER 2 NUMBERS AND CODES 2.1 Numbers When a number such as 101 is given, it is impossible to determine its numerical value. Some may say it is five. Others may say it is one hundred and one. Could it

More information

CSCI 220: Computer Architecture-I Instructor: Pranava K. Jha. BCD Codes

CSCI 220: Computer Architecture-I Instructor: Pranava K. Jha. BCD Codes CSCI 220: Computer Architecture-I Instructor: Pranava K. Jha BCD Codes Q. Give representation of the decimal number 853 in each of the following codes. (a) 8421 code (c) 84(-2)(-1) code (b) Excess-three

More information