DSP Design Lecture 2. Fredrik Edman.

Size: px
Start display at page:

Download "DSP Design Lecture 2. Fredrik Edman."

Transcription

1 DSP Design Lecture Number representation, scaling, quantization and round-off Noise Fredrik Edman

2 Representation of Numbers

3 Numbers is a way to use symbols to describe and model the world! However, numbers may be represented in many different ways and there are considerations to make when it comes to digital signal processing!

4 Definition: Radix In a mathematical numeral system, the radix or base is the number of unique digits, including zero, used to represent numbers in a positional numeral system. Example: In the decimal system (the most common system in use today) the radix is 10, because it uses the ten digits from 0 through 9. The number 47 may then be written as: , Base 10

5 Definition: Radix Each position have its on weight depending on the current base = 1*100 + *10 + 5*1 = 1*10 + * *10 0 Representing fractions is a simple extension of this idea = *10 + 5*1 + 4* *0.01 = * * * *10 -

6 l i= k 1 Unsigned Number Representation General description of a fixed radix (base) systems (fixed point positional number system) r i a i a {0,1,,... r 1} r The digits in a radix system: = k 1 k l k 1 k l = r a + r a ra + ra + r a r a described in a fixed point positional number system: a a a a. a a i i l Whole part Fractional part digit set

7 What about numbers in DSP? In DSP, numbers are encoded by means of binary digits or bits {0,1}. For binary digits the base =. All (base 10) numbers can be represented by groups of bits, for example = 1* 6 + 0* 5 + 1* 4 + 0* 3 + 1* + 1* 1 + 0* 0 or =

8 Binary numbers (base=) Representing unsigned integers MSB = Most Significant Bit LSB = Least Significant Bit N bits (0) (1) () (3) (4) (5) (6) (7) In base 10 N words Ex. 101 = 5 10

9 l i= k 1 10 i a i Example: Unsigned Number = { a {0,1,,... 9} in radix 10} k a k l k ak a a a a l = l i= k 1 i a i = { a {0, 1} in radix } k a k l k ai a a a a l = + + +

10 Signed Numbers and Fractions But we also need to represent numbers like and in binary. Devote 1 bit to indicate sign: = = -35. Fractions can be expressed like this = 1* * *0.15 = 1* * - + 1* -3 = However there are also other possibilities!

11 Number Representation Fixed point & Floating point

12 Fixed point & Floating point Digital signal processing number representation can be separated into two categories - fixed point and floating point. These designations refer to the format used to store and manipulate numeric representations of data. Fixed-point DSPs are designed to represent and manipulate integers positive and negative whole numbers. Floating-point DSPs represent and manipulate rational numbers.

13 Fixed point In fixed point we only have a single value (n) In fixed-point representation, a specific radix point (decimal point in English. ) is chosen so there is a fixed number of bits to the right (fractional bits) and a fixed number of bits to the left (integer bits) of the radix point.

14 Floating point In floating point a value is represented by mantissa (m) determining the resolution/precision exponent (e) determining the dynamic range m b e In floating-point representation, the placement of the decimal point can float relative to the significant digits of the number.

15 Floating vs. Fixed point - Design Considerations With fixed-point notation, the gaps between adjacent numbers are always equal a value of one, whereas in floating-point notation, gaps between adjacent numbers are not uniformly spaced (ANSI/IEEE Std. 754 standard format), with large gaps between large numbers and small gaps between small numbers. Floating point gives higher dynamic range but often high cost in: energy area calculation time For energy efficient implementations fixed point is preferred, however fixed-point numbers are more susceptible to common numeric computational inaccuracies. When choosing number representation you also need to consider - Cost - Performance - Ease of implementation/development - Cell library?

16 There are different fixed point numbering systems! Sign Magnitude One s Complement Two s Complement Etc.

17 Signed Magnitude Unsigned numbers with a sign-bit (MSB = sign bit) Signed Magnitude Two Zeros + Low Power? + Easy to convert to Negative (flip bit) 100

18 One s Complement Signed numbers by inverting (Complement) One's Complement Two Zeros + Easy to convert to Negative (invert)

19 Two s Complement Most widely used fixed point numbering system Two's Complement Complement + LSB + One Zero + Easy Add/Sub - Not so easy to convert to Neg Add operation for negative numbers is identical to the add operation for positive numbers, so no additional logic is required to handle the negative case.

20 Table of number representations Wikipedia

21 Considerations Much to consider when choosing between fixed point or floating point representaion. Type of application, development time, cost, tools, etc. will influence your choice! Choosing different fixed point numbering systems will also influence your design!

22 Quantization Ch in Phari Overview of Effects of Finite Register Length in DSP (download from homepage)

