D IGITAL C IRCUITS Book Title: Digital Design Edition: Fourth Author: M. Morris Mano 1.

Slides:



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

COMP 2130 Intro Computer Systems Thompson Rivers University
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
Chapter 1 Binary Systems 1-1. Digital Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
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.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
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.
Mantıksal Tasarım – BBM231 M. Önder Efe
Dr. Bernard Chen Ph.D. University of Central Arkansas
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.
Programmable Logic Controllers
Chapter 1 Digital Systems and Binary Numbers
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
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.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Digital Design: From Gates to Intelligent Machines
Logic and Digital System Design - CS 303
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.
1.7 BINARY CODES BCD Code (Binary –Coded Decimal ) BCD Addition
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.
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
IT101: INFORMATION TECHNOLOGY FUNDAMENTALS 1 Edited By Dr. Ahmed Abo-Bakr Information Technology Dept. Faculty of Computers & Information.
Dr. Ahmed Telba EE208: Logic Design Lecture# 1 Introduction & Number Systems.
Number Base Conversions
1 Lect # 1 Binary Systems Digital vs. Analog Analog – a continuous range of values Digital – a discrete set of values –Like money –Can’t get smaller than.
1 Dr. Mohamed Abdur Rahman Office hours Sunday: 10:00- 12:00 & Tuesday: 3:00 - 3:50 Course website: Has been created
AEEE2031 Data Representation and Numbering Systems.
Digital Systems and Binary Numbers
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
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
1 CHAPTER 1 DIGITAL SYSTEMS AND BINARY NUMBERS 2 O UTLINE OF C HAPTER Digital Systems 1.2 Binary Numbers 1.3 Number-base Conversions 1.4 Octal.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Chapter 1: Binary Systems
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
Chapter 1 : Introduction to Binary Systems 1.1. Introduction to Digital Systems 1.2. Binary Numbers 1.3. Number Base Conversion 1.4. Octal and Hexadecimal.
Overview 1-1 Information Representation
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.
CHAPTER 3 BINARY NUMBER SYSTEM. Computers are electronic machines which operate using binary logic. These devices use two different values to represent.
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.
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.
Chapter 1 Digital Systems and Binary Numbers
Digital Systems and Binary Numbers
CHAPTER 1 : INTRODUCTION
Digital Systems and Binary Numbers
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
UNIT I: Introduction to Number Systems and
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Systems and Binary Numbers
Presentation transcript:

D IGITAL C IRCUITS Book Title: Digital Design Edition: Fourth Author: M. Morris Mano 1

2 CHAPTER 1 DIGITAL SYSTEMS AND BINARY NUMBERS

O UTLINE OF C HAPTER Digital Systems 1.2 Binary Numbers 1.3 Number-base Conversions 1.4 Octal and Hexadecimal Numbers 1.5 Complements 1.6 Signed Numbers 1.7 Binary codes (BCD) 1.9 Binary Logic 33

DIGITAL SYSTEMS AND BINARY NUMBERS Digital computers General purposes Many scientific, industrial and commercial applications Digital systems Digital Telephone Digital camera Electronic calculators Digital TV o These devices have a special ‐ purpose digital computer embedded within them. 44

These devices have graphical user interfaces (GUIs), which enable them to execute commands that appear to the user to be simple. It can follow a sequence of instructions, called a program, that operates on given data. Discrete information-processing systems Manipulate discrete elements of information For example, {1, 2, 3, …} and {A, B, C, …}… Discrete elements of information are represented in a digital system by physical quantities called signals. Electrical signals such as voltages and currents are the most common. 5

A NALOG AND D IGITAL S IGNAL Analog system The physical quantities or signals may vary continuously over a specified range. Digital system The physical quantities or signals can assume only discrete values. 6 t X(t) kT X(kT) Analog signalDigital signal 6

B INARY D IGITAL S IGNAL For digital systems, the variable takes discrete values. Two level, or binary values. Binary values are represented abstractly by: Digits 0 and 1 (A binary digit is called a bit ) Words (symbols) False (F) and True (T) Words (symbols) Low (L) and High (H) And words Off and On 7

D ECIMAL N UMBER S YSTEM Base (also called radix) = digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Digit Position Integer & fraction Digit Weight Weight = ( Base) Position Magnitude Sum of “ Digit x Weight ” Formal Notation d 2 *B 2 +d 1 *B 1 +d 0 *B 0 +d -1 *B -1 +d -2 *B -2 (512.74) 10 8

O CTAL N UMBER S YSTEM Base = 8 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 } Weights Weight = ( Base) Position Magnitude Sum of “ Digit x Weight ” Formal Notation /8641/ * * * * *8 -2 =( ) 10 (512.74) 8 9

B INARY N UMBER S YSTEM Base = 2 2 digits { 0, 1 }, called b inary dig its or “ bits ” Weights Weight = ( Base) Position Magnitude Sum of “ Bit x Weight ” Formal Notation Groups of bits 8 bits = Byte /241/ * * * * *2 -2 =(5.25) 10 (101.01)

