Representation of Numbers and Arithmetic in Signal Processors

Size: px
Start display at page:

Download "Representation of Numbers and Arithmetic in Signal Processors"

Transcription

1 Representation of Numbers and Arithmetic in Signal Processors 1. General facts Without having any information regarding the used consensus for representing binary numbers in a computer, no exact value can be attributed to a binary number, the number being represented by a string of bits. For instance, what is the decimal value for B = X? Is it a positive or a negative value? It depends on the representation used. In choosing a Digital Signal Processor (DSP) for a certain application one of the important criteria in the decision process is the data (binary) representation by the processor. From this point of view the commercial market of DSPs can be classified as shown in figure 1. Fig. 1 Regular DSPs number representation The fixed point arithmetic was used by the first DSPs and is still used in most DSPs nowadays. Fixed point DSPs can represent numbers either by: integer (integer arithmetic) used by a DSP in control operations, computing of addresses and other operations that cannot concern signals, or fractional (fractional arithmetic) with values between -1 and +1, useful in signal computations The algorithms and the hard drive used in implementing the fractional arithmetic are virtually identical to the ones used by the integer arithmetic. The main difference between the two types of arithmetic is in the usage of the results of the multiplication operations. Most of the DSPs in fixed point accept both arithmetic. Because the numerical systems use a word of a certain length for numeral representation, arithmetical operations will thus be executed with a certain (limited) precision. Numbers will be 1

2 thus represented on a circle (ring) instead of the infinite real axis, a situation in which arithmetical overflow may occur. In the case of floating point DSPs, the values are represented by a mantissa and an exponent according to the relationship mantissa*2 exponent. The mantissa is generally a fractional number between -1.0 and +1.0, whereas the exponent is an integer that represents the number of positions that the binary point (term defined in analogy with the decimal point) must be moved leftward to obtain the represented value. Floating point processors are easier to program in comparison with those in fixed point, but are more expensive as well. This is due to the increased complexity of the circuit that determines a greater surface of the chip. The ease of programming for these processors is given by the fact that the programmer has no recurring need to manage the overflow cases of the buffer as with the case of the fixed point processors (this management represents periodical scaling of the result in different phases of development). Most of the low cost applications require the use of fixed point processors. In this case, programming requires usually no difficulties because the numerical simulation phase of the algorithm (the one phase that precedes development), easily detects all the situations in which a correction of the result in necessary to avoid saturation. For a better understanding of the overflow phenomena, we will present two instances which are to be met when dealing with DSPs or processors supporting the MMx technology. This are: wraparound (modulo 2 n ) and saturation. For example, we will present an image based application: having the original image on a grayscale (Fig.2a) we can obtain the wraparound effect (Fig. 2b) and the saturation effect (Fig. 2c) using the following processing steps: - if the addition result between pixels and the value produces overflow, the result is truncated, taking in consideration the least significant bits (the wraparound effect), due to the limitation to n bits; - if the addition result produces overflow, saturation occurs and the result is limited to the maximum value of the domain; Fig2. a) Grayscale original image; b) Modulo 2 n operation c) Saturation Small numbers represent areas with dark (black) grayscale, while large numbers represent lightly colored areas (white). By using 8 bits for representing the pixel values in the image, we will obtain the [0; 255] range, with 0 standing for black and 255 for white. In order to lighten the original image (Fig. 2a), we can add an integer positive number (e.g =40 h ) for each pixel in the image. 2

3 In the case of the wraparound effect (modulo 2 8 ), if there is any overflow (the value of a pixel overflows the maximum threshold of 255), the final result will be truncated such that only the least significant bits will be retained. For instance, if we add to (almost white), we will obtain: 250 decimal binary + 64 decimal binary = 314 decimal = binary -an overflow occurs = 58 decimal = binary -we keep only the least significant 8 bits The result is 58 10, creating a dark colored area (close to black) instead of a lighter colored one, as expected. A reversed effect to the desired one was obtained (shade inversion) because the light shade values have become dark shade areas. In case of saturation, by adding a value to every pixel in the original image, light colored areas will become purely white. Saturation threshold in this case is the maximum value that can be represented on 8 bits, that is 255. Fig. 3 a)obtaining the pixel values in case of modulo 2 8 b)obtaining pixel values in case of saturation 2. Integer representation On an n bit word we can represent 2 n numbers in the range of numbers equally spaced by the quantization step q=1. The unsigned binary representation, for an n bit word is: B 2 = b n-1 b n-2. b 1 b 0 with the decimal value: B 10 = b n-1 *2 n-1 + +b 1 *2+b 0 placed in the [0, 2 n -1] range. Figure 4 shows the wheel of numbers on which several properties of addition can be verified for values represented by a finite number of bits, in this case n=4. Fig. 4 The wheel of unsigned numbers represented on 4 bits 3

4 Example: By using the 4 bit unsigned representation we will increment the greatest representative number this way: = = = 0 10, the number is no longer a 4 bit number, overflow has occurred! Transport bit Binary unsigned numbers on n bits represent a modulo 2 n system! In order to represent binary negative numbers (with sign) we use the representation in two s complement. A two complement number on n bits is: B 2 = b n-1 b n-2 b 1 b 0, with the decimal value: B 10 = -b n-1 *2 n-1 + +b 1 *2 + b 0 placed in the [-2 n-1, 2 n-1-1] range. Fig. 5 The wheel of signed numbers represented on 4 bits Observation: In the decimal representation and are identical, but in the two s complement representation for numbers and we cannot assume the same thing. Why is that? In the decimal representation we use as a sign a special character (-), while in the binary representation the sign is given by the sign bit. This is why the decimal value of the number depends on the length on which it is represented. If on 5 bits the value is 10 10, whereas on 4 bits the value is Properties: The product of 2 integer binary numbers in fixed point represented on n bits will generate a result on 2n bits The addition of 2 numbers represented on n bits can gine a result on n+1 bits The multiplication of 2 integers in fixed point has a great probability of overflow. 4