23 What is Quantization? Quantization, in mathematics and in DSP, is the process of mapping a large set of input values to a (countable) smaller set. The operations rounding and truncation are typical examples of quantization processes. Quantization is involved to some degree in nearly all digital signal processing, as the process of representing a signal in digital form ordinarily involves rounding.

24 Quantization Mainly two types: Signal Quantization Coefficient Quantization

25 Signal Quantization x s [n] sampled waveform x a (t) T = sample period 3T T T 0 T T 3T 4T time samples, n x a (t) S&H x s [n] x[n] ˆ xˆ B [n] Quantizer Coder T A/D

26 Signal Quantization

27 Different quantization techniques can be applied Level Linear Quantization: Same distance between quantization levels indepentent of input voltage, i.e. quantization error is the same for all input signal. Input Voltage What happens with the SNR? Higher SNR for high signal levels.

28 Different quantization techniques can be applied Level Non-Linear Quantization: Unequal distance between quantization, e.g. closer levels at lower signal levels. A fixed SNR can be achieved or higher SNR in most important areas. Input Voltage More complex quantization process

29 Quantization effects Round-off Noise Affect the output as a random disturbance Limit Cycle Oscillations Undesired periodic components due to non-linear behavior in the feedback (rounding or overflow)

30 Coefficient Quantization IIR filter x(n) + b 0 + y(n) + + a 1 a n-1 a n Z -1 Z -1 Z -1 b 1 b m-1 b m + + Filter becomes unstable! Non-ideal transfer function!

31 Rounding & Truncation Rounding/Truncation is always there! Especially necessary in recursive systems Q x(n) y(n) Without quantization - infinite wordlength Multiplication n+m output bits Addition n+1 output bits

32 Truncation & Rounding Level X+1 Level X+1 Level X Level X Truncation All values approximated in the same direction Max error = 1LSB Rounding Values approximated up or down Max error = 1/ LSB

33 Different rounding schemes y round down (towards ) round up (towards + ) round towards zero round away from zero round to nearest

34 Rounding & Truncation No energy added to the system Often used in recursive algorithms Truncation Rounding Truncation towards zero In In In DC error All values goes towards -infinity 100 Rounded to even 100 Add LSB before truncation if negative

35 Scaling Scaling is about adjusting the signal range to fit the hardware. Unchanged transfer function (scaled coefficients might move the pole-zeros) However you might loose in precision!

36 An example where scaling is needed x(n) y(n) x(n) 1 x( n) = ± 3 4 y(n) 1 1 x, y < Overflow 1 y(n) 1

37 Scaling to avoid overflow x(n) f(n) y(n) Safe scaling if x(n) 1 β f(n) β y(n) β = i= 0 f ( i) ( l 1 scaling in the book) Where f(i) is the unit sample response

38 Example 1: Safe Scaling i= 0 i= 0 ( 05) β = f(i) =. = = = (. ) (. ) (. ) i Geometric series u(n) x(n) u(n) x(n) Original filter with overflow 0.5

39 Example : Safe Scaling = 7 x( n) and y( n) 7 give safe scaling β = i 0 f(i) = = 3.5 x(n) / y(n) h(n) Increased roundoff noise Internal scaling might improve 7/ (Linear phase FIR)

40 Scaling Safe scaling is pessimistic Alternative is scaling with i= In practice: Scaling with β = ±n Easy to do - a shift β = 0 ( f () i ) (l scaling in the book) Increased internal wordlength an alternative However, overflow may occur!!

41 Summary Scaling Techniques l 1 - scaling β = f ( i), Safe scaling i= 0 l - scaling β = δ i= 0 f i possible overflow ( ), ( ) = unit sample response, ( ) = Variance white noise input i= 0 f i f i Safe scaling but not guaranteed δ sets the probability for an overflow Typically one overflow every 10 6 sample is accepted in audio [Wanhammar]

42 Limit Cycles

43 Limit Cycles Oscillations Limit cycle oscillations can be described as the undesirable periodic components at the output due to the fact that quantization is a nonlienear operation.

44 Limit Cycles Oscillations Example: zero input oscillations in nd order IIR Q b Q b 1 X(n) y(n) b = = ; b = =

45 Limit Cycles Zero Input Example: zero input oscillations Rounding after multiplication Truncation after multiplication Source: Lars Wanhammar, DSP Integrated circuits

46 Limit Cycles Zero input oscillations Not accepted in some applications such as in audio applications. Very difficult problem Real Part In general, no solutions for structures > nd order Can be limited by increased internal wordlength Can in some nd order structures be eliminated by pole positioning nd order Wave Digital Filters are free from parasitic oscillations Imaginary Part Poles close to the unity circle Matlab: zplane(1,[ ])