H EXADECIMAL N UMBER S YSTEM Base = digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F } Weights Weight = ( Base) Position Magnitude Sum of “ Digit x Weight ” Formal Notation /162561/256 1E57A 1 * * * * *16 -2 =( ) 10 (1E5.7A) 16 11

T HE P OWER OF 2 12 n2n2n 02 0 = = = = = = = =128 n2n2n 82 8 = = = = = =1M =1G =1T Mega Giga Tera Kilo 12

A DDITION Decimal Addition = Ten ≥ Base  Subtract a Base 11Carry 13

B INARY A DDITION Column Addition ≥ (2) = 61 = 23 = 84 14

B INARY S UBTRACTION Borrow a “Base” when needed − = (10) = 77 = 23 = 54 15

B INARY M ULTIPLICATION Bit by bit x

N UMBER B ASE C ONVERSIONS 17 Decimal (Base 10) Octal (Base 8) Binary (Base 2) Hexadecimal (Base 16) Evaluate Magnitude 17

D ECIMAL ( I NTEGER ) TO B INARY C ONVERSION Divide the number by the ‘Base’ (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division 18 Example: ( 13 ) 10 QuotientRemainder Coefficient Answer: (13) 10 = (a 3 a 2 a 1 a 0 ) 2 = (1101) 2 MSB LSB 13 / 2 = 61 a 0 = 1 6 / 2 = 30 a 1 = 0 3 / 2 = 11 a 2 = 1 1 / 2 = 01 a 3 = 1 18

D ECIMAL ( F RACTION ) TO B INARY C ONVERSION Multiply the number by the ‘Base’ (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the multiplication 19 Example: ( ) 10 IntegerFraction Coefficient Answer: (0.625) 10 = (0.a -1 a -2 a -3 ) 2 = (0.101) 2 MSB LSB * 2 = * 2 = 0. 5 a -2 = * 2 = 1. 0 a -3 = 1 a -1 = 1 19

D ECIMAL TO O CTAL C ONVERSION 20 Example: ( 175 ) 10 QuotientRemainder Coefficient Answer: (175) 10 = (a 2 a 1 a 0 ) 8 = (257) / 8 = 217 a 0 = 7 21 / 8 = 25 a 1 = 5 2 / 8 = 02 a 2 = 2 Example: ( ) 10 IntegerFraction Coefficient Answer: (0.3125) 10 = (0.a -1 a -2 a -3 ) 8 = (0.24) * 8 = * 8 = 4. 0 a -2 = 4 a -1 = 2 20

B INARY − O CTAL C ONVERSION 8 = 2 3 Each group of 3 bits represents an octal digit 21 OctalBinary Example: ( ) 2 ( ) 8 Assume Zeros Works both ways (Binary to Octal & Octal to Binary) 21

B INARY − H EXADECIMAL C ONVERSION 16 = 2 4 Each group of 4 bits represents a hexadecimal digit 22 HexBinary A1 0 B C D E F1 1 Example: ( ) 2 ( ) 16 Assume Zeros Works both ways (Binary to Hex & Hex to Binary) 22

O CTAL − H EXADECIMAL C ONVERSION Convert to Binary as an intermediate step 23 Example: ( ) 2 ( ) 16 Assume Zeros Works both ways (Octal to Hex & Hex to Octal) ( ) 8 Assume Zeros 23

D ECIMAL, B INARY, O CTAL AND H EXADECIMAL 24 DecimalBinaryOctalHex A B C D E F 24

C OMPLEMENTS Complements are used in digital computers to simplify the subtraction operation. There are two types of complements for each base- r system: the radix complement and diminished radix complement. Diminished (Radix = base) 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: (r n –1) – N Example for 4-digit binary numbers: 1’s complement is ( 2 n – 1) – N = (2 4 –1)– N = 1111– N 1’s complement of 1100 is 1111–1100 = 0011 Observation: Subtraction from (2 n – 1) will never require a borrow For binary: 1 – 0 = 1 and 1 – 1 = 0 25

C OMPLEMENTS 1’s Complement ( Diminished Radix Complement) All ‘0’s become ‘1’s All ‘1’s become ‘0’s Example ( ) 2  ( ) 2 If you add a number and its 1’s complement …

C OMPLEMENTS Radix Complement Example: Base-2 27 The r's complement of an n-digit number N in base r is defined as r n – N for N ≠ 0. Comparing with the (r  1) 's complement, we note that the r's complement is obtained by adding 1 to the (r  1) 's complement, since r n – N = [(r n  1) – N] + 1. The 2's complement of is The 2's complement of is

C OMPLEMENTS 2’s Complement ( Radix Complement) Take 1’s complement then add 1 Toggle all bits to the left of the first ‘1’ from the right Example : Number: 1’s Comp.: OR

C OMPLEMENTS Subtraction with Complements The subtraction of two n -digit unsigned numbers M – N in base r can be done as follows: 29

C OMPLEMENTS Example 1.7 Given the two binary numbers X = and Y = , perform the subtraction (a) X – Y ; and (b) Y  X, by using 2's complement. 30 There is no end carry. Therefore, the answer is Y – X =  (2's complement of ) = 

S IGNED B INARY N UMBERS To represent negative integers, we need a notation for negative values. Signed-magnitude represents the sign with a bit placed in the leftmost position of the number and the rest of the bits represent the number. The convention is to make the sign bit 0 for positive and 1 for negative. Example: +9 is represented only by three different ways to represent -9 31

32  Table 1.3 lists all possible four-bit signed binary numbers in the three representations. 2 n (2 n-1 -1)

S IGNED B INARY N UMBERS Arithmetic addition The addition of two numbers in the signed-magnitude system follows the rules of ordinary arithmetic. If the signs are the same, we add the two magnitudes and give the sum the common sign. If the signs are different, we subtract the smaller magnitude from the larger and give the difference the sign of the larger magnitude. This is a process that requires a comparison of the signs and magnitudes and then performing either addition or subtraction. The addition of two signed binary numbers with negative numbers represented in signed-2's-complement form is obtained from the addition of the two numbers, including their sign bits. A carry out of the sign-bit position is discarded. 33

34 Example: The main problem with signed-magnitude system is that it doesn’t support binary arithmetic (which is what the computer would naturally do). That is, if you add 10 and -10 binary you won’t get 0 as a result (decimal 10) (signed-magnitude) (decimal -10) (decimal -20) (wrong answer)

S IGNED B INARY N UMBERS Arithmetic Subtraction In 2’s-complement form: Example: 35 1.Take the 2’s complement of the subtrahend (including the sign bit) and add it to the minuend (including sign bit). 2.A carry out of sign-bit position is discarded. (  6)  (  13)(  ) ( ) (+ 7) 35

36 BCD numbers are decimal numbers and not binary numbers, although they use bits in their representation. The only difference between a decimal number and BCD is that decimals are written with the symbols 0, 1, 2,..., 9 and BCD numbers use the binary code 0000, 0001, A decimal number in BCD is the same as its equivalent binary number only when the number is between 0 and 9. The binary combinations 1010 through 1111 are not used and have no meaning in BCD. B INARY C ODES

37 BCD Code (Decimal computers) A number with k decimal digits will require 4k bits in BCD. Decimal 396 is represented in BCD with 12bits as , with each group of 4 bits representing one decimal digit. BCD is very common in electronic systems where a numeric value is to be displayed, especially in systems consisting only of digital logic, and not containing a microprocessor. 37

38 ASCII C HARACTER C ODES American Standard Code for Information Interchange (Refer to Table 1.7) A popular code used to represent information sent as character-based data. It uses 7-bits to represent: 94 Graphic printing characters. 34 Non-printing characters (Control Characters). Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return). (Format effectors) Other non-printing characters are Communication CC (e.g. STX and ETX start and end text areas). Information separators are used to separate the data into divisions such as paragraphs and pages. 38

