CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.

Slides:



Advertisements
Similar presentations
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Advertisements

Chapter 1 Binary Systems 1-1. Digital Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Overview Digital Systems, Computers, and Beyond
Overview Digital Systems, Computers, and Beyond
Overview Digital Systems, Computers, and Beyond
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Digital Computers and Information
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.
Mantıksal Tasarım – BBM231 M. Önder Efe
1.6 Signed Binary Numbers.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Introduction to Digital Logic Design
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 1 CPE 231 Digital Logic Introduction Dr. Gheith Abandah [Adapted from the slides of the textbook of Mano and Kime]
Chapter 1 Digital Systems and Binary Numbers
1 Data Representation Computer Organization Prof. H. Yoon DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
Chapter 1 1 CPE 231 Digital Logic Introduction Dr. Gheith Abandah [Adapted from the slides of the textbook of Mano and Kime]
Logic and Digital System Design - CS 303
Chapter 3 Data Representation
Dept. of Computer Science Engineering Islamic Azad University of Mashhad 1 DATA REPRESENTATION Dept. of Computer Science Engineering Islamic Azad University.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
CS220 : Digital Design.
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 2 – Binary Codes.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
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.
مدار منطقي مظفر بگ محمدي 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
Number Systems ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
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.
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Signed Binary Numbers Arithmetic Subtraction – In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and.
Chapter 1 Digital Systems and Binary Numbers
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
1 CS151 Introduction to Digital Design Chapter 1 Lecture 3.
Chapter 1: Binary Systems
NUMBER SYSTEMS AND CODES. CS Digital LogicNumber Systems and Codes2 Outline Number systems –Number notations –Arithmetic –Base conversions –Signed.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
Overview 1-1 Information Representation
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 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.
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Chapter 1 – Digital Systems and Information Logic and Computer Design Fundamentals.
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.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
N 3-1 Data Types  Binary information is stored in memory or processor registers  Registers contain either data or control information l Data are numbers.
Unit 1 Introduction Number Systems and Conversion.
Chapter 1 Digital Systems and Binary Numbers
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
University of Gujrat Department of Computer Science
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Digital Systems and Binary Numbers
Chapter 1 (Part c) Digital Systems and Binary Numbers
Presentation transcript:

CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim

Course Administration Instructor:Dr. Atef Ali Ibrahim E_mail: Office Place: (Room CS-25 ) Office Hrs: TA: Tutorial: Text Book: M. Morris Mano; “Digital Design”, 4thEdition, prentice hall. Prerequisite: Recommended Text: Notes:Lecture slides and Assignments 2

Course Objectives Design of Digital logic systems. Building large systems from small components (logic gates ) EEG 481 Lec. 1 Introduction3

Chapter 1 4

Course Outlines Number Systems (conversion and coding) Boolean Algebra Gate Level minimization Combinational Logic Design Synchronous sequential logic Registers and counters Memories and Programmable logic 5

What is the Meaning of Digital Logic Design? Digital means: 6

7

Why Digital? Digital systems are easier to design and implement than analog systems. EEG 481 Lec. 1 Introduction8

9

Digital Logic circuit 10

11

12

13

N UMBER S YSTEMS – Representation A number with radix r is represented by a string of digits: A n - 1 A n - 2 … A 1 A 0. A - 1 A - 2 … A - m  1 A - m in which 0  A i < r and. is the radix point. The string of digits represents the power series:  (Number)r =   j = - m j j i i = 0 i rArA (Integer Portion) + (Fraction Portion) i = n - 1 j = - 1

Number Systems – Examples GeneralDecimalBinaryOctalHex. Radix (Base)r Digits0 => r - 10 => 90 => 10 => 70 => F Powers of 4 Radix r 0 r 1 r 2 r 3 r 4 r 5 r -1 r -2 r -3 r , , …. … ….

Decimal Number System 16

Binary Number system EEG 481 Lec. 1 Introduction17

Octal Number system 18

Hexadecimal Number System 19