47 We may also get Overflow Oscillations 3-bit two s complement sum Correct sum Oscillations are limited by saturation 3-bit saturated sum Correct sum Overflow change the sign

48 Limit Cycles due to overflow Zero Input Two s Complement Arithmetic Saturated Arithmetic Source: Lars Wanhammar, DSP Integrated circuits

49 Saturation Arithmetic From Adder C out-msb 0 = NOF C out-msb C in-msb C in-msb Signbit 1 = POF Saturated Output Overflow if C out-msb differs from C in-msb

50 Simple Noise Analysis

51 Quantization Analysis Using real rounding, truncation, and overflow Gives exact result Tricky - need integer representation Using noise models Floating point representation can still be used Suitable for Matlab, C/C++...

52 Wordlength (W) = 8 bits (W-1) 15 bits a 8 bits Rounding Model a Q e(n) u(n) 8 bits y(n) u(n) y(n)

53 Wordlength (W) = 8 bits 15 bits a 8 bits Rounding Model a Q u(n) 8 bits y(n) u(n) ( ) u n y(n) e(n) ( ) en ( ) = u n un ( ) Modeled with added noise as an input error

54 Analysis of Round-off Noise We need to analyze the round-off noise to determine its effect on the output signal! If the noise variance is not negligible in comparison with the output signal level the wordlength must be increased or some low-noise structure must be used!

55 Roundoff Noise If the quantization error probability is uniformly distributed in the interval e( n) where = ( W 1) W is the number of bits after the rounding P e (e), ½ LSB Probability density function 1 e

56 Statistical model of e(n) The statistical model is based on the following assumptions: 1. e(n) is a sample sequence of a stationary random process.. e(n) is uncorrelated with x(n) 3. The error is a white noise process 4. The probability distribution of the error process is uniform over the range of the quantization error. It is easy to find situtations where this is not valid, e.g. if x(n) is a square wave. However, when x(n) is complicated, e.g. speech or music, the assumptions are realistic.

57 Roundoff Noise / ( ) ( ) / Mean value e = E[ e( n)] = 0 Variance = E[ e e ] = e e P ( e) de = [ e = 0] / 3 / W 1 e 1 /8 /8 e de = = = = / / P e (e) e ½ LSB 1 e

58 Roundoff Noise / ( ) ( ) Variance = E[ e e ] = e e P ( e) de = [ e = 0] / Mean value e = E[ e( n)] = 0 / 3 / W 1 e 1 /8 /8 e de = = = = / / P e (e) e ½ LSB 1 e

59 Roundoff Noise / ( ) ( ) Variance = E[ e e ] = e e P ( e) de = [ e = 0] / Mean value e = E[ e( n)] = 0 / 3 / W 1 e 1 /8 /8 e de = = = = / / P e (e) e ½ LSB 1 e

60 Roundoff Noise / ( ) ( ) Variance = E[ e e ] = e e P ( e) de = [ e = 0] / Mean value e = E[ e( n)] = 0 / 3 / W 1 e 1 /8 /8 e de = = = = / / P e (e) e ½ LSB 1 e

61 Example: Roundoff Noise In the case of rounding (mean=0) the variance and the average power are the same, i.e. if a value is rounded the quantization noise becomes: σ e = W 3 If we scale down one bit: ( W 1) W = = σ e

62 Analysis of Round-off Noise Not only the noise gain at the output needs to be determined! We also need to determine the SNR at the output to get the full picture!

63 Signal to Noise Ratio (SNR) Signal power (variance) SNR = σ x e 3 10log = 10log σ W x σ Roundoff error power (variance)

64 Signal to Noise Ratio (SNR) One extra bit reduces quantization error by a factor 4 4 σ SNR = 10log σ e = 6. 0 e db Good to remember: 6 db increase in SNR per bit

65 Signal to Noise Ratio (SNR) Example: Full scale sinus wave rounded to 8 bits SNR 3 A = 10log 50 db; -1 A 1 8 =

66 Roundoff Noise: Addition E[( e ) 1+ e ] = Ee [ 1 + ee 1+ e] = 1 = Ee [ ] + E[ ee 1] + Ee [ ] = zero if u1and u independent u (n) 1 Ee = Ee [ ] + [ ] u 1 (n) e (n) e 1 (n) y(n)

67 A larger IIR-filter with several quantization noise sources (I) Oppenheim and Schafer, Discrete-time Signal Processing, Prentice Hall

68 A larger IIR-filter with several quantization noise sources (II) Oppenheim and Schafer, Discrete-time Signal Processing, Prentice Hall

69 A larger IIR-filter with several quantization noise sources (III) Assumption: noise sources are independent of (a) the input and (b) each other can be added σ = σ + σ + σ + σ + σ e e0 e1 e e3 e4 Oppenheim and Schafer, Discrete-time Signal Processing, Prentice Hall

