1 / 34

CS220 : Digital Design

CS220 : Digital Design. Basic Information. Title : Digital Design Code : CS220 Lecture : 3 Tutorial : 1 Pre-Requisite : Computer Introduction (CS201) . Ass. Prof. Sahar Abdul Rahman Office: 1021 Building: 9 Email: sahr_ar@yahoo.com O.H: Wednesday 8:00-12:00.

frieda
Download Presentation

CS220 : Digital Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS220 : Digital Design

  2. Basic Information • Title: Digital Design • Code: CS220 • Lecture: 3 • Tutorial: 1 • Pre-Requisite: Computer Introduction (CS201) Ass. Prof. Sahar Abdul Rahman Office: 1021 Building: 9 Email: sahr_ar@yahoo.com O.H: Wednesday 8:00-12:00

  3. Overall Aims of Course By the end of the course the students will be able to: • Grasp basic principles of combinational and sequential logic design. • Determine the behavior of a digital logic circuit (analysis) andtranslate description of logical problems to efficient digital logic circuits (synthesis). • Understanding of how to design a general-purpose computer, starting with simple logic gates.

  4. Contents

  5. Assessment schedule

  6. List of References Essential Books • “DIGITAL DESIGN”, by Mano M. Morris, 4th edition, Prentice- Hall. Recommended Books • “FUNDAMENTALS OF LOGIC DESIGN”, by Charles H. Roth, Brooks/Cole Thomson Learning. • “INTRODUCTION TO DIGITAL SYSTEMS”, by M.D. ERCEGOVAC, T. Lang, and J.H. Moreno, Wiley and Sons. 1998. • “DIGITAL DESIGN, PRINCIPLES AND PRACTICES”, by John F.Wakely, Latest Edition, Prentice Hall, Eaglewood Cliffs, NJ. • “FUNDMENTALS OF DIGITAL LOGIC WITH VHDL DESIGN”, by Stephen Brown and Zvonko Vranesic, McGraw Hill. • “INTRODUCTION TO DIGITAL LOGIC DESIGN”, by John Hayes, Addison Wesley, Reading, MA.

  7. 1. Digital Systems and Binary Numbers 1.1 Digital Systems 1.2 Binary Numbers 1.3 Number-Base Conversions 1.4 Octal and Hexadecimal Numbers 1.5 Complements 1.6 Signed Binary Numbers 1.7 Binary Codes

  8. 1.1 Digital Systems

  9. 1.2 Binary Numbers In general, a number expressed in a base-r system has coefficients multiplied by powers of r: r is called baseor radix.

  10. 1.3 Number-Base Conversions (Integer Part) Example:

  11. 1.3 Number-Base Conversions (Fraction Part) Example:

  12. Binary-to-Decimal Conversion Example: Example:

  13. 1.4 Octal and Hexadecimal Numbers

  14. Decimal-to-Octal Conversion Example:

  15. Decimal-to-Hexadecimal Conversion Example:

  16. Octal-to-Decimal Conversion Example: Example:

  17. Hexadecimal-to-Decimal Conversion Example: Example:

  18. Binary–Octal and Octal–Binary Conversions Example: Example:

  19. Hex–Binary and Binary–Hex Conversions Example: Example:

  20. Hex–Octal and Octal–Hex Conversions • For Hexadecimal–Octal conversion, the given hex number is firstly converted into its binary equivalent which is further converted into its octal equivalent. • An alternative approach is firstly to convert the given hexadecimal number into its decimal equivalent and then convert the decimal number into an equivalent octal number. The former method is definitely more convenient and straightforward. • For Octal–Hexadecimal conversion, the octal number may first be converted into an equivalent binary number and then the binary number transformed into its hex equivalent. • The other option is firstly to convert the given octal number into its decimal equivalent and then convert the decimal number into its hex equivalent. The former approach is definitely the preferred one.

  21. Example

  22. Arithmetic Operation • Addition augend 101101 Added: + 100111 ----------Sum: 1010100

  23. Subtraction minuend: 101101 subtrahend: - 100111 ------------- difference: 000110

  24. Multiplication

  25. 1.5 Complements • Diminished Radix Complement ((r-1)‘s complement) Given a number N in base r having n digits, the (r - 1)’s Complement of N is defined as (rn- 1) -N. • the 9’s complement of 546700 is 999999 – 46700=453299 • the 1’s complement of 1011000 is 0100111 Note: The (r-1)’s complement of octal or hexadecimal numbers is obtained by subtracting each digit from 7 or F (decimal 15), respectively

  26. Radix Complement Given a number N in base r having n digit, the r’s complement of Nis defined as (rn -N) for N ≠0 and as 0 for N =0 . • The 10’s complement of 012398 is 987602 • The 10’s complement of 246700 is 753300 • The 2’s complement of 1011000 is 0101000

  27. Subtraction with Complement • The subtraction of two n-digit unsigned numbers M – N in base r can be done as follows: • M + (rn - N), note that (rn - N) is r’s complement of N. • If M  N, the sum will produce an end carry x, which can be discarded; what is left is the result M- N. • If M < N, the sum does not produce an end carry and is (N - M). Take the r’x complement of the sum and place a negative sign in front.

  28. Example: • Using 10’s complement subtract 72532 – 3250 M = 72532 10’s complement of N = 96750 sum = 169282 Discarded end carry 105 = -100000 answer: 69282

  29. Example: • Using 10’s complement subtract 3250 - 72532 M = 03250 10’s complement of N = 27468 sum = 30718 Discarded end carry 105 = -100000 answer: -(100000 - 30718) = -69282 • The answer is –(10’s complement of 30718) = -69282

  30. Example Using 2’s complement subtract (a) 1010100 – 1000011 M = 1010100 N = 1000011, 2’s complement of N = 0111101 1010100  0111101 sum = 10010001 Discarded end carry 27=-10000000 answer: 0010001

  31. Example (b) 1000011 – 1010100 M = 1000011 N = 1010100, 2’s complement of N = 0101100 1000011  0101100 sum = 1101111 answer: - (10000000 - 1101111) = -0010001 • The answer is –(2’s complement of 1101111) = - 0010001

  32. Example Using 1’s complement, subtract1010100 - 1000011 M = 1010100 N = 1000011, 1’s complement of N = 0111100 1010100  0111100 10010000 end-around carry = + 1 answer: 0010001 33

  33. Example Using 1’s complement, subtract1000011 - 1010100 M = 1000011 N = 1010100, 1’s complement of N = 0101011 1000011 0101011 1101110 Answer: -0010001 34

More Related