Numbers with different bases 20 The first 17 numbers in decimal, Binary, octal, and Hexadecimal

CONVERSION OF BASES Decimal to Base R number Base R to Decimal Conversion (736.4) 8 = 7 x x x x 8 -1 = 7 x x x 1 + 4/8 = (478.5) 10 (110110) 2 =... = (54) 10 ( ) 2 =... = (6.785) 10 (F3) 16 =... = (243) 10 (0.325) 6 =... = ( ) 10 - Separate the number into its integer and fraction parts and convert each part separately. - Convert integer part into the base R number → successive divisions by R and accumulation of the remainders. - Convert fraction part into the base R number → successive multiplications by R and accumulation of integer digits Data Types

EXAMPLE Convert to base 2. Integer = Fraction = x x x x (41) 10 = (101001) 2 (0.6875) 10 = (0.1011) 2 ( ) 10 = ( ) 2 Convert (63) 10 to base 5: (223) 5 Convert (1863) 10 to base 8: (3507) 8 Convert ( ) 10 to hexadecimal: (0.A3) 16 Exercise Data Types

Decimal to Octal Conversion 23

Decimal to Hex. Conversion 24

Binary to Hex. Conversion 25

Binary to Octal Conversion 26

Signed Numbers 27

COMPLEMENT OF NUMBERS Two types of complements for base R number system: - R's complement and (R-1)'s complement The (R-1)'s Complement Subtract each digit of a number from (R-1) Example - 9's complement of is 's complement of is (bit by bit complement operation) The R's Complement Add 1 to the low-order digit of its (R-1)'s complement Example - 10's complement of is = 's complement of is = Complements

SIGNED NUMBERS Representation Signed magnitude representation Signed 1's complement representation Signed 2's complement representation Example: Represent +9 and -9 in 7 bit-binary number Only one way to represent +9 ==> Three different ways to represent -9: In signed-magnitude: In signed-1's complement: In signed-2's complement: Need to be able to represent both positive and negative numbers - Following 3 representations

SIGNED NUMBERS Representation Signed Magnitude Signed-1’s complement Signed-2’s complement Decimal Range of Signed 2’s complement : -2 n-1 to 2 n Range of Signed 1’s complement: -2 n-1 +1 to 2 n Range of Signed Magnitude: -2 n-1 +1 to 2 n-1 -1

ARITHMETIC ADDITION: SIGNED MAGNITUDE [1] Compare their signs [2] If two signs are the same, ADD the two magnitudes - Look out for an overflow [3] If not the same, compare the relative magnitudes of the numbers and then SUBTRACT the smaller from the larger --> need a subtractor to add [4] Determine the sign of the result ) > ) > ) > ) > (- 9) -6 + (-9) Overflow or (-9) + (-9) ) (1)0010 overflow

ARITHMETIC ADDITION: SIGNED 2’s COMPLEMENT Example (1) overflow ) (c n-1  c n ) Add the two numbers, including their sign bit, and discard any carry out of leftmost (sign) bit - Look out for an overflow

ARITHMETIC ADDITION: SIGNED 1’s COMPLEMENT Add the two numbers, including their sign bits. - If there is a carry out of the most significant (sign) bit, the result is incremented by 1 and the carry is discarded (1) 0(1) ) end-around carry (1) ) (1)0010 +) overflow Example not overflow (c n-1  c n ) = 0 (c n-1  c n ) Fixed Point Representations

COMPARISON OF REPRESENTATIONS * Easiness of negative conversion S + M > 1’s Complement > 2’s Complement * Hardware - S+M: Needs an adder and a subtractor for Addition - 1’s and 2’s Complement: Need only an adder * Speed of Arithmetic 2’s Complement > 1’s Complement(end-around C)

ARITHMETIC SUBTRACTION Take the complement of the subtrahend (including the sign bit) and add it to the minuend including the sign bits. (  A ) - ( - B ) = (  A ) + B (  A ) - B = (  A ) + ( - B ) Example : (-6) – (-13) = +7 in 8-bit representation – = = (+7) Fixed Point Representations Arithmetic Subtraction in 2’s complement