70 End of Lecture

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

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

Analysis of Finite Wordlength Effects

Analysis of Finite Wordlength Effects Analysis of Finite Wordlength Effects Ideally, the system parameters along with the signal variables have infinite precision taing any value between and In practice, they can tae only discrete values within

More information

ECE4270 Fundamentals of DSP Lecture 20. Fixed-Point Arithmetic in FIR and IIR Filters (part I) Overview of Lecture. Overflow. FIR Digital Filter

ECE4270 Fundamentals of DSP Lecture 20. Fixed-Point Arithmetic in FIR and IIR Filters (part I) Overview of Lecture. Overflow. FIR Digital Filter ECE4270 Fundamentals of DSP Lecture 20 Fixed-Point Arithmetic in FIR and IIR Filters (part I) School of ECE Center for Signal and Information Processing Georgia Institute of Technology Overview of Lecture

More information

Vel Tech High Tech Dr.Ranagarajan Dr.Sakunthala Engineering College Department of ECE

Vel Tech High Tech Dr.Ranagarajan Dr.Sakunthala Engineering College Department of ECE Subject Code: EC6502 Course Code:C302 Course Name: PRINCIPLES OF DIGITAL SIGNAL PROCESSING L-3 : T-1 : P-0 : Credits 4 COURSE OBJECTIVES: 1. To learn discrete Fourier transform and its properties 2. To

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

FINITE PRECISION EFFECTS 1. FLOATING POINT VERSUS FIXED POINT 3. TYPES OF FINITE PRECISION EFFECTS 4. FACTORS INFLUENCING FINITE PRECISION EFFECTS

FINITE PRECISION EFFECTS 1. FLOATING POINT VERSUS FIXED POINT 3. TYPES OF FINITE PRECISION EFFECTS 4. FACTORS INFLUENCING FINITE PRECISION EFFECTS FINITE PRECISION EFFECTS 1. FLOATING POINT VERSUS FIXED POINT 2. WHEN IS FIXED POINT NEEDED? 3. TYPES OF FINITE PRECISION EFFECTS 4. FACTORS INFLUENCING FINITE PRECISION EFFECTS 5. FINITE PRECISION EFFECTS:

More information

DSP Configurations. responded with: thus the system function for this filter would be

DSP Configurations. responded with: thus the system function for this filter would be DSP Configurations In this lecture we discuss the different physical (or software) configurations that can be used to actually realize or implement DSP functions. Recall that the general form of a DSP

More information

REAL TIME DIGITAL SIGNAL PROCESSING

REAL TIME DIGITAL SIGNAL PROCESSING REAL TIME DIGITAL SIGNAL PROCESSING www.electron.frba.utn.edu.ar/dplab Digital Filters FIR and IIR. Design parameters. Implementation types. Constraints. Filters: General classification Filters: General

More information

Digital Signal Processing

Digital Signal Processing COMP ENG 4TL4: Digital Signal Processing Notes for Lecture #3 Wednesday, September 10, 2003 1.4 Quantization Digital systems can only represent sample amplitudes with a finite set of prescribed values,

More information

Optimum Ordering and Pole-Zero Pairing of the Cascade Form IIR. Digital Filter

Optimum Ordering and Pole-Zero Pairing of the Cascade Form IIR. Digital Filter Optimum Ordering and Pole-Zero Pairing of the Cascade Form IIR Digital Filter There are many possible cascade realiations of a higher order IIR transfer function obtained by different pole-ero pairings

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

3 Finite Wordlength Effects

3 Finite Wordlength Effects Bomar, B.W. Finite Wordlength Effects Digital Signal Processing Handbook Ed. Vijay K. Madisetti and Douglas B. Williams Boca Raton: CRC Press LLC, 1999 c 1999byCRCPressLLC 3 Finite Wordlength Effects Bruce

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

Chapter 4 Number Representations

Chapter 4 Number Representations 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 Table of Contents 1 Fundamentals 2 Signed Numbers 3 Fixed-Point

More information

Practical Considerations in Fixed-Point FIR Filter Implementations

Practical Considerations in Fixed-Point FIR Filter Implementations 1 15) Randy Yates 11 Sep 2010 s i g n a l p r oc e s s i n g s ys t e m s s http://www.digitalsignallabs.com Typeset using L A TEX 2ε 2 15) Contents 1 Introduction 3 1.1 Motivation.............................................................

More information

Optimum Ordering and Pole-Zero Pairing. Optimum Ordering and Pole-Zero Pairing Consider the scaled cascade structure shown below