5 On N successive additions log 2 (N) supplementary bits are needed to avoid overflow. Example: By using the fixed point representation on 4 bits is to be done the following multiplication: 3 10 with Observation: The result is an 8 bits number and not to be forgotten is the sign extension regarding the length of the resulting word = = = If we go back to the 4 bit representation the result will be = -6 10, so it is correct. Example: Compute the product in fixed point on 4 bits between the numbers and = = = If we go back to the 4 bit representation the result will be = -2 10, so it is not correct. Properties: For any sequence of operations in which the final result can be correctly represented in the given range we can calculate correctly the final result even if overflows appear on intermediate results. Example: By using the 4 bit signed representation ([-8, 7) range) calculate the expression: = (overflow) (correct) 5

6 3. Fractional representation In order to avoid the overflow issue, the fractional representation in fixed point limits or normalizes the numbers in the range [-1.0, 1.0] solving the problem. Exception: (-1)*(-1) = +1! which does not belong to the [-1, +1) range. Overflow is still possible when adding or subtracting! Observations: 1. The result of multiplication is truncated resulting in precision losses by removal of the least significant bits. 2. The fractional representation on n bits is obtained through shifting the point with n-1 positions to the left, meaning that the representation contains a sign bit, radix point and n- 1 fractional bits, so: B 2fractional = b 0 b 1..b n-2 b n-1, with the decimal value B10 = -b 0 * b 1 * b n-1 * 2 -(n-1). 3. The quantization step is q=2 -(n-1). The fractional representation is also known as the Qx representation, where x is the n bits fractional number. The total number of bits of the representation is x+1. This representation is usual for fixed point (16 bits) DSPs is Q15. The point location is not necessarily specified this being a programming instrument. Therefore by using the 16 bit representation, the range of numbers can be: [0, 65535] - on the unsigned integer representation [-32768, ] - on the signed integer representation [-1, ] - on the fractional representation All this variants are used on the DSP applications. Fig. 6 The wheel of numbers for 4 bits fractional representation 6

7 Observation: By adding two binary numbers they must be represented through the same convention. Examples: Represent in the following format: a) Q3, the numbers and 0.75 In fixed point DSPs the radix point (decimal) is not available, because it is the programmer s duty. In arithmetical operations with fractional data or signed we use the same logic and arithmetic unit (UAL). Fractional representation is obtained by scaling the value 2 x where x is the number of fractional bits. Therefore: = * 2 3 = = = * 2 3 = = 6 10 b) Q15, the number X 10 = E-003 We compute X*2 15 = (~ -295), which if written as a two s complement is X Q15 = 0FED9h. Multiply by using the fractional representation on 4 bits: c) with Observation: Pay attention to the sign extension. The result will have 6 fractional bits out of = = = Supplementary sign bit We go back to the 4 bits representation: = = which is a correct number. d) with * = = We go back to the 4 bits representation: 7

8 = = which is incorrect due to truncation. e) with in Q15 format * Q 30 format We pass on to the Q15 format by eliminating the supplementary sign bit and obtaining: = , correct. Advantage: Through the use of binary functions we obtain a higher speed in closed loop computations. Disadvantage: The result may not be exact. As from above the memory stores the value (-4/16). Bits stretched between 2-4 and 2-6 have been truncated. The correct result is (-3/16)! It is worth mentioning that the 4 bit multiplication is not done at a real capacity of C28x operating on 32 bits. In such case truncation will affect bits between 2-32 and In most cases only the noise is truncated. Despite of this, some reaction apps (such as IIR filters) can be affected by errors and lead to a certain level of instability. It is the programmer s duty to observe this potential source of failure in view of the use of binary functions. 4. Operations with numbers greater than 1 a) All coefficients in the algorithm are scaled so they belong to the [-1,1) range. The effect is an attenuated output signal that keeps the frequency response. b) The properties of integer multiplication with the unity are used: A*B=(A-1)*B+B Example: Multiply the sample X i =0.625 with the coefficient We assume the 4 bit representation * = ( ) * = * = * * We come back to the 4 bit representation (Q3): = rounding due to limited number of bits. c) Use of 2 s integer multiplication property: A*B=A/2 * B + A/2 * B 8

9 Example: * = , represent in Q3: 1.375/2 = = which in rounded Q3 is = * = = ~ * = = ~ (in Q3 format) 5. Floating point representation The core of a floating point processor is an arithmetical unit that supports floating point operations as stated in the IEEE 754/85 standard. A typical example for this class is the x86 family from Intel, starting with the 486 processor. Floating point processors are very efficient when operating with floating point data and allow a very large range of numerical computations. These processors are not that efficient in task control (bit manipulation, input/output control, interruption response) and besides they are pretty expensive. The IEEE 754/85 includes finite numbers of binary (2 base) or decimal (10 base) nature. The numerical value of the finite number will be given by the formula: (-1) s f b e, where b is the number base. Every number is described through 3 parameters: s-the sign (0 or 1), f-mantissa and e-exponent. For instance, if the sign is 1 (a negative number), the mantissa is 12345, the exponent is -3 and we consider base 10, then the number will be Every possible finite value can be represented by a certain format are determined by the: numeration base, the maximum number of digits in the mantissa (that define the precision p) and the maximum value of the exponent, emax. The mantissa needs to be an integer number in the [0; b p -1] domain. The exponent has to be an integer so that 1-emax q+p-1 emax. The IEEE 754/85 standard defines 5 basic forms: three binary forms (that can code numbers on 32, 64 or 128 bits) and two decimals (can code numbers on 64 or 128 bits). The binary format for 32 bits simple precision in floating point describes floating point numbers as: s e e e e e e e e f f f f f f f f f f f f f f f f f f f f f f f 1 sign bit, 8 bit exponent, 23 bit mantissa (fractional bits) S=sign bit e e=8 bits that represent the exponent f f=23 bits that represent the mantissa (fractional bits) Advantage: the exponent offers a wide dynamic range of representing numbers; Disadvantage: the precision of number representation depends on the exponent. 9