Binary codes Binary codes are used to represent discrete elements of information The codes must be in binary that the computer can only hold 0’s or 1’s. 36

Cont. Binary Codes Given n binary digits (called bits), there are 2 n distinct elements that can be represented. But, you can represent m elements, m < 2 n Examples: You can represent 4 elements with n = 2 bits: (00, 01, 10, 11). You can represent 4 elements with n = 4 digits: (0001, 0010, 0100, 1000). This second code is called a "one hot" code.

Example: A binary code for the seven colors of the rainbow Code 100 is not used Non-numeric Binary Codes Binary Code Color Red Orange Yellow Green Blue Indigo Violet

Decimal BCD(8421) Excess d 3 d 2 d 1 d 0 : symbol in the codes BCD: d 3 x 8 + d 2 x 4 + d 1 x 2 + d 0 x 1  8421 code. 2421: d 3 x 2 + d 2 x 4 + d 1 x 2 + d 0 x : d 3 x 8 + d 2 x 4 + d 1 x (-2) + d 0 x (-1) Excess-3: BCD + 3 Note: 8,4,2,-2,1,-1 in this table is the weight associated with each bit position. External Representations D ECIMAL C ODES - Binary Codes for Decimal Digits

Chapter 1 40 Binary Coded Decimal (BCD) The BCD code is the 8,4,2,1 code. 8, 4, 2, and 1 are weights BCD is a weighted code This code is the simplest, most intuitive binary code for decimal digits and uses the same powers of 2 as a binary number, but only encodes the first ten values from 0 to 9.

Warning: Conversion or Coding? Do NOT mix up conversion of a decimal number to a binary number with coding a decimal number with a BINARY CODE = (This is conversion) 13  0001|0011 (This is coding)

BCD Addition BCD addition of two numbers involve following rules:- 1) Maximum value of the sum for two digits = 9 (max digit 1) + 9 (max digit 2) + 1 (previous addition carry) = 19 2) If sum of two BCD digits is less than or equal to 9 (1001) without carry then the result is a correct BCD number. 3) If sum of two BCD digits is greater than or equal to 10 (1010) the result is in-correct BCD number. Perform steps 4 for correct BCD sum. 4) Add 6 (0110) to the result. 42

Example -BCD addition Add 599 and 984 using BCD numbers Binary Sum 1, 2 and 3 are greater than So, from Step 3 and 4 add ‘6’ to the sum. carry 1 1 Result End Carry Answer. Result of BCD addition is 1583 Exercise: add using BCD addition 43

G RAY C ODE – Decimal

A LPHANUMERIC C ODES - ASCII Character Codes ASCII means “American Standard Code for Information Interchange” The ASCII code assigns binary patterns for - Numbers 0 to 9 - All the letters of English alphabet, uppercase and lowercase - Many control functions (E.g. BS = Backspace, CR = Carriage Return) and punctuation marks. The ASCII system uses 7 bits to represent each code 45

ASCII Code

P ARITY B IT Error-Detection Codes parity, an extra bit appended onto the code word to make the number of 1’s odd or even. A code word has even parity if the number of 1’s in the code word is even. A code word has odd parity if the number of 1’s in the code word is odd.

4-Bit Parity Code Example The codeword "1111" has even parity and the codeword "1110" has odd parity. Both can be used to represent 3-bit data. Even Parity Odd Parity Message - Parity Message - Parity

Parity Bit Generation For b 6 b 5... b 0 (7-bit information); even parity bit b even b even = b 6  b 5 ...  b 0 For odd parity bit b odd = b even  1 = b even PARITY BIT GENERATION

PARITY GENERATOR AND PARITY CHECKER Parity Generator Circuit (even parity) b6b5b4b3b2b1b0b6b5b4b3b2b1b0 b even Parity Checker b6b5b4b3b2b1b0b6b5b4b3b2b1b0 b even Even Parity error indicator Error Detecting codes