Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. Slide 1 Digital Fundamentals.

Slides:



Advertisements
Similar presentations
HEXADECIMAL NUMBERS Code
Advertisements

Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
Binary Arithmetic Binary addition Binary subtraction
Number Systems & Operations
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Figure 2–1 Illustration of a simple binary counting application. Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper.
CHAPTER 2 Number Systems, Operations, and Codes
Chapter 1 Binary Systems 1-1. Digital Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Number Systems Decimal (Base 10) Binary (Base 2) Hexadecimal (Base 16)
ECE 331 – Digital System Design
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Number System and Codes
Chapter 1 Number Systems and Codes William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper Saddle.
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
1.6 Signed Binary Numbers.
Number Systems and Codes
Digital Systems and Binary Numbers
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Digital Design: Principles and Practices Chapter 2 Number Systems and Codes.
Data Representation – Binary Numbers
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Digital Systems and Logic Design
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
NUMBER SYSTEM AND COMPUTER CODES Chapter 2. Prelude Fingers, sticks, and other things for counting were not enough! Counting large numbers Count in groups.
Number Systems. Why binary numbers? Digital systems process information in binary form. That is using 0s and 1s (LOW and HIGH, 0v and 5v). Digital designer.
Number systems: binary, decimal, hexadecimal and octal. Conversion between various number systems Number systems: binary, decimal, hexadecimal and octal.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Number systems & Binary codes MODULE 1 Digital Logic Design Ch1-2 Outline of Chapter 1  1.1 Digital Systems  1.2 Binary Numbers  1.3 Number-base Conversions.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
1 EENG 2710 Chapter 1 Number Systems and Codes. 2 Chapter 1 Homework 1.1c, 1.2c, 1.3c, 1.4e, 1.5e, 1.6c, 1.7e, 1.8a, 1.9a, 1.10b, 1.13a, 1.19.
1 Chapter 2 Number Systems, Operations, and Codes.
Number systems, Operations, and Codes
Number Systems and Codes
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
Number Systems and Digital Codes
Computer Math CPS120 Introduction to Computer Science Lecture 4.
Number Systems & Operations
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
Introduction * Binary numbers are represented with a separate sign bit along with the magnitude. * For example, in an 8-bit binary number, the MSB is.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Unit - 3 NUMBER SYSTEM AND CODES
Figure A--1 Thomas L. Floyd Digital Fundamentals, 8e Copyright ©2003 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
Introduction to Digital Electronics Lecture 2: Number Systems.
WEEK 4 ET2640 Logic and Numerical Methods 1ET2640.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
Digital Logic Design Lab 1,2 By Nora Alaqeel.
Lecture No. 4 Computer Logic Design. Negative Number Representation 3 Options –Sign-magnitude –One’s Complement –Two’s Complement  used in computers.
Computer Math CPS120 Introduction to Computer Science Lecture 7.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
1. Binary, Decimal, Hexadecimal and Octal. 2. Conversion between various number systems. Number Systems:
Unit 1 Introduction Number Systems and Conversion.
EI205 Lecture 2 Dianguang Ma Fall, 2008.
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
SYEN 3330 Digital Systems Chapter 1 SYEN 3330 Digital Systems.
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
2’s Complement form 1’s complement form 2’s complement form
Chapter 1 (Part c) Digital Systems and Binary Numbers
Presentation transcript:

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 1 Digital Fundamentals CHAPTER 2 Number Systems, Operations, and Codes

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 2 Number Systems

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 3 Decimal Numbers The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 The decimal numbering system has a base of 10 with each position weighted by a factor of 10:The decimal numbering system has a base of 10 with each position weighted by a factor of 10:

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 4 Binary Numbers The binary number system has two digits: 0 and 1The binary number system has two digits: 0 and 1 The binary numbering system has a base of 2 with each position weighted by a factor of 2:The binary numbering system has a base of 2 with each position weighted by a factor of 2:

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 5 Decimal-to-Binary Conversion

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 6 Decimal-to-Binary Conversion Sum-of-weights methodSum-of-weights method Repeated division-by-2 methodRepeated division-by-2 method Conversion of decimal fractions to binaryConversion of decimal fractions to binary

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 7 Binary Arithmetic

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 8 Binary Arithmetic Binary additionBinary addition Binary subtractionBinary subtraction Binary multiplicationBinary multiplication Binary divisionBinary division

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 9 Complements of Binary Numbers

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 10 Complements of Binary Numbers 1’s complements1’s complements 2’s complements2’s complements

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 11 Complements of Binary Numbers 1’s complement1’s complement

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 12 Complements of Binary Numbers 2’s complement2’s complement

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 13 Signed Numbers

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 14 Signed Numbers Signed-magnitude formSigned-magnitude form 1’s and 2’s complement form1’s and 2’s complement form Decimal value of signed numbersDecimal value of signed numbers Range of valuesRange of values Floating-point numbersFloating-point numbers

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 15 Signed Numbers Signed-magnitude formSigned-magnitude form –The sign bit is the left-most bit in a signed binary number –A 0 sign bit indicates a positive magnitude –A 1 sign bit indicates a negative magnitude

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 16 Signed Numbers 1’s complement form1’s complement form –A negative value is the 1’s complement of the corresponding positive value 2’s complement form2’s complement form –A negative value is the 2’s complement of the corresponding positive value

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 17 Signed Numbers Decimal value of signed numbersDecimal value of signed numbers –Sign-magnitude –1’s complement –2’s complement

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 18 Signed Numbers Range of ValuesRange of Values 2’s complement form: – (2 n – 1 ) to + (2 n – 1 – 1)

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 19 Signed Numbers Floating-point numbersFloating-point numbers –Single-precision (32 bits) –Double-precision (64 bits) –Extended-precision (80 bits)

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 20 Arithmetic Operations with Signed Numbers AdditionAddition SubtractionSubtraction MultiplicationMultiplication DivisionDivision

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 21 Arithmetic Operations with Signed Numbers Addition of Signed Numbers The parts of an addition function are:The parts of an addition function are: –Addend –Augend –Sum Numbers are always added two at a time.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 22 Arithmetic Operations with Signed Numbers Four conditions for adding numbers: Both numbers are positive.Both numbers are positive. A positive number that is larger than a negative number.A positive number that is larger than a negative number. A negative number that is larger than a positive number.A negative number that is larger than a positive number. Both numbers are negative.Both numbers are negative.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 23 Arithmetic Operations with Signed Numbers Signs for Addition When both numbers are positive, the sum is positive.When both numbers are positive, the sum is positive. When the larger number is positive and the smaller is negative, the sum is positive. The carry is discarded.When the larger number is positive and the smaller is negative, the sum is positive. The carry is discarded.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 24 Arithmetic Operations with Signed Numbers Signs for Addition When the larger number is negative and the smaller is positive, the sum is negative (2’s complement form).When the larger number is negative and the smaller is positive, the sum is negative (2’s complement form). When both numbers are negative, the sum is negative (2’s complement form). The carry bit is discarded.When both numbers are negative, the sum is negative (2’s complement form). The carry bit is discarded.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 25 Arithmetic Operations with Signed Numbers Subtraction of Signed Numbers The parts of a subtraction function are:The parts of a subtraction function are: –Subtrahend –Minuend –Difference Subtraction is addition with the sign of the subtrahend changed.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 26 Arithmetic Operations with Signed Numbers Subtraction The sign of a positive or negative binary number is changed by taking its 2’s complementThe sign of a positive or negative binary number is changed by taking its 2’s complement To subtract two signed numbers, take the 2’s complement of the subtrahend and add. Discard any final carry bit.To subtract two signed numbers, take the 2’s complement of the subtrahend and add. Discard any final carry bit.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 27 Arithmetic Operations with Signed Numbers Multiplication of Signed Numbers The parts of a multiplication function are:The parts of a multiplication function are: –Multiplicand –Multiplier –Product Multiplication is equivalent to adding a number to itself a number of times equal to the multiplier.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 28 Arithmetic Operations with Signed Numbers There are two methods for multiplication: Direct additionDirect addition Partial productsPartial products The method of partial products is the most commonly used.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 29 Arithmetic Operations with Signed Numbers Multiplication of Signed Numbers If the signs are the same, the product is positive.If the signs are the same, the product is positive. If the signs are different, the product is negative.If the signs are different, the product is negative.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 30 Arithmetic Operations with Signed Numbers Division of Signed Numbers The parts of a division operation are:The parts of a division operation are: –Dividend –Divisor –Quotient Division is equivalent to subtracting the divisor from the dividend a number of times equal to the quotient.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 31 Arithmetic Operations with Signed Numbers Division of Signed Numbers If the signs are the same, the quotient is positive.If the signs are the same, the quotient is positive. If the signs are different, the quotient is negative.If the signs are different, the quotient is negative.

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 32 Hexadecimal Numbers

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 33 Hexadecimal Numbers Decimal, binary, and hexadecimal numbersDecimal, binary, and hexadecimal numbers

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 34 Hexadecimal Numbers Binary-to-hexadecimal conversionBinary-to-hexadecimal conversion Hexadecimal-to-decimal conversionHexadecimal-to-decimal conversion Decimal-to-hexadecimal conversionDecimal-to-hexadecimal conversion

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 35 Hexadecimal Numbers Binary-to-hexadecimal conversionBinary-to-hexadecimal conversion 1.Break the binary number into 4-bit groups 2.Replace each group with the hexadecimal equivalent

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 36 Hexadecimal Numbers Hexadecimal-to-decimal conversionHexadecimal-to-decimal conversion 1.Convert the hexadecimal to groups of 4-bit binary 2.Convert the binary to decimal

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 37 Hexadecimal Numbers Decimal-to-hexadecimal conversionDecimal-to-hexadecimal conversion –Repeated division by 16

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 38 Binary Coded Decimal (BCD)

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 39 Binary Coded Decimal (BCD) Decimal and BCD digits

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 40 Digital Codes

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 41 Digital Codes Gray codeGray code ASCII codeASCII code

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 42 Digital Codes Gray codeGray code

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 43 Digital Codes ASCII code (control characters)ASCII code (control characters)

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 44 Digital Codes ASCII code (graphic symbols 20h – 3Fh)ASCII code (graphic symbols 20h – 3Fh)

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 45 Digital Codes ASCII code (graphic symbols 40h – 5Fh)ASCII code (graphic symbols 40h – 5Fh)

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 46 Digital Codes ASCII code (graphic symbols 60h – 7Fh)ASCII code (graphic symbols 60h – 7Fh)

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 47 Digital Codes Extended ASCII code (80h – FFh) Non-English alphabetic charactersNon-English alphabetic characters Currency symbolsCurrency symbols Greek lettersGreek letters Math symbolsMath symbols Drawing charactersDrawing characters Bar graphing charactersBar graphing characters Shading charactersShading characters

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 48 Error Detection and Correction Codes

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 49 Error Detection and Correction Codes Parity error codesParity error codes Hamming error codesHamming error codes

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 50 Error Detection and Correction Codes Parity error codesParity error codes

Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 51 Error Detection and Correction Codes Hamming error codesHamming error codes –Hamming code words –Hex equivalent of the data bits ABCDEF