39 ASCII C HARACTER C ODE American Standard Code for Information Interchange (ASCII) Character Code 39

40 ASCII P ROPERTIES The seven bits of the code are designated by b1 through b7. with b7 the most significant bit. The letter A. for example is represented in ASCII as (column 100, row 0001). ASCII has some interesting properties: Digits 0 to 9 span Hexadecimal values to Upper case A-Z span to 5A 16 Lower case a-z span to 7A 16 Lower to upper case translation (and vice versa) occurs by flipping bit 6. 40

41  ASCII is a seven-bit code, but most computers manipulate an eight-bit quantity as a single unit called a byte. Therefore, ASCII characters often are stored one per byte.  Extended ASCII (8 bits) adds the Greek alphabets.

42 B INARY L OGIC (B OOLEAN ALGEBRA ) Definition of Binary Logic Binary logic consists of binary variables and a set of logical operations. The variables are designated by letters of the alphabet, such as A, B, C, x, y, z, etc, with each variable having two and only two distinct possible values: 1 and 0, Three basic logical operations: AND, OR, and NOT. 42

43 BINARY LOGIC Truth Tables, Boolean Expressions, and Logic Gates xyz xyz xz ANDORNOT z = x y = x yz = x + yz = x = x’

44 S WITCHING C IRCUITS ANDOR 44

45 L OGIC GATES Logic gates are electronic circuits that operate on one or more input signals to produce an output signal Logic 1 Logic 0 Un-define Figure 1.3 Example of binary signals 45

46 L OGIC GATES Graphic Symbols and Input-Output Signals for Logic gates: Fig. 1.4 Symbols for digital logic circuits Fig. 1.5 Input-Output signals for gates 46

47 Logic gates Graphic Symbols and Input-Output Signals for Logic gates with multiple inputs: 47

The problems of chapter one: 1.2, 1.3, 1.4, 1.7, 1.8, 1.9, 1.13, 1.14(a, c), 1.18(a, c),

49