10 Floating point representation - Obtaining bits: Sign bit: Negative: bit 31 = 1 Positive : bit 30 = 0 Mantissa: M = 1+m m = Exponent: where 1 M<2 An 8 bit signed value, memorized with the offset +127 This way a value computation will be done this way: z = (-1) S M 2 E-OFFSET Examples: Write in a floating point format the next numbers: 1) 0x 3FE0 0000h = B S = 0 E = = 127 M = (1) = = 1.75 Z = (-1) 0 * 1.75 * = ) Z = -2.5 S = = 1.25 * = E OFFSET E = 128 M = 1.25 = (1).01 = Binar: B = 0x C h Floating point representation has also disadvantages: Example *: x = 10.0 (0x ) +y = (0x347F8CF1) z = Wrong! The value cannot be represented with floating point simple precision. 0x = <= it cannot be represented 0x = In this way, the number will be rounded to

11 Properties: The addition of the represented numbers in floating point assumes their representation with the same exponent; the obtained result is then rounded and normalized if needed; The multiplication of two floating point numbers is done by the following rule: the result exponent will be written on a number of bits equal with the sum of bits of the exponents of numbers added, and the obtained result is then rounded and normalized. 6. The IQ format The trend until now was in representing fractional numbers in which the fractional point stands after the MSB. Generally, this point can be put anywhere in the binary representation. A higher resolution can thus be obtained. I -stands for the integer part (integer) Q -stands for fractional part (quotient) Advantage: the precision is the same for all numbers Disadvantage: the dynamic range is limited comparative to the floating point representation 31 0 s i i i i i i i i.qqqqqqqqqqqqqqqqqqqqqqq bit mantissa -2 I + 2 I Q Example 1: Format I1Q3 3 0 s.qqq Most negative decimal number: -1.0 = Most positive decimal number: = Lowest negative decimal IQ number: -1*2-3 = Lowest positive decimal IQ number: 2-3 = Range: Resolution: 2^-3 Example 2: Format I3Q1 3 0 sii.q Most negative decimal number: -4.0 =

12 Most positive decimal number: +3.5 = Lowest negative decimal IQ number: -1*2-1 = Lowest positive decimal IQ number: 2-1 = Domain: Resolution: 2-1 Example 3: Format I1Q31 s.qqq qqqq qqqq qqqq qqqq qqqq qqqq qqqq Most negative decimal number: -1.0 = B Most positive decimal number: 1-1/2 31 = B Lowest negative decimal IQ number: -1*2-31 = B Lowest positive decimal IQ number: 2-31 = B Domain: [ ) Resolution: 2-31 If we transpose Example * in IQ, we will have: x = 10.0 (0x0A000000) +y = (0x ) z = (0x0A000004), number that can be represented in IQ format By using the IQ format instead of the floating point representation we can obtain a higher precision in data representation. 7. Conclusions Integer versus fractional numbers: Range: integer numbers have a maximum range that is determined by the number of bits on which the number is represented; fractional numbers can be in the [-1;+1] range Precision: integer numbers have a maximum precision of 1; fractional numbers have a precision determined by the number of bits 12

13 Fixed point versus floating point arithmetic: Floating point arithmetic is more flexible than the fixed point type. The main advantage is in the access to a greater dynamic range for the represented data. Examples of processors: Floating point: Intel Pentium Series, Texas Instruments C67xxDSP Fixed point: Motorola HC68x, Infineon C166, Texas Instruments TMS430, TMS320C5000, C2000 Fixed point processors: Can represent: Integer numbers (integer arithmetic): for control, address computation (signals not implied) Fractional: for signal processing They are low priced. They are easy to program: the simulation step can detect any situation in which correction of the result is necessary to avoid overflow. Floating point processors: Numbers have a mantissasa and an exponent: mantissasa*2 exponent. It is a highly flexible technology. They have a large dynamic range for number representation. They are easy to program: the programmer need not account for the overflow cases of the accumulator. Disadvantage: They are costly. 8. Homework 8.1 There are given below the 15 coefficients of a high pass FIR filter. Convert the coefficients in Q15 format. (h1=h15= e-3; h2=h14= e-3; h3=h13= e-2; h4=h12= E-2; h5=h11= e-2; h6=h10= ; h7=h9= ; h8= ) 8.2 Following the 3 examples in IQ format, specify the values corresponding to I8Q24 format. 8.3 Write in floating point format the number: 0x BFB0 0000h on 32 bits. 8.4 More homework: Study the following examples for addition, substraction and multiplication of numbers in floating point: Example 1. Make the addition of the numbers: and = * = * 10 2 = *