Optimum Ordering and Pole-Zero Pairing. Optimum Ordering and Pole-Zero Pairing Consider the scaled cascade structure shown below Pole-Zero Pairing of the Cascade Form IIR Digital Filter There are many possible cascade realiations of a higher order IIR transfer function obtained by different pole-ero pairings and ordering Each one

More information

Data Converter Fundamentals

Data Converter Fundamentals Data Converter Fundamentals David Johns and Ken Martin (johns@eecg.toronto.edu) (martin@eecg.toronto.edu) slide 1 of 33 Introduction Two main types of converters Nyquist-Rate Converters Generate output

More information

E : Lecture 1 Introduction

E : Lecture 1 Introduction E85.2607: Lecture 1 Introduction 1 Administrivia 2 DSP review 3 Fun with Matlab E85.2607: Lecture 1 Introduction 2010-01-21 1 / 24 Course overview Advanced Digital Signal Theory Design, analysis, and implementation

More information

UNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018

UNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018 DIGITAL ELECTRONICS SYSTEM DESIGN LL 2018 PROFS. IRIS BAHAR & ROD BERESFORD NOVEMBER 9, 2018 LECTURE 19: BINARY ADDITION, UNSIGNED BINARY NUMBERS For the binary number b n-1 b n-2 b 1 b 0. b -1 b -2 b

More information

Numbering Systems Basic Building Blocks Scaling and Round-off Noise. Number Representation. Floating vs. Fixed point. DSP Design.

Numbering Systems Basic Building Blocks Scaling and Round-off Noise. Number Representation. Floating vs. Fixed point. DSP Design. Numbring Systms Basic Building Blocks Scaling and Round-off Nois Numbr Rprsntation Viktor Öwall viktor.owall@it.lth.s Floating vs. Fixd point In floating point a valu is rprsntd by mantissa dtrmining th

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

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING IT6502 - DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A 1. What is a continuous and discrete time signal? Continuous

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

Second and Higher-Order Delta-Sigma Modulators

Second and Higher-Order Delta-Sigma Modulators Second and Higher-Order Delta-Sigma Modulators MEAD March 28 Richard Schreier Richard.Schreier@analog.com ANALOG DEVICES Overview MOD2: The 2 nd -Order Modulator MOD2 from MOD NTF (predicted & actual)

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

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

Oversampling Converters

Oversampling Converters Oversampling Converters David Johns and Ken Martin (johns@eecg.toronto.edu) (martin@eecg.toronto.edu) slide 1 of 56 Motivation Popular approach for medium-to-low speed A/D and D/A applications requiring

More information

Finite Word Length Effects and Quantisation Noise. Professors A G Constantinides & L R Arnaut

Finite Word Length Effects and Quantisation Noise. Professors A G Constantinides & L R Arnaut Finite Word Length Effects and Quantisation Noise 1 Finite Word Length Effects Finite register lengths and A/D converters cause errors at different levels: (i) input: Input quantisation (ii) system: Coefficient

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

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

Determining Appropriate Precisions for Signals in Fixed-Point IIR Filters

Determining Appropriate Precisions for Signals in Fixed-Point IIR Filters 38.3 Determining Appropriate Precisions for Signals in Fixed-Point IIR Filters Joan Carletta Akron, OH 4435-3904 + 330 97-5993 Robert Veillette Akron, OH 4435-3904 + 330 97-5403 Frederick Krach Akron,

More information

Mark Redekopp, All rights reserved. Lecture 1 Slides. Intro Number Systems Logic Functions

Mark Redekopp, All rights reserved. Lecture 1 Slides. Intro Number Systems Logic Functions Lecture Slides Intro Number Systems Logic Functions EE 0 in Context EE 0 EE 20L Logic Design Fundamentals Logic Design, CAD Tools, Lab tools, Project EE 357 EE 457 Computer Architecture Using the logic

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

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF INFORMATION TECHNOLOGY. Academic Year

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF INFORMATION TECHNOLOGY. Academic Year VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur- 603 203 DEPARTMENT OF INFORMATION TECHNOLOGY Academic Year 2016-2017 QUESTION BANK-ODD SEMESTER NAME OF THE SUBJECT SUBJECT CODE SEMESTER YEAR

More information

UNIT 1. SIGNALS AND SYSTEM

UNIT 1. SIGNALS AND SYSTEM Page no: 1 UNIT 1. SIGNALS AND SYSTEM INTRODUCTION A SIGNAL is defined as any physical quantity that changes with time, distance, speed, position, pressure, temperature or some other quantity. A SIGNAL

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

Introduction to Digital Logic Missouri S&T University CPE 2210 Subtractors

Introduction to Digital Logic Missouri S&T University CPE 2210 Subtractors Introduction to Digital Logic Missouri S&T University CPE 2210 Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and Technology cetinkayae@mst.edu

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

Lecture 9 Video Coding Transforms 2

