ELCT2: DIGITL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim lexan, wassim.joseph@guc.edu.eg Lecture Following the slides of Dr. hmed H. Madian ذو الحجة 438 ه Winter 27
2
3
4
WHT IS THE IMPORTNCE OF DIGITL LOGIC? Most of electronic devices consist of two integrated systems Hardware Circuits that execute the program commands To learn more about how to design this you need to study Digital Logic Design Software Programs that control hardware to execute user wishes To learn how to design this you need to study Computer Science 5
THE IMPORTNCE OF DIGITL LOGIC Floyd th edition 6
COURSE OBJECTIVES Why Digital Logic Design? Understand the theory of operation for most of digital electronic devices, nalyze how a digital computer performs complex operations, based on simply manipulating bits (zeros and ones), Design digital logic systems! 7
TEXT ND REFERENCE BOOKS Textbook: M. Morris Mano, Digital Design, 3 rd Edition, Prentice-Hall, 22, ISBN -3-622-8. References: S. Brown, Z. Vranesic, Fundamentals Of Digital Logic With Vhdl Design, ISBN -7-259-. G. Langholz,. Kandel, & J. L Mott, Foundations of digital logic design, ISBN 98-2-3-5. D. J. Comer, Digital Logic and State Machine Design, ISBN 978-957234. Thomas L. Floyd, Digital Fundamentals, ISBN 978-394695 8
ELCT 2: DIGITL LOGIC Instructors Dr. Eng. Haitham Omran Dr. Eng. Wassim lexan Teaching assistants Eng. Fadwa Foda Eng. Sarah zzam Eng. Engy Maher Eng. Youstina Megalli Eng. li hmed Eng. banoub Mamdouh Eng. Mostafa El-Swefy Eng. Yasmine Hossam Grading ssignments % Quizzes 2% Midterm Exam 25% Final Exam 45% 9
COURSE OUTLINE. Introduction 2. Gate-Level Minimization 3. Combinational Logic 4. Synchronous Sequential Logic 5. Registers and Counters 6. Memories and Programmable Logic
FLSHBCK ON DIGITL LOGIC DESIGN HISTORY
HOW DID IT LL STRT? 85: George Boole invents Boolean algebra 2
HOW DID IT LL STRT? 946: ENIC, the first electronic computer is developed 8, vacuum tubes 5, operations per second, square feet It really cost a lot of power to turn on the switch! 3
Dr. Haitham Omran, Dr. Wassim lexan 4
ND IT WENT ON 947: Shockley, Brattain, and Bardeen invent the transistor Replaces vacuum tubes Enables integration of multiple devices into one package 956: They received the Nobel Prize in Physics 5
ND IT WENT ON 955: TRDIC: T&T Bell Labs announced the first fully transistorized computer 958: The st (2D) Integrated Circuit (Kilby received the Nobel prize in 2) Transistor, resistors and capacitors on the same piece of semiconductor Interconnects between components is not integrated Low connectivity between components 6
ND IT WENT ON 97: Intel s 44 st microprocessor Maximum clock rate is 74 khz 463 to 926 instructions per second Now: Intel Core i7-67k Processor (8M Cache, up to 4.2 GHz) 7
PPLICTIONS OF DIGITL LOGIC DESIGN Conventional computer design CPUs, busses, peripherals Networking and communications Phones, modems, routers Embedded products Cars Toys ppliances Entertainment devices: MP3 players, gaming consoles (PlayStation, Xbox, etc ) 8
BUT WHT IS THE MENING OF DIGITL LOGIC DESIGN? 9
WHT IS DIGITL? 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, and, or off and on. There is no simple way to represent all the values in between, such as.25. ll data that a computer processes must be encoded digitally, as a series of zeroes and ones. 2
NLOG VS. DIGITL n analog signal is any variable signal continuous in both time and amplitude. e.g. Sound Example: typical analog device is a clock in which the hands move continuously around the face. Such a clock is capable of indicating every possible time of day. In contrast, a digital clock is capable of representing only a finite number of times (every tenth of a second, for example). 2
WHY DIGITL? Digital systems are easier to design and implement than analog systems. 22
WHT 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 23
WHT RE THE BSIC UNITS USED TO BUILD THESE DIGITL CIRCUITS? Digital Logic Gates! Digital Logic Gates are the basic unit to build any digital circuit 24
DIGITL LOGIC GTES B Digital System Digital logic circuits are hardware components that manipulate binary information (we call them gates) digital system is basically a black box with a minimum of one input and 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: and 25
Digital Logic levels What is the physical meaning of logic and logic? How can we recognize them? 26
DIGITL LOGIC LEVELS (CONT.) Electrical Signals [ voltages or currents ] that exist throughout a digital system are in either of two recognizable values [ logic or logic ] Voltage Intermediate region, crossed only during state transition 5 2.8 Logic range Logic range Transition, occurs between the two limits time 27
Boolean lgebra What is the difference between the Boolean algebra and arithmetic algebra? The First obvious difference is that in Boolean algebra we have only (+) and () operators we do not have subtraction (-) or division (/) like in math 28
BINRY LOGIC You should distinguish between binary logic and binary arithmetic. rithmetic variables are numbers that consist of many digits. Carry Two digits rithmetic + = binary logic variable is always either or. Binary + = 29
DIGITL LOGIC GTES There are three fundamental logical operations, from which all other functions, no matter how complex, can be derived. These Basic functions are named: ND, OR, NOT (INVERTER). Each of these has a specific symbol and a clearly-defined behavior 3
BSIC DIGITL LOGIC GTES (CONT.) ND Gate Represented by any of the following notations: X ND Y X. Y X Y Function definition: Z= only if X=Y= otherwise X Y ND ND Symbol diagram X Y Z Switch representation 3
BSIC DIGITL LOGIC GTES (CONT.) OR Gate Represented by any of the following notations: X OR Y X + Y X v Y X Y OR Symbol diagram X Z Function definition: OR Z = if X= or Y = or both X=Y= if X=Y= Y Switch representation 32
BSIC DIGITL LOGIC GTES (CONT.) NOT (Inverter) Gate Represented by a bar over the variable X NOT Z Function definition: X Z is what X is not It is also called complement operation, as it changes s to s and s to s. Symbol diagram X NOT z Switch representation 33
LOGIC GTES TIMING DIGRM Timing diagrams illustrate the response of any gate to all possible input signal combinations. The horizontal axis of the timing diagram represents time and the vertical axis represents the signal as it changes between the two possible voltage levels or 34
DIGITL LOGIC GTES (CONT.) Gates can have more than 2 inputs Other Types of logic gates 35
HOW TO DESCRIBE LOGIC SYSTEM? By using one of the following two methods: Truth Table Boolean Expression 36
TRUTH TBLE Truth Table is a table of combinations of the binary variables showing the relationship between the different values that the input variables take and the result of the operation (output). n The number of rows in the Truth Table is 2, where n = number of input variables in the function. The binary combinations are obtained from the binary number by counting from to 2 n Example: ND gate with 2 inputs n=2 The truth table has 2 2 rows = 4 The binary combinations is from to (2 2 -=(3)) [,,,] X Y ll input combinations Z X Y Truth table of an ND gate Z 37 output
BOOLEN EXPRESSIONS We can use these basic operations to form more complex expressions: f(x,y,z) = (x + y )z + x Some terminology and notation: f is the name of the function. (x,y,z) are the input variables, each representing or. Listing the inputs is optional, but sometimes helpful. literal is any occurrence of an input variable or its complement. The function above has four literals: x, y, z, and x. Precedences are important, but not too difficult. NOT has the highest precedence, followed by ND, and then OR. Fully parenthesized, the function above would be kind of messy: f(x,y,z) = (((x +(y ))z) + x ) 38 38
How to get the Boolean Expression from the truth table? 39
BOOLEN EXPRESSIONS FROM TRUTH TBLES Each in the output of a truth table specifies one term in the corresponding boolean expression. The expression can be read off by inspection B C F Sum-of-Products-lgorithm F is true when: OR is false ND B is true ND C is false is true ND B is true ND C is true F = BC + BC 4
NOTHER EXMPLE B C F F =? F = B C + BC + B C + BC 4
BSIC LOGIC GTES We have defined three basic logic gates and operators lso, we could build any digital circuit from those basic logic gates. In digital Logic, we are not using normal mathematics we are using Boolean algebra So, we need to know the laws & rules of Boolean lgebra 42
LWS & RULES OF BOOLEN LGEBR The basic laws of Boolean algebra The commutative law The associative law The distributive law 43
COMMUTTIVE LW The commutative law of addition for two variables is written as: +B = B+ B +B B B+ The commutative law of multiplication for two variables is written as: B = B B B B B 44
SSOCITIVE LW The associative law of addition for 3 variables is written as: +(B+C) = (+B)+C B C B+C +(B+C) B C +B (+B)+C The associative law of multiplication for 3 variables is written as: (BC) = (B)C B C BC (BC) B C B (B)C 45
DISTRIBUTIVE LW The distributive law for multiplication as follows: (B+C) = B + C B B+C C X X=(B+C) B B C C The distributive law for addition is as follows +(B.C) = (+B)(+C) B BC C X X=+(B.C) B C X=B+C +B X +C X=(+B)(+C) 46 X
BSIC THEOREMS OF BOOLEN LGEBR. 2. 3. 5. 6. 4. 7. 8. 9... 2.( B B B)( B C) BC, B, and C can represent a single variable or a combination of variables. 47
DULITY PRINCIPLE Boolean equation remains valid if we take the dual of the expressions on both sides of the equals sign Dual of expression it means, Interchange s with s (and Vice-versa) Interchange ND () with OR (+) (and Vice-versa) X X Duality X X X XY X X XY X X(X Y) X Duality X(X Y) X X X X Duality XX X Duality 48
DEMORGN S LW B B B B 49
EXMPLE Get the logic function from the following truth table and implement it using basic logic gates (ND, OR, NOT) B P Can we make this circuit better? Cheaper: fewer gates Faster: fewer delays from inputs to outputs P = B + B + B It needs two inverters + three ND + two OR gates = 7 gates to implement the function The answer in the simplification of the logic function 5
SIMPLIFICTION OF THE LOGIC FUNCTION B + B + B = * (B + B) + * B (Distributivity) = * (B + B ) + * B (Commutativity) = * + * B (x + x = ) = + ( * B ) (x +x y)=(x+x )(x+y)(distributivity) = ( + B ) (De Morgan s) = ( B) GTE (NND) ONLY From 7 gates using simplification rules could be optimized to one gate 5
52 Z Y X Z Y X Z Y X Z Y X DERIVED GTES NND ND-Invert NOR OR-Invert XOR Odd XNOR Even
FINL NOTE Check the website http://eee.guc.edu.eg for the course materials as well as any announcements 53