CS220 : Digital Design.

Slides:



Advertisements
Similar presentations
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Advertisements

Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Chapter 1 Digital Systems and Numbers System
CS220 : Digital Design. Basic Information Title: Digital Design Code: CS220 Lecture: 3 Tutorial: 1 Pre-Requisite: Computer Introduction (CS201) Ass. Prof.
CHAPTER 2 Number Systems, Operations, and Codes
ECE 331 – Digital System Design
Chapter 1 Binary Systems 1-1. Digital Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
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
S. Barua – CPSC 240 CHAPTER 2 BITS, DATA TYPES, & OPERATIONS Topics to be covered are Number systems.
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Mantıksal Tasarım – BBM231 M. Önder Efe
1.6 Signed Binary Numbers.
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.
Chapter 1 Digital Systems and Binary Numbers
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Digital Design: From Gates to Intelligent Machines
Logic and Digital System Design - CS 303
Chapter 3 Data Representation
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Lecture 1 Binary Representation Topics Terminology Base 10, Hex, binary Fractions Base-r to decimal Unsigned Integers Signed magnitude Two’s complement.
Yuh-Jzer JoungDigital Systems1 Number Systems decimal number : 7397=7× × × ×10 0 a 4 a 3 a 2 a 1 a 0. a -1 a -2 = a 4 ×10 4 +a 3 ×10.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
1 Digital Design: Number Systems Credits : Slides adapted from: J.F. Wakerly, Digital Design, 4/e, Prentice Hall, 2006 C.H. Roth, Fundamentals of Logic.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
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.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
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.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Computer Math CPS120 Introduction to Computer Science Lecture 4.
AEEE2031 Data Representation and Numbering Systems.
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Chap 1 Digi g al Systems and Binary Numbers 1.1 Digita l Systems 1.2 Binary Numbers 1.3 Number-Base Conversions 1.4 Octal a n d h exad e cimal Numbers.
Chapter 1 Digital Systems and Binary Numbers
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
MECH1500 Chapter 3.
Chapter 1: Binary Systems
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
1 CS 151 : Digital Design Chapter 4: Arithmetic Functions and Circuits 4-3 : Binary Subtraction.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
Digital Logic Design Ch1-1 Chapter 1 Digital Systems and Binary Numbers Mustafa Kemal Uyguroğlu Digital Logic Design I.
Computer Math CPS120 Introduction to Computer Science Lecture 7.
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.
Chapter 1 Digital Systems and Binary Numbers
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
Binary Arithmetic Binary arithmetic is essential in all digital computers and in many other types of digital systems. Addition, Subtraction, Multiplication,
Digital Systems and Binary Numbers
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
CS 105T Digital Logic Design
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
CS 105T Digital Logic Design
Data Representation – Chapter 3
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Systems and Binary Numbers
Computer Architecture CST 250
Presentation transcript:

CS220 : Digital Design

Basic Information Title: Digital Design Code: CS220 Lecture: 3 Tutorial: 1 Pre-Requisite: Computer Introduction (CS201)

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) and translate description of logical problems to efficient digital logic circuits (synthesis). Understanding of how to design a general-purpose computer, starting with simple logic gates.

Contents Topics Contact Hours No. of Weeks -Introduction to the course content, text book(s), reference(s) and course plane. - Digital Systems and Binary numbers 9 3 - Boolean Algebra and Logic Gates 6 2 - Gate Level Minimization - Combinational Logic 12 4 - Synchronous Sequential Logic Total 45 15

Proportion of Final Assessment Assessment schedule Assessment Assessment Task Week Due Proportion of Final Assessment 1 Major Exam 1 Week 6 15% 2 Major Exam II Week13 3 Home works For every chapter 10% 4 Quizzes Week4,week11 5 project Week 13 6 Final Examination End of Semester 40%

List of References Essential Books Recommended 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.

1. Digital Systems and 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

1.1 Digital Systems

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

1.3 Number-Base Conversions (Integer Part) Example:

1.3 Number-Base Conversions (Fraction Part) Example:

Binary-to-Decimal Conversion Example: Example:

1.4 Octal and Hexadecimal Numbers

Decimal-to-Octal Conversion Example:

Decimal-to-Hexadecimal Conversion Example:

Octal-to-Decimal Conversion Example: Example:

Hexadecimal-to-Decimal Conversion Example: Example:

Binary–Octal and Octal–Binary Conversions Example: Example:

Hex–Binary and Binary–Hex Conversions Example: Example:

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.

Example

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

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

Multiplication

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

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

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.

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

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

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

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

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

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

1.6 Signed Binary Numbers

1.6 Signed Binary Numbers Example : represent +76 Notes 1 - Sign and Magnitude representation 2 - 1’s Complement Representation 3 - 2’s Complement Representation Notes 1 - The previous representation are the same for positive numbers and different for negative numbers 2 - For a signed binary number the most significant bit is used for representing the sign of the number We use 0 for positive numbers and 1 for negative numbers Example : represent +76

Representing negative numbers in the previous three systems 1’s Complement of a negative number can be obtained by flipping all bits of the positive binary number 2’s Complement of a negative number can be obtained by adding 1 to the 1’s Complement or by flipping bits of the positive binary number after the first one from the right Example : represent -76

Arithmetic Addition with Comparison The addition of two numbers in the signed mgnitude system follow the rules of ordinary arithmetic. If the signed are the same, we add the two magnitudes and give the sum the common sign. If the signed are different, we subtract the smaller magnitude from the larger and give the difference the sign of the larger magnitude. EX. (+25) + (-38) = -(38 - 25) = -13

Arithmetic Addition without Comparison The addition of two signed binary number with negative numbers represented in signed 2’s complement form is obtained from the addition of the two numbers, including their signed bits. A carry out of the signed bit position is discarded (note that the 4th case).

Arithmetic Addition without Comparison  06 00000110   06 11111010   13 00001101   13 00001101   19 00010011   07 00000111   06 00000110   06 11111010   13 11110011   13 11110011   07 11111001   19 11101101  40

Arithmetic Subtraction (+/-) A – (+B)= (+/-) A + (-B) (+/-) A – (-B)= (+/-) A + (+B) Example (-6) – (-13)= +7 In binary: (1111010 – 11110011)= (1111010 + 00001101) =100000111 after removing the carry out the result will be : 00000111

1.7 Binary Codes

Binary Coded Decimal (BCD)

Binary Coded Decimal (BCD) in this system each digit is represented in 4 bits For example : to represent in BCD

BCD Addition Example : Evaluate the following operations in BCD System 1 – 3 + 4 2 – 4 + 8 3 - 148 + 576

We must add 6 (0110) to the result BCD Addition Example : Evaluate the following operations in BCD System 1 – 3 + 4 2 – 4 + 8 3 - 148 + 576 Error We must add 6 (0110) to the result

BCD Addition Example : Evaluate the following operations in BCD System 1 – 3 + 4 2 – 4 + 8 3 - 184 + 576

In previous Example we added 0110 when the result was Notes 1 – In BCD Addition , we add (0110)=(6) if the result value was greater than (1001)=(9) or if the result was more than 4 digits In previous Example we added 0110 when the result was 1 - greater than 9 (1001) 2 - more than 4 digits (10000) Note : result more than 4 digit is greater than 9(1001) 

Decimal Arithmetic Addition for signed numbers Example: (+375) + (- 240) = + 135 in BCD Apply 10‘s complement to the negative number only. Addition is done by summing all digits,including the sign digit,and discarding the end carry 0 375 +9 760 ------------ 0 135

Decimal Arithmetic Subtraction for signed and unsigned numbers Apply 10‘s complement to the subtrahend and apply addition (same as binary case)

For example : to represent in ex-3 Excess-3 (ex-3) Excess-three (ex-3)is another system to represent a number (ex-3) is like (BCD) in the way of representing number i.e. each digit is represented in 4 bits Except that : each digit is firstly incremented by three For example : to represent in ex-3

Gray Code

ASCII character code ASCII : American Standard Code for Information Interchange ASCII code is used to represent characters , Symbols , … ASCII code consists of 7-bits (to represent 128 character) # ASCII Ch 65 1000001 A 66 1000010 B 90 1011010 Z 97 1100001 a 98 1100010 b 122 1111001 z Upper case Letters are represented by ASCII (65 : 90) Lower case Letters are represented by ASCII (97 : 122)

Error Detecting Code with even parity with odd parity ASCII A 1000001 01000001 11000001 ASCII T 1010100 11010100 01010100

For more information about Number Systems and Conversations between them Check these 1 – Our Logic Book 2 - Computer Organization's Lectures 3 – Any other References