Lecture 9 Video Coding Transforms 2 Lecture 9 Video Coding Transforms 2 Integer Transform of H.264/AVC In previous standards, the DCT was defined as the ideal transform, with unlimited accuracy. This has the problem, that we have encoders

More information

Lecture 7 - IIR Filters

Lecture 7 - IIR Filters Lecture 7 - IIR Filters James Barnes (James.Barnes@colostate.edu) Spring 204 Colorado State University Dept of Electrical and Computer Engineering ECE423 / 2 Outline. IIR Filter Representations Difference

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

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

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Chapter 1 Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu http://www.ee.unlv.edu/~b1morris/cpe100/ CPE100: Digital Logic Design I Section 1004: Dr. Morris From Zero to One Chapter 1 Background:

More information

EE 5345 Biomedical Instrumentation Lecture 12: slides

EE 5345 Biomedical Instrumentation Lecture 12: slides EE 5345 Biomedical Instrumentation Lecture 1: slides 4-6 Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University slides can be viewed at: http:// www.seas.smu.edu/~cd/ee5345.html EE

More information

DFT & Fast Fourier Transform PART-A. 7. Calculate the number of multiplications needed in the calculation of DFT and FFT with 64 point sequence.

DFT & Fast Fourier Transform PART-A. 7. Calculate the number of multiplications needed in the calculation of DFT and FFT with 64 point sequence. SHRI ANGALAMMAN COLLEGE OF ENGINEERING & TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR,TRICHY-621105. DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING UNIT I DFT & Fast Fourier

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

Efficient algorithms for the design of finite impulse response digital filters

Efficient algorithms for the design of finite impulse response digital filters 1 / 19 Efficient algorithms for the design of finite impulse response digital filters Silviu Filip under the supervision of N. Brisebarre and G. Hanrot (AriC, LIP, ENS Lyon) Journées Nationales de Calcul

More information

Digital Systems Roberto Muscedere Images 2013 Pearson Education Inc. 1

Digital Systems Roberto Muscedere Images 2013 Pearson Education Inc. 1 Digital Systems Digital systems have such a prominent role in everyday life The digital age The technology around us is ubiquitous, that is we don t even notice it anymore Digital systems are used in:

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

COMBINATIONAL LOGIC FUNCTIONS

COMBINATIONAL LOGIC FUNCTIONS COMBINATIONAL LOGIC FUNCTIONS Digital logic circuits can be classified as either combinational or sequential circuits. A combinational circuit is one where the output at any time depends only on the present

More information

Combinational Logic Design Arithmetic Functions and Circuits

Combinational Logic Design Arithmetic Functions and Circuits Combinational Logic Design Arithmetic Functions and Circuits Overview Binary Addition Half Adder Full Adder Ripple Carry Adder Carry Look-ahead Adder Binary Subtraction Binary Subtractor Binary Adder-Subtractor

More information

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1 E40M Binary Numbers M. Horowitz, J. Plummer, R. Howe 1 Reading Chapter 5 in the reader A&L 5.6 M. Horowitz, J. Plummer, R. Howe 2 Useless Box Lab Project #2 Adding a computer to the Useless Box alows us

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

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

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

DESIGN OF QUANTIZED FIR FILTER USING COMPENSATING ZEROS

DESIGN OF QUANTIZED FIR FILTER USING COMPENSATING ZEROS DESIGN OF QUANTIZED FIR FILTER USING COMPENSATING ZEROS Nivedita Yadav, O.P. Singh, Ashish Dixit Department of Electronics and Communication Engineering, Amity University, Lucknow Campus, Lucknow, (India)

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

convert a two s complement number back into a recognizable magnitude.

convert a two s complement number back into a recognizable magnitude. 1 INTRODUCTION The previous lesson introduced binary and hexadecimal numbers. In this lesson we look at simple arithmetic operations using these number systems. In particular, we examine the problem of

More information

EE 521: Instrumentation and Measurements

EE 521: Instrumentation and Measurements Aly El-Osery Electrical Engineering Department, New Mexico Tech Socorro, New Mexico, USA September 23, 2009 1 / 18 1 Sampling 2 Quantization 3 Digital-to-Analog Converter 4 Analog-to-Digital Converter

More information

Logic. Combinational. inputs. outputs. the result. system can

Logic. Combinational. inputs. outputs. the result. system can Digital Electronics Combinational Logic Functions Digital logic circuits can be classified as either combinational or sequential circuits. A combinational circuit is one where the output at any time depends

More information

Higher-Order Σ Modulators and the Σ Toolbox

Higher-Order Σ Modulators and the Σ Toolbox ECE37 Advanced Analog Circuits Higher-Order Σ Modulators and the Σ Toolbox Richard Schreier richard.schreier@analog.com NLCOTD: Dynamic Flip-Flop Standard CMOS version D CK Q Q Can the circuit be simplified?

