1 Dr. Mohamed Abdur Rahman Office hours Sunday: 10:00- 12:00 & Tuesday: 3:00 - 3:50 Course website: Has been created Logic Analysis & Design
2 Marks / Attendance 2 Assignments (2*10%=20%) 3 Quizzes (3*5%=15%) Mid-Term Exam (25%) Final Exam (40%)
3 Outline of Chapter 1 Digital Systems Binary Numbers Number-base Conversions Octal and Hexadecimal Numbers Complements Signed Binary Numbers Binary Codes Binary Storage and Registers Binary Logic
4 Textbook / Online Materials - Primary Textbook “Digital Design”, Morris Mano and Michael Cilleti, Prentice Hall, 4 th edition, 2007, ISBN-10: Optional Textbook “Digital Fundamentals”, Thomas L. Floyd, Prentice Hall, 10 th edition, 2009, ISBN-10: Course Lectures will be available online on the course website
5 Course Objectives Why Digital Logic Design? Understand theory of operation for most of digital electronic devices Analyze how can a digital computer perform the complex operations based on simply manipulating bits (zeros and ones) Design of digital logic systems
6 Course Outline Arithmetic operations in many number systems. Boolean algebraic structures. Simplification of Boolean expressions using Karnaugh Map. Implement the Boolean Functions using NAND and NOR gates. Analysis and design of combinational logic circuits. flip-flops. Sequential circuits State diagram representation of sequential circuits. Analysis and design of clocked sequential circuit
7 Importance of Digital Logic Most of the electronics devices consist of two integrated systems: Software > Programs that control hardware to execute user wishes » To learn how to design this you need to study Computer Science Hardware > Circuits that execute the program commands » To learn more about how to design this you need to study Digital Logic Design
8 Applications of Logic Design Conventional computer design CPUs, busses, peripherals Networking and communications Phones, modems, routers Embedded products Cars Toys Appliances Entertainment devices, e.g. MP3 players, PS3, and many others
9 Applications of Logic Design
10 What is the meaning of Digital Logic Design?
11 What is Digital? Digital: describes any system based on discontinuous data or events. Computers are digital machines because at their most basic level they can distinguish between just two values, 0 and 1, or off and on. There is no simple way to represent all the values in between, such as All data that a computer processes must be encoded digitally, as a series of zeroes and ones.
12 Analog Vs. Digital An analog or analogue signal is any variable signal continuous in both time and amplitude. e.g. Sound
13 Analog and Digital Signal 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. Greater accuracy
14 Why Digital? Digital systems are easier to design and implement than analog systems.
15 What is Logic Design? Given a specification of a problem, come up with a way of solving it choosing appropriately from a collection of available components, while meeting some criteria for size, cost, power,…etc. I want to know the basic units used to build those Digital circuits? Answer is Digital Logic Gates!! Digital Logic Gates are the basic unit to build any digital circuit
16 Digital Logic Gates Digital logic circuits are hardware components that manipulate binary information (we called them gates). Digital Systems are mainly a black box with minimum one input and minimum one output. Inside this box, are millions of switches called Transistors. Transistors perform different functions according to Inputs. In binary logic circuits there are only two levels: 0 and 1
17 Digital Logic Levels What’s the physical meaning of logic 0 and logic 1? How could we recognize them? Electrical Signals [voltages or currents] that exist throughout a digital system is in either of two recognizable values [ logic 1 or logic 0 ] Binary values are represented abstractly by: Digits 0 and 1 Words (symbols) False (F) and True (T) Words (symbols) Low (L) and High (H) And words On and Off
18 Digital Logic Levels (Cont’d) Binary values are represented by values or ranges of values of physical quantities. 5v 2v 0.8v 0v Intermediate Region: Crossed only during state transition between two limits
19 Boolean Algebra What’s the difference between the Boolean Algebra and arithmetic algebra? The First obvious difference that in Boolean algebra we have only (+) and (.) operators we don’t have subtraction(-) or division(/) like math.
20 Binary Logic You should distinguish between binary logic and binary arithmetic. Arithmetic variables are numbers that consist of many digits. Arithmetic: 1+1=10 A binary logic variable is always either 1 or 0. Binary = 1
21 Decimal Number System Base (also called radix) = 10 –10 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
22 Octal Number System 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
23 Binary Number System Base = 2 2 digits { 0, 1 }, called binary digits or “bits” Weights Weight = (Base) Position Magnitude Sum of “Bit x Weight” Formal Notation Groups of bits 4 bits = Nibble 8 bits = Byte /241/ * * * * *2 -2 =(5.25) 10 (101.01)
24 Hexadecimal Number System 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 / /256 1E57A 1 * * * * *16 -2 =( ) 10 (1E5.7A) 16
25 The Power of 2 n2n2n 02 0 = = = = = = = =128 n2n2n 82 8 = = = = = =1M =1G =1T Mega Giga Tera Kilo
26 Addition Decimal Addition = Ten ≥ Base Subtract a Base 11Carry
27 Binary Addition Column Addition ≥ (2) = 61 = 23 = 84
28 Binary Subtraction Borrow a “Base” when needed − = (10) = 77 = 23 = 54
29 Binary Multiplication Bit by bit x
30 Number Base Conversions Decimal (Base 10) Octal (Base 8) Binary (Base 2) Hexadecimal (Base 16) Evaluate Magnitude
31 Decimal (Integer) to Binary Conversion Divide the number by the ‘Base’ (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division 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
32 Decimal (Fraction) to Binary Conversion Multiply the number by the ‘Base’ (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division Example: (0.625) 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
33 Decimal to Octal Conversion 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: (0.3125) 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
34 Binary − Octal Conversion 8 = 2 3 Each group of 3 bits represents an octal digit OctalBinary Example: ( ) 2 ( ) 8 Assume Zeros Works both ways (Binary to Octal & Octal to Binary)
35 Binary − Hexadecimal Conversion 16 = 2 4 Each group of 4 bits represents a hexadecimal digit HexBinary A1 0 B C D E F1 1 Example: ( ) 2 ( ) 16 Assume Zeros Works both ways (Binary to Hex & Hex to Binary)
36 Octal − Hexadecimal Conversion Convert to Binary as an intermediate step Example: ( ) 2 ( ) 16 Assume Zeros Works both ways (Octal to Hex & Hex to Octal) ( ) 8 Assume Zeros
37 Decimal, Binary, Octal and Hexadecimal DecimalBinaryOctalHex A B C D E F
38 Complements There are two types of complements for each base-r system: the radix complement and diminished radix complement. 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: (r n –1) – N Example for 6-digit decimal numbers: –9’s complement is (r n – 1)–N = (10 6 –1)–N = –N –9’s complement of is – = Example for 7-digit binary numbers: –1’s complement is (r n – 1) – N = (2 7 –1)–N = –N –1’s complement of is – = Observation: –Subtraction from (r n – 1) will never require a borrow –Diminished radix complement can be computed digit-by-digit –For binary: 1 – 0 = 1 and 1 – 1 = 0
39 Complements 1’s Complement (Diminished Radix Complement) –A–All ‘0’s become ‘1’s –A–All ‘1’s become ‘0’s Example ( ) 2 ( ) 2 If you add a number and its 1’s complement …
40 Complements
41 Complements 2’s Complement (Radix Complement) –T–Take 1’s complement then add 1 –T–Toggle all bits to the left of the first ‘1’ from the right Example: Number: 1’s Comp.: OR
42 Complements Subtraction with Complements –The subtraction of two n-digit unsigned numbers M – N in base r can be done as follows:
43 Complements Example 1.5 –Using 10's complement, subtract – Example 1.6 –Using 10's complement, subtract 3250 – There is no end carry. Therefore, the answer is – (10's complement of 30718) =
44 Complements
45 Complements
46 Signed Binary Numbers
47 Signed Binary Numbers
48 Signed Binary Numbers
49 Signed Binary Numbers
50 Binary Codes
51 Binary Code
52 Binary Code
53 Binary Codes
54 Binary Codes
55 Binary Codes The code is called reflected because it can be generated in the following manner. Take the Gray code 0, 1. Write it forwards, then backwards: 0, 1, 1, 0. Then prepend 0s to the first half and 1s to the second half: 00, 01, 11, 10. Continuing, write 00, 01, 11, 10, 10, 11, 01, 00 To obtain: 000, 001, 011, 010, 110, 111, 101, 100 This process continues…
56 Binary Codes
57 Binary Codes
58 ASCII Character Codes
59 ASCII Properties
60 Binary Codes
61 Binary Codes
62 Binary Storage and Registers
63 A Digital Computer Example
64 Transfer of information
65 Transfer of information
66 Digital Logic Gates
67 Binary Logic
68 Binary Logic
69 Switching Circuits
70 Binary Logic
71 Binary Logic
72 Binary Logic