14 Detailed: e = 5; z = ( ) + e = 2; z = ( ) e = 5; z = e = 5; z = (after shifting) e = 5; sum = (real sum is: ) If we go back to 7 digit representation, the result will be: e=5; sum= (meaning the final sum will be: ), so the result was rounded and normalized. The 3 digits 654 were lost, this beeing the rounding error. Example 2. Make the substraction of the numbers: and : = * = * 105 = * 105 Detailed: e = 5; z = ( ) -e = 5; z = ( ) e = 5; d = (the real difference is: ) If we go back to the 7 digit representation the result will be: e= -1; s= (meaning the final result will be: 0.4), that is the rounded and normalized result. The runding error in this case is approximately 20%. Example 3. Make the multiplication of the numbers: and : e = 3; z = ( ) e = 5; z = ( ) e = 8; z = e = 8; z = (after shifting) e = 8; prod = (the real result is: ) e = 8; prod = (after rounding) e = 9; prod = (after normalization) 14

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers Chapter 03: Computer Arithmetic Lesson 09: Arithmetic using floating point numbers Objective To understand arithmetic operations in case of floating point numbers 2 Multiplication of Floating Point Numbers

More information

In this lesson you will learn: how to add and multiply positive binary integers how to work with signed binary numbers using two s complement how fixed and floating point numbers are used to represent

More information

Divide: Paper & Pencil

Divide: Paper & Pencil Divide: Paper & Pencil 1001 Quotient Divisor 1000 1001010 Dividend -1000 10 101 1010 1000 10 Remainder See how big a number can be subtracted, creating quotient bit on each step Binary => 1 * divisor or

More information

Chapter 4. Operations on Data

Chapter 4. Operations on Data Chapter 4 Operations on Data 1 OBJECTIVES After reading this chapter, the reader should be able to: List the three categories of operations performed on data. Perform unary and binary logic operations

More information

Computer Arithmetic. L. Liu Department of Computer Science, ETH Zürich Fall semester, Reconfigurable Computing Systems ( L) Fall 2012

Computer Arithmetic. L. Liu Department of Computer Science, ETH Zürich Fall semester, Reconfigurable Computing Systems ( L) Fall 2012 Reconfigurable Computing Systems (252-2210-00L) all 2012 Computer Arithmetic L. Liu Department of Computer Science, ETH Zürich all semester, 2012 Source: ixed-point arithmetic slides come from Prof. Jarmo

More information

Floating Point Arithmetic

Floating Point Arithmetic Floating Point Arithmetic CS 365 Floating-Point What can be represented in N bits? Unsigned 0 to 2 N 2s Complement -2 N-1 to 2 N-1-1 But, what about? very large numbers? 9,349,398,989,787,762,244,859,087,678

More information

Number Systems CHAPTER Positional Number Systems

Number Systems CHAPTER Positional Number Systems CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of

More information

CHAPTER 5: Representing Numerical Data

CHAPTER 5: Representing Numerical Data CHAPTER 5: Representing Numerical Data The Architecture of Computer Hardware and Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint

More information

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-1 CHAPTER V CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-2 NUMBER SYSTEMS RADIX-R REPRESENTATION Decimal number expansion 73625 10 = ( 7 10 4 ) + ( 3 10 3 ) + ( 6 10 2 ) + ( 2 10 1 ) +(

More information

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning 4 Operations On Data 4.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three categories of operations performed on data.

More information

Number System. Introduction. Decimal Numbers

Number System. Introduction. Decimal Numbers Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26

More information

CHAPTER 1 Numerical Representation

CHAPTER 1 Numerical Representation CHAPTER 1 Numerical Representation To process a signal digitally, it must be represented in a digital format. This point may seem obvious, but it turns out that there are a number of different ways to

More information

Introduction to Computers and Programming. Numeric Values

Introduction to Computers and Programming. Numeric Values Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 5 Reading: B pp. 47-71 Sept 1 003 Numeric Values Storing the value of 5 10 using ASCII: 00110010 00110101 Binary notation: 00000000

More information

Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3

Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3 Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Instructor: Nicole Hynes nicole.hynes@rutgers.edu 1 Fixed Point Numbers Fixed point number: integer part

More information

Operations On Data CHAPTER 4. (Solutions to Odd-Numbered Problems) Review Questions

Operations On Data CHAPTER 4. (Solutions to Odd-Numbered Problems) Review Questions CHAPTER 4 Operations On Data (Solutions to Odd-Numbered Problems) Review Questions 1. Arithmetic operations interpret bit patterns as numbers. Logical operations interpret each bit as a logical values

More information

Finite arithmetic and error analysis

Finite arithmetic and error analysis Finite arithmetic and error analysis Escuela de Ingeniería Informática de Oviedo (Dpto de Matemáticas-UniOvi) Numerical Computation Finite arithmetic and error analysis 1 / 45 Outline 1 Number representation:

More information

Digital Signal Processing Introduction to Finite-Precision Numerical Effects

Digital Signal Processing Introduction to Finite-Precision Numerical Effects Digital Signal Processing Introduction to Finite-Precision Numerical Effects D. Richard Brown III D. Richard Brown III 1 / 9 Floating-Point vs. Fixed-Point DSP chips are generally divided into fixed-point

More information

A Guide. DSP Library

A Guide. DSP Library DSP A Guide To The DSP Library SystemView by ELANIX Copyright 1994-2005, Eagleware Corporation All rights reserved. Eagleware-Elanix Corporation 3585 Engineering Drive, Suite 150 Norcross, GA 30092 USA

More information

Chapter 3. Errors and numerical stability

Chapter 3. Errors and numerical stability Chapter 3 Errors and numerical stability 1 Representation of numbers Binary system : micro-transistor in state off 0 on 1 Smallest amount of stored data bit Object in memory chain of 1 and 0 10011000110101001111010010100010

More information

The ALU consists of combinational logic. Processes all data in the CPU. ALL von Neuman machines have an ALU loop.

The ALU consists of combinational logic. Processes all data in the CPU. ALL von Neuman machines have an ALU loop. CS 320 Ch 10 Computer Arithmetic The ALU consists of combinational logic. Processes all data in the CPU. ALL von Neuman machines have an ALU loop. Signed integers are typically represented in sign-magnitude

More information

Inf2C - Computer Systems Lecture 2 Data Representation

Inf2C - Computer Systems Lecture 2 Data Representation Inf2C - Computer Systems Lecture 2 Data Representation Boris Grot School of Informatics University of Edinburgh Last lecture Moore s law Types of computer systems Computer components Computer system stack

More information

MC1601 Computer Organization

MC1601 Computer Organization MC1601 Computer Organization Unit 1 : Digital Fundamentals Lesson1 : Number Systems and Conversions (KSB) (MCA) (2009-12/ODD) (2009-10/1 A&B) Coverage - Lesson1 Shows how various data types found in digital

More information

CS321. Introduction to Numerical Methods

CS321. Introduction to Numerical Methods CS31 Introduction to Numerical Methods Lecture 1 Number Representations and Errors Professor Jun Zhang Department of Computer Science University of Kentucky Lexington, KY 40506 0633 August 5, 017 Number

More information

COMPUTER ARCHITECTURE AND ORGANIZATION. Operation Add Magnitudes Subtract Magnitudes (+A) + ( B) + (A B) (B A) + (A B)

COMPUTER ARCHITECTURE AND ORGANIZATION. Operation Add Magnitudes Subtract Magnitudes (+A) + ( B) + (A B) (B A) + (A B) Computer Arithmetic Data is manipulated by using the arithmetic instructions in digital computers. Data is manipulated to produce results necessary to give solution for the computation problems. The Addition,

More information

Chapter Three. Arithmetic

Chapter Three. Arithmetic Chapter Three 1 Arithmetic Where we've been: Performance (seconds, cycles, instructions) Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's up ahead: Implementing

More information

unused unused unused unused unused unused

unused unused unused unused unused unused BCD numbers. In some applications, such as in the financial industry, the errors that can creep in due to converting numbers back and forth between decimal and binary is unacceptable. For these applications

More information

CHW 261: Logic Design

CHW 261: Logic Design CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER

More information

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng. CS 265 Computer Architecture Wei Lu, Ph.D., P.Eng. 1 Part 1: Data Representation Our goal: revisit and re-establish fundamental of mathematics for the computer architecture course Overview: what are bits

More information

Number Systems and Computer Arithmetic

Number Systems and Computer Arithmetic Number Systems and Computer Arithmetic Counting to four billion two fingers at a time What do all those bits mean now? bits (011011011100010...01) instruction R-format I-format... integer data number text

More information

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1.1 Introduction Given that digital logic and memory devices are based on two electrical states (on and off), it is natural to use a number

More information

Errors in Computation

Errors in Computation Theory of Errors Content Errors in computation Absolute Error Relative Error Roundoff Errors Truncation Errors Floating Point Numbers Normalized Floating Point Numbers Roundoff Error in Floating Point

More information

Chapter 2. Data Representation in Computer Systems

Chapter 2. Data Representation in Computer Systems Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting

More information

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014 Problem 1 (4 parts, 21 points) Encoders and Pass Gates Part A (8 points) Suppose the circuit below has the following input priority: I 1 > I 3 > I 0 > I 2. Complete the truth table by filling in the input

More information

COMP Overview of Tutorial #2

COMP Overview of Tutorial #2 COMP 1402 Winter 2008 Tutorial #2 Overview of Tutorial #2 Number representation basics Binary conversions Octal conversions Hexadecimal conversions Signed numbers (signed magnitude, one s and two s complement,

More information

VIII. DSP Processors. Digital Signal Processing 8 December 24, 2009

VIII. DSP Processors. Digital Signal Processing 8 December 24, 2009 Digital Signal Processing 8 December 24, 2009 VIII. DSP Processors 2007 Syllabus: Introduction to programmable DSPs: Multiplier and Multiplier-Accumulator (MAC), Modified bus structures and memory access

More information

Signed umbers. Sign/Magnitude otation

Signed umbers. Sign/Magnitude otation Signed umbers So far we have discussed unsigned number representations. In particular, we have looked at the binary number system and shorthand methods in representing binary codes. With m binary digits,

More information

LAB WORK NO. 2 THE INTERNAL DATA REPRESENTATION

LAB WORK NO. 2 THE INTERNAL DATA REPRESENTATION LAB WORK NO. 2 THE INTERNAL DATA REPRESENTATION 1. Object of lab work The purpose of this work is to understand the internal representation of different types of data in the computer. We will study and

More information

Number Systems. Both numbers are positive

Number Systems. Both numbers are positive Number Systems Range of Numbers and Overflow When arithmetic operation such as Addition, Subtraction, Multiplication and Division are performed on numbers the results generated may exceed the range of

More information

Advanced Computer Architecture-CS501

Advanced Computer Architecture-CS501 Advanced Computer Architecture Lecture No. 34 Reading Material Vincent P. Heuring & Harry F. Jordan Chapter 6 Computer Systems Design and Architecture 6.1, 6.2 Summary Introduction to ALSU Radix Conversion

More information

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning 4 Operations On Data 4.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three categories of operations performed on data.

More information

Floating Point. The World is Not Just Integers. Programming languages support numbers with fraction

Floating Point. The World is Not Just Integers. Programming languages support numbers with fraction 1 Floating Point The World is Not Just Integers Programming languages support numbers with fraction Called floating-point numbers Examples: 3.14159265 (π) 2.71828 (e) 0.000000001 or 1.0 10 9 (seconds in

More information

Number Representations

Number Representations Number Representations times XVII LIX CLXX -XVII D(CCL)LL DCCC LLLL X-X X-VII = DCCC CC III = MIII X-VII = VIIIII-VII = III 1/25/02 Memory Organization Viewed as a large, single-dimension array, with an

More information

Lecture Objectives. Structured Programming & an Introduction to Error. Review the basic good habits of programming

Lecture Objectives. Structured Programming & an Introduction to Error. Review the basic good habits of programming Structured Programming & an Introduction to Error Lecture Objectives Review the basic good habits of programming To understand basic concepts of error and error estimation as it applies to Numerical Methods

More information

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence GATE Postal Correspondence Computer Sc. & IT 1 Digital Logic Computer Sciencee & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,

More information

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude Chapter 2 Positional number systems A positional number system represents numeric values as sequences of one or more digits. Each digit in the representation is weighted according to its position in the

More information

Computer Organisation CS303

Computer Organisation CS303 Computer Organisation CS303 Module Period Assignments 1 Day 1 to Day 6 1. Write a program to evaluate the arithmetic statement: X=(A-B + C * (D * E-F))/G + H*K a. Using a general register computer with

More information

CS101 Lecture 04: Binary Arithmetic

CS101 Lecture 04: Binary Arithmetic CS101 Lecture 04: Binary Arithmetic Binary Number Addition Two s complement encoding Briefly: real number representation Aaron Stevens (azs@bu.edu) 25 January 2013 What You ll Learn Today Counting in binary

More information

Organisasi Sistem Komputer

Organisasi Sistem Komputer LOGO Organisasi Sistem Komputer OSK 8 Aritmatika Komputer 1 1 PT. Elektronika FT UNY Does the calculations Arithmetic & Logic Unit Everything else in the computer is there to service this unit Handles

More information

CMPSCI 145 MIDTERM #1 Solution Key. SPRING 2017 March 3, 2017 Professor William T. Verts

CMPSCI 145 MIDTERM #1 Solution Key. SPRING 2017 March 3, 2017 Professor William T. Verts CMPSCI 145 MIDTERM #1 Solution Key NAME SPRING 2017 March 3, 2017 PROBLEM SCORE POINTS 1 10 2 10 3 15 4 15 5 20 6 12 7 8 8 10 TOTAL 100 10 Points Examine the following diagram of two systems, one involving

More information

Chapter 3: Arithmetic for Computers

Chapter 3: Arithmetic for Computers Chapter 3: Arithmetic for Computers Objectives Signed and Unsigned Numbers Addition and Subtraction Multiplication and Division Floating Point Computer Architecture CS 35101-002 2 The Binary Numbering

More information

Numerical Representations On The Computer: Negative And Rational Numbers

Numerical Representations On The Computer: Negative And Rational Numbers Numerical Representations On The Computer: Negative And Rational Numbers How are negative and rational numbers represented on the computer? How are subtractions performed by the computer? Subtraction In

More information

CO212 Lecture 10: Arithmetic & Logical Unit

CO212 Lecture 10: Arithmetic & Logical Unit CO212 Lecture 10: Arithmetic & Logical Unit Shobhanjana Kalita, Dept. of CSE, Tezpur University Slides courtesy: Computer Architecture and Organization, 9 th Ed, W. Stallings Integer Representation For

More information

Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997

Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 APPENDIX A.1 Number systems and codes Since ten-fingered humans are addicted to the decimal system, and since computers

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Hardware Organization and Design Lecture 11: Floating Point & Floating Point Addition Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Last time: Single Precision Format

More information

Numerical Representations On The Computer: Negative And Rational Numbers

Numerical Representations On The Computer: Negative And Rational Numbers Numerical Representations On The Computer: Negative And Rational Numbers How are negative and rational numbers represented on the computer? How are subtractions performed by the computer? Subtraction In

More information

Floating Point Representation in Computers

Floating Point Representation in Computers Floating Point Representation in Computers Floating Point Numbers - What are they? Floating Point Representation Floating Point Operations Where Things can go wrong What are Floating Point Numbers? Any

More information

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

Roundoff Errors and Computer Arithmetic

Roundoff Errors and Computer Arithmetic Jim Lambers Math 105A Summer Session I 2003-04 Lecture 2 Notes These notes correspond to Section 1.2 in the text. Roundoff Errors and Computer Arithmetic In computing the solution to any mathematical problem,

More information

Module 2: Computer Arithmetic

Module 2: Computer Arithmetic Module 2: Computer Arithmetic 1 B O O K : C O M P U T E R O R G A N I Z A T I O N A N D D E S I G N, 3 E D, D A V I D L. P A T T E R S O N A N D J O H N L. H A N N E S S Y, M O R G A N K A U F M A N N

More information

In this article, we present and analyze

In this article, we present and analyze [exploratory DSP] Manuel Richey and Hossein Saiedian Compressed Two s Complement Data s Provide Greater Dynamic Range and Improved Noise Performance In this article, we present and analyze a new family

More information

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

Binary Addition. Add the binary numbers and and show the equivalent decimal addition. Binary Addition The rules for binary addition are 0 + 0 = 0 Sum = 0, carry = 0 0 + 1 = 0 Sum = 1, carry = 0 1 + 0 = 0 Sum = 1, carry = 0 1 + 1 = 10 Sum = 0, carry = 1 When an input carry = 1 due to a previous

More information

Computer (Literacy) Skills. Number representations and memory. Lubomír Bulej KDSS MFF UK

Computer (Literacy) Skills. Number representations and memory. Lubomír Bulej KDSS MFF UK Computer (Literacy Skills Number representations and memory Lubomír Bulej KDSS MFF UK Number representations? What for? Recall: computer works with binary numbers Groups of zeroes and ones 8 bits (byte,

More information

4.1 QUANTIZATION NOISE

4.1 QUANTIZATION NOISE DIGITAL SIGNAL PROCESSING UNIT IV FINITE WORD LENGTH EFFECTS Contents : 4.1 Quantization Noise 4.2 Fixed Point and Floating Point Number Representation 4.3 Truncation and Rounding 4.4 Quantization Noise

More information

Floating-Point Numbers in Digital Computers

Floating-Point Numbers in Digital Computers POLYTECHNIC UNIVERSITY Department of Computer and Information Science Floating-Point Numbers in Digital Computers K. Ming Leung Abstract: We explain how floating-point numbers are represented and stored

More information

Floating-Point Numbers in Digital Computers

Floating-Point Numbers in Digital Computers POLYTECHNIC UNIVERSITY Department of Computer and Information Science Floating-Point Numbers in Digital Computers K. Ming Leung Abstract: We explain how floating-point numbers are represented and stored

More information

Arithmetic Operations

Arithmetic Operations Arithmetic Operations Arithmetic Operations addition subtraction multiplication division Each of these operations on the integer representations: unsigned two's complement 1 Addition One bit of binary

More information

Digital Fundamentals

Digital Fundamentals Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Decimal Numbers The position of each digit in a weighted

More information

ECE 450:DIGITAL SIGNAL. Lecture 10: DSP Arithmetic

ECE 450:DIGITAL SIGNAL. Lecture 10: DSP Arithmetic ECE 450:DIGITAL SIGNAL PROCESSORS AND APPLICATIONS Lecture 10: DSP Arithmetic Last Session Floating Point Arithmetic Addition Block Floating Point format Dynamic Range and Precision 2 Today s Session Guard

More information

Numbers and Computers. Debdeep Mukhopadhyay Assistant Professor Dept of Computer Sc and Engg IIT Madras

Numbers and Computers. Debdeep Mukhopadhyay Assistant Professor Dept of Computer Sc and Engg IIT Madras Numbers and Computers Debdeep Mukhopadhyay Assistant Professor Dept of Computer Sc and Engg IIT Madras 1 Think of a number between 1 and 15 8 9 10 11 12 13 14 15 4 5 6 7 12 13 14 15 2 3 6 7 10 11 14 15

More information

The type of all data used in a C (or C++) program must be specified

The type of all data used in a C (or C++) program must be specified The type of all data used in a C (or C++) program must be specified A data type is a description of the data being represented That is, a set of possible values and a set of operations on those values

More information

Objectives. After completing this module, you will be able to:

Objectives. After completing this module, you will be able to: Signal Routing This material exempt per Department of Commerce license exception TSU Objectives After completing this module, you will be able to: Describe how signals are converted through Gateway In

More information

CS6303 COMPUTER ARCHITECTURE LESSION NOTES UNIT II ARITHMETIC OPERATIONS ALU In computing an arithmetic logic unit (ALU) is a digital circuit that performs arithmetic and logical operations. The ALU is

More information

MACHINE LEVEL REPRESENTATION OF DATA

MACHINE LEVEL REPRESENTATION OF DATA MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems

More information

Chapter 10 Binary Arithmetics

Chapter 10 Binary Arithmetics 27..27 Chapter Binary Arithmetics Dr.-Ing. Stefan Werner Table of content Chapter : Switching Algebra Chapter 2: Logical Levels, Timing & Delays Chapter 3: Karnaugh-Veitch-Maps Chapter 4: Combinational

More information

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

10.1. Unit 10. Signed Representation Systems Binary Arithmetic 0. Unit 0 Signed Representation Systems Binary Arithmetic 0.2 BINARY REPRESENTATION SYSTEMS REVIEW 0.3 Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system

More information

Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as:

Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as: N Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as: a n a a a The value of this number is given by: = a n Ka a a a a a

More information

COMPUTER ORGANIZATION AND ARCHITECTURE

COMPUTER ORGANIZATION AND ARCHITECTURE COMPUTER ORGANIZATION AND ARCHITECTURE For COMPUTER SCIENCE COMPUTER ORGANIZATION. SYLLABUS AND ARCHITECTURE Machine instructions and addressing modes, ALU and data-path, CPU control design, Memory interface,

More information

CHAPTER 2 Data Representation in Computer Systems

CHAPTER 2 Data Representation in Computer Systems CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting

More information

CS 101: Computer Programming and Utilization

CS 101: Computer Programming and Utilization CS 101: Computer Programming and Utilization Jul-Nov 2017 Umesh Bellur (cs101@cse.iitb.ac.in) Lecture 3: Number Representa.ons Representing Numbers Digital Circuits can store and manipulate 0 s and 1 s.

More information

Number Systems. Decimal numbers. Binary numbers. Chapter 1 <1> 8's column. 1000's column. 2's column. 4's column

Number Systems. Decimal numbers. Binary numbers. Chapter 1 <1> 8's column. 1000's column. 2's column. 4's column 1's column 10's column 100's column 1000's column 1's column 2's column 4's column 8's column Number Systems Decimal numbers 5374 10 = Binary numbers 1101 2 = Chapter 1 1's column 10's column 100's

More information

Objectives. Connecting with Computer Science 2

Objectives. Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn how numbering systems are used to count Understand the significance of positional value

More information

CHAPTER 2 Data Representation in Computer Systems

CHAPTER 2 Data Representation in Computer Systems CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting

More information

Groups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,...

Groups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,... Chapter 9 Computer Arithmetic Reading: Section 9.1 on pp. 290-296 Computer Representation of Data Groups of two-state devices are used to represent data in a computer. In general, we say the states are

More information

Kinds Of Data CHAPTER 3 DATA REPRESENTATION. Numbers Are Different! Positional Number Systems. Text. Numbers. Other

Kinds Of Data CHAPTER 3 DATA REPRESENTATION. Numbers Are Different! Positional Number Systems. Text. Numbers. Other Kinds Of Data CHAPTER 3 DATA REPRESENTATION Numbers Integers Unsigned Signed Reals Fixed-Point Floating-Point Binary-Coded Decimal Text ASCII Characters Strings Other Graphics Images Video Audio Numbers

More information

Floating-point Arithmetic. where you sum up the integer to the left of the decimal point and the fraction to the right.

Floating-point Arithmetic. where you sum up the integer to the left of the decimal point and the fraction to the right. Floating-point Arithmetic Reading: pp. 312-328 Floating-Point Representation Non-scientific floating point numbers: A non-integer can be represented as: 2 4 2 3 2 2 2 1 2 0.2-1 2-2 2-3 2-4 where you sum

More information

Name: CMSC 313 Fall 2001 Computer Organization & Assembly Language Programming Exam 1. Question Points I. /34 II. /30 III.

Name: CMSC 313 Fall 2001 Computer Organization & Assembly Language Programming Exam 1. Question Points I. /34 II. /30 III. CMSC 313 Fall 2001 Computer Organization & Assembly Language Programming Exam 1 Name: Question Points I. /34 II. /30 III. /36 TOTAL: /100 Instructions: 1. This is a closed-book, closed-notes exam. 2. You

More information

D I G I T A L C I R C U I T S E E

D I G I T A L C I R C U I T S E E D I G I T A L C I R C U I T S E E Digital Circuits Basic Scope and Introduction This book covers theory solved examples and previous year gate question for following topics: Number system, Boolean algebra,

More information

Floating Point Arithmetic

Floating Point Arithmetic Floating Point Arithmetic Clark N. Taylor Department of Electrical and Computer Engineering Brigham Young University clark.taylor@byu.edu 1 Introduction Numerical operations are something at which digital

More information

Integers. N = sum (b i * 2 i ) where b i = 0 or 1. This is called unsigned binary representation. i = 31. i = 0

Integers. N = sum (b i * 2 i ) where b i = 0 or 1. This is called unsigned binary representation. i = 31. i = 0 Integers So far, we've seen how to convert numbers between bases. How do we represent particular kinds of data in a certain (32-bit) architecture? We will consider integers floating point characters What

More information

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer Arithmetic ECE 666 Part 4-A Floating-Point Arithmetic Israel Koren ECE666/Koren Part.4a.1 Preliminaries - Representation

More information

COMP2121: Microprocessors and Interfacing. Number Systems

COMP2121: Microprocessors and Interfacing. Number Systems COMP2121: Microprocessors and Interfacing Number Systems http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 1 Overview Positional notation Decimal, hexadecimal, octal and binary Converting

More information

Chapter 5 : Computer Arithmetic

Chapter 5 : Computer Arithmetic Chapter 5 Computer Arithmetic Integer Representation: (Fixedpoint representation): An eight bit word can be represented the numbers from zero to 255 including = 1 = 1 11111111 = 255 In general if an nbit

More information

Computer Organization

Computer Organization Computer Organization Register Transfer Logic Number System Department of Computer Science Missouri University of Science & Technology hurson@mst.edu 1 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5,

More information

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University. Data Representation ti and Arithmetic for Computers Rui Wang, Assistant professor Dept. of Information and Communication Tongji University it Email: ruiwang@tongji.edu.cn Questions What do you know about

More information

Scientific Computing. Error Analysis

Scientific Computing. Error Analysis ECE257 Numerical Methods and Scientific Computing Error Analysis Today s s class: Introduction to error analysis Approximations Round-Off Errors Introduction Error is the difference between the exact solution

More information

(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A - B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B)

(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A - B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B) COMPUTER ARITHMETIC 1. Addition and Subtraction of Unsigned Numbers The direct method of subtraction taught in elementary schools uses the borrowconcept. In this method we borrow a 1 from a higher significant

More information

Integer Multiplication. Back to Arithmetic. Integer Multiplication. Example (Fig 4.25)

Integer Multiplication. Back to Arithmetic. Integer Multiplication. Example (Fig 4.25) Back to Arithmetic Before, we did Representation of integers Addition/Subtraction Logical ops Forecast Integer Multiplication Integer Division Floating-point Numbers Floating-point Addition/Multiplication

More information

Classes of Real Numbers 1/2. The Real Line

Classes of Real Numbers 1/2. The Real Line Classes of Real Numbers All real numbers can be represented by a line: 1/2 π 1 0 1 2 3 4 real numbers The Real Line { integers rational numbers non-integral fractions irrational numbers Rational numbers

More information

COPYRIGHTED MATERIAL. Number Systems. 1.1 Analogue Versus Digital

COPYRIGHTED MATERIAL. Number Systems. 1.1 Analogue Versus Digital 1 Number Systems The study of number systems is important from the viewpoint of understanding how data are represented before they can be processed by any digital system including a digital computer. It

More information

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1 IT 1204 Section 2.0 Data Representation and Arithmetic 2009, University of Colombo School of Computing 1 What is Analog and Digital The interpretation of an analog signal would correspond to a signal whose

More information