More information

What does such a voltage signal look like? Signals are commonly observed and graphed as functions of time:

What does such a voltage signal look like? Signals are commonly observed and graphed as functions of time: Objectives Upon completion of this module, you should be able to: understand uniform quantizers, including dynamic range and sources of error, represent numbers in two s complement binary form, assign

More information

Digital Filter Implementation 1

Digital Filter Implementation 1 Digital Filter Implementation 1 V 5, November 13, 2017 Christian Feldbauer, Bernhard Geiger, Josef Kulmer, {kulmer}@tugraz.at Signal Processing and Speech Communication Laboratory, www.spsc.tugraz.at Inffeldgasse

More information

EE482: Digital Signal Processing Applications

EE482: Digital Signal Processing Applications Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu EE482: Digital Signal Processing Applications Spring 2014 TTh 14:30-15:45 CBC C222 Lecture 11 Adaptive Filtering 14/03/04 http://www.ee.unlv.edu/~b1morris/ee482/

More information

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation 4:332:23 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 203 Lecture #3: Addition, Subtraction, Multiplication, and Division 2 s-complement Representation RECALL

More information

Analysis of methods for speech signals quantization

Analysis of methods for speech signals quantization INFOTEH-JAHORINA Vol. 14, March 2015. Analysis of methods for speech signals quantization Stefan Stojkov Mihajlo Pupin Institute, University of Belgrade Belgrade, Serbia e-mail: stefan.stojkov@pupin.rs

More information

EE5585 Data Compression April 18, Lecture 23

EE5585 Data Compression April 18, Lecture 23 EE5585 Data Compression April 18, 013 Lecture 3 Instructor: Arya Mazumdar Scribe: Trevor Webster Differential Encoding Suppose we have a signal that is slowly varying For instance, if we were looking at

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

ELEN Electronique numérique

ELEN Electronique numérique ELEN0040 - Electronique numérique Patricia ROUSSEAUX Année académique 2014-2015 CHAPITRE 3 Combinational Logic Circuits ELEN0040 3-4 1 Combinational Functional Blocks 1.1 Rudimentary Functions 1.2 Functions

More information

Lecture 19 IIR Filters

Lecture 19 IIR Filters Lecture 19 IIR Filters Fundamentals of Digital Signal Processing Spring, 2012 Wei-Ta Chu 2012/5/10 1 General IIR Difference Equation IIR system: infinite-impulse response system The most general class

More information

Lecture 2 Review on Digital Logic (Part 1)

Lecture 2 Review on Digital Logic (Part 1) Lecture 2 Review on Digital Logic (Part 1) Xuan Silvia Zhang Washington University in St. Louis http://classes.engineering.wustl.edu/ese461/ Grading Engagement 5% Review Quiz 10% Homework 10% Labs 40%

More information

An Fir-Filter Example: Hanning Filter

An Fir-Filter Example: Hanning Filter An Fir-Filter Example: Hanning Filter Josef Goette Bern University of Applied Sciences, Biel Institute of Human Centered Engineering - microlab Josef.Goette@bfh.ch February 7, 2018 Contents 1 Mathematical

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

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

CMPT 889: Lecture 3 Fundamentals of Digital Audio, Discrete-Time Signals

CMPT 889: Lecture 3 Fundamentals of Digital Audio, Discrete-Time Signals CMPT 889: Lecture 3 Fundamentals of Digital Audio, Discrete-Time Signals Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 6, 2005 1 Sound Sound waves are longitudinal

More information

Stability Condition in Terms of the Pole Locations

Stability Condition in Terms of the Pole Locations Stability Condition in Terms of the Pole Locations A causal LTI digital filter is BIBO stable if and only if its impulse response h[n] is absolutely summable, i.e., 1 = S h [ n] < n= We now develop a stability

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

Seminar: D. Jeon, Energy-efficient Digital Signal Processing Hardware Design Mon Sept 22, 9:30-11:30am in 3316 EECS

Seminar: D. Jeon, Energy-efficient Digital Signal Processing Hardware Design Mon Sept 22, 9:30-11:30am in 3316 EECS EECS 452 Lecture 6 Today: Announcements: Rounding and quantization Analog to digital conversion Lab 3 starts next week Hw3 due on tuesday Project teaming meeting: today 7-9PM, Dow 3150 My new office hours:

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

INTRODUCTION TO DELTA-SIGMA ADCS

INTRODUCTION TO DELTA-SIGMA ADCS ECE37 Advanced Analog Circuits INTRODUCTION TO DELTA-SIGMA ADCS Richard Schreier richard.schreier@analog.com NLCOTD: Level Translator VDD > VDD2, e.g. 3-V logic? -V logic VDD < VDD2, e.g. -V logic? 3-V

More information

Digital Techniques. Figure 1: Block diagram of digital computer. Processor or Arithmetic logic unit ALU. Control Unit. Storage or memory unit

Digital Techniques. Figure 1: Block diagram of digital computer. Processor or Arithmetic logic unit ALU. Control Unit. Storage or memory unit Digital Techniques 1. Binary System The digital computer is the best example of a digital system. A main characteristic of digital system is its ability to manipulate discrete elements of information.

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

Analog vs. discrete signals

Analog vs. discrete signals Analog vs. discrete signals Continuous-time signals are also known as analog signals because their amplitude is analogous (i.e., proportional) to the physical quantity they represent. Discrete-time signals

More information

The Cooper Union Department of Electrical Engineering ECE111 Signal Processing & Systems Analysis Final May 4, 2012

The Cooper Union Department of Electrical Engineering ECE111 Signal Processing & Systems Analysis Final May 4, 2012 The Cooper Union Department of Electrical Engineering ECE111 Signal Processing & Systems Analysis Final May 4, 2012 Time: 3 hours. Close book, closed notes. No calculators. Part I: ANSWER ALL PARTS. WRITE

More information

DISCRETE-TIME SIGNAL PROCESSING

DISCRETE-TIME SIGNAL PROCESSING THIRD EDITION DISCRETE-TIME SIGNAL PROCESSING ALAN V. OPPENHEIM MASSACHUSETTS INSTITUTE OF TECHNOLOGY RONALD W. SCHÄFER HEWLETT-PACKARD LABORATORIES Upper Saddle River Boston Columbus San Francisco New

More information

ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals. 1. Sampling and Reconstruction 2. Quantization

ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals. 1. Sampling and Reconstruction 2. Quantization ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals 1. Sampling and Reconstruction 2. Quantization 1 1. Sampling & Reconstruction DSP must interact with an analog world: A to D D to A x(t)

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

Digital Systems and Information Part II

Digital Systems and Information Part II Digital Systems and Information Part II Overview Arithmetic Operations General Remarks Unsigned and Signed Binary Operations Number representation using Decimal Codes BCD code and Seven-Segment Code Text

More information

Binary addition example worked out

Binary addition example worked out Binary addition example worked out Some terms are given here Exercise: what are these numbers equivalent to in decimal? The initial carry in is implicitly 0 1 1 1 0 (Carries) 1 0 1 1 (Augend) + 1 1 1 0

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

Discrete Time Signals and Switched Capacitor Circuits (rest of chapter , 10.2)

Discrete Time Signals and Switched Capacitor Circuits (rest of chapter , 10.2) Discrete Time Signals and Switched Capacitor Circuits (rest of chapter 9 + 0., 0.2) Tuesday 6th of February, 200, 9:5 :45 Snorre Aunet, sa@ifi.uio.no Nanoelectronics Group, Dept. of Informatics Office

More information

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) State any two Boolean laws. (Any 2 laws 1 mark each)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) State any two Boolean laws. (Any 2 laws 1 mark each) Subject Code: 17333 Model Answer Page 1/ 27 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model

More information

Ch. 7: Z-transform Reading

Ch. 7: Z-transform Reading c J. Fessler, June 9, 3, 6:3 (student version) 7. Ch. 7: Z-transform Definition Properties linearity / superposition time shift convolution: y[n] =h[n] x[n] Y (z) =H(z) X(z) Inverse z-transform by coefficient

More information

Higher-Order Modulators: MOD2 and MODN

Higher-Order Modulators: MOD2 and MODN ECE37 Advanced Analog Circuits Lecture 2 Higher-Order Modulators: MOD2 and MODN Richard Schreier richard.schreier@analog.com Trevor Caldwell trevor.caldwell@utoronto.ca Course Goals Deepen understanding

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

Digital Systems Overview. Unit 1 Numbering Systems. Why Digital Systems? Levels of Design Abstraction. Dissecting Decimal Numbers

Digital Systems Overview. Unit 1 Numbering Systems. Why Digital Systems? Levels of Design Abstraction. Dissecting Decimal Numbers Unit Numbering Systems Fundamentals of Logic Design EE2369 Prof. Eric MacDonald Fall Semester 2003 Digital Systems Overview Digital Systems are Home PC XBOX or Playstation2 Cell phone Network router Data

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

Lecture 10, ATIK. Data converters 3

Lecture 10, ATIK. Data converters 3 Lecture, ATIK Data converters 3 What did we do last time? A quick glance at sigma-delta modulators Understanding how the noise is shaped to higher frequencies DACs A case study of the current-steering

More information