Most of electronic devices consist of two integrated systems Software Hardware Programs that control hardware to execute user wishes To learn how to design this you need to study Computer Science Circuits that execute the program commands To learn more about how to design this you need to study Digital Logic Design THE IMPORTANCE OF DIGITAL LOGIC ‹#›
COURSE OBJECTIVES ‹#› Why Digital Logic Design? Understand the theory of operation for most of digital electronic devices, Analyze how a digital computer performs complex operations, based on simply manipulating bits (zeros and ones), Design digital logic systems!
TEXT AND REFERENCE BOOKS ‹#› TEXT BOOKS: T1 Morris mano, Michael D Ciletti ,”Digital Design” , 4/e,, PEA REFERENCE BOOKS: R1 Leach, Malvino, saha,”Digital Logic design”, TMH. R2 R.P.jain,”Modern Digital Electronics”, TMH. R3 A.Anand Kumar,”Switching Theory and logic Design”, Prentice-hall Of India pvt.. R4 A.P Godse,G.A Godse,”Digital Logic Design”, T-Publishers,
COURSE OUTLINE ‹#› Introduction Gate-Level Minimization Combinational Logic Synchronous Sequential Logic Registers and Counters Memories and Programmable Logic
FLASHBACK ON DIGITAL LOGIC DESIGN HISTORY ‹#›
HOW DID IT ALL START? 1850: George Boole invents Boolean algebra 11
HOW DID IT ALL START? 12 1946: ENIAC, the first electronic computer is developed 18,000 vacuum tubes 5,000 operations per second 1,000 square feet It really cost a lot of power to turn on the switch!
Dr. Haitham Omran, Dr. Wassim Alexan 13
AND IT WENT ON… 1947: Shockley, Brattain, and Bardeen invent the transistor Replaces vacuum tubes Enables integration of multiple devices into one package 1956: They received the Nobel Prize in Physics ‹#›
AND IT WENT ON… 1955: TRADIC: AT&T Bell Labs announced the first fully transistorized computer 1958: The1 st (2D) Integrated Circuit (Kilby received the Nobel prize in 2000) • Transistor, resistors and capacitors on the same piece of semiconductor • Interconnects between components is not integrated • Low connectivity between components ‹#›
AND IT WENT ON… 1971: Intel’s 4004 1 st microprocessor Maximum clock rate is 740 kHz 46300 to 92600 instructions per second ‹#› Now: Intel® Core™ i7-6700K Processor (8M Cache, up to 4.20 GHz)
APPLICATIONS OF DIGITAL LOGIC DESIGN Conventional computer design CPUs, busses, peripherals Networking and communications Phones, modems, routers Embedded products Cars Toys Appliances Entertainment devices: MP3 players, gaming consoles (PlayStation, Xbox, etc…) ‹#›
BUT WHAT IS THE MEANING OF DIGITAL LOGIC DESIGN? ‹#›
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, and 1, or off and on. There is no simple way to represent all the values in between, such as 0.25. All data that a computer processes must be encoded digitally, as a series of zeroes and ones. ‹#›
ANALOG VS. DIGITAL An analog signal is any variable signal continuous in both time and amplitude. e.g. Sound Example: A 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). ‹#›
WHY DIGITAL? Digital systems are easier to design and implement than analog systems. ‹#›
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…
23 Digital Logic Gates! Digital Logic Gates are the basic units to build any digital circuit WHAT ARE THE BASIC UNITS USED TO BUILD THESE DIGITAL CIRCUITS?
DIGITAL LOGIC GATES • Digital logic circuits are hardware components that manipulate binary information (we call them gates ) • A 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 1 Digital System A B ‹#›
Digital Logic levels What is the physical meaning of logic and logic 1? How can we recognize them? ‹#›
DIGITAL LOGIC LEVELS (CONT.) Electrical Signals (voltages or currents) that exist throughout a digital system are in either of two recognizable values (logic 1 or logic 0) Voltage 5 Time Logic – 1 range Transition (occurs between the two limits) Intermediate region, crossed only during state transition ‹#› Logic – 0 range 0.8 2
The first obvious difference is that in Boolean algebra we have only (+) and ( ∙ ) operators, but we do not have subtraction (-) or division (/) like in mathematics 27 Boolean Algebra What is the difference between the Boolean algebra and arithmetic algebra?
BINARY LOGIC You should distinguish between binary logic and binary arithmetic. Arithmetic variables are numbers that consist of many digits. Arithmetic 1 + 1 = 1 A binary logic variable is always either 1 or 0. Binary 1 + 1 = 1 Two digits Carry ‹#›
DIGITAL LOGIC GATES There are three fundamental logical operations, from which all other functions, no matter how complex, can be derived. These Basic functions are named: AND , OR , NOT (INVERTER) . Each of these has a specific symbol and a clearly-defined behavior ‹#›
BASIC DIGITAL LOGIC GATES (CONT.) AND Gate Represented by any of the following notations: X AND Y X . Y X Y Function definition: Z=1 only if X=Y=1 otherwise X Y Z Symbol diagram AND AND X ‹#› Y Switch representation
BASIC DIGITAL LOGIC GATES (CONT.) OR Gate Represented by any of the following notations: X OR Y X + Y X v Y Function definition: 1 if X=1 or Y =1 or both X=Y=1 if X=Y=0 X Y Z Symbol diagram OR OR X ‹#› Y Switch representation Z=
BASIC DIGITAL LOGIC GATES (CONT.) NOT (Inverter) Gate Represented by a bar over the variable Function definition: Z is what X is not It is also called the complement operation, as it changes 1s into 0s and 0s into 1s. X Z X Symbol diagram NOT NOT X z Switch representation ‹#›
LOGIC GATES TIMING DIAGRAM •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 1 or ‹#›
DIGITAL LOGIC GATES (CONT.) Gates can have more than 2 inputs Other Types of logic gates ‹#›
HOW TO DESCRIBE A LOGIC SYSTEM? By using one of the following two methods: A Truth Table A Boolean Expression ‹#›
TRUTH TABLES X Y Z A 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 ). The number of rows in the Truth Table is 2 n , where n = number of input variables in the function. The binary combinations are obtained from the binary number by counting from to 2 n − 1 Truth table of an AND gate Example: AND gate with 2 inputs n=2 The truth table has 2 2 rows = 4 The binary combinations are from to (2 2 -1=(3)) {00,01,10,11} All input combinations output ‹#› X Y Z 1 1 1 1 1
BOOLEAN 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 1 or 0. Listing the inputs is optional, but sometimes helpful. A literal is any occurrence of an input variable or its complement. The function above has four literals: x , y’ , z , and x’ . Precedencies are important, but not too difficult NOT has the highest precedence, followed by AND, and then OR Fully parenthesized, the function above would be kind of messy: f(x,y,z) = (((x +(y’))z) + x’)
HOW TO GET THE BOOLEAN EXPRESSION FROM THE TRUTH TABLE? ‹#›
BOOLEAN EXPRESSIONS FROM TRUTH TABLES Each 1 in the output of a truth table specifies one term in the corresponding Boolean expression The expression can be read off by inspection… F is true when: A is false AND B is true AND C is false OR A is true AND B is true AND C is true F = A’BC’ + ABC Sum-of-Products-Algorithm ‹#› A B C F 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ANOTHER EXAMPLE F = A’B’C + A’BC’ + AB’C’ + ABC F = ? A B C F 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ‹#›
BASIC LOGIC GATES We have defined three basic logic gates and operators ‹#› Also, 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 Algebra
LAWS & RULES OF BOOLEAN ALGEBRA ‹#› The basic laws of Boolean algebra • The commutative law • The associative law • The distributive law
COMMUTATIVE LAW The commutative law of addition for two variables is A+B = B+A The commutative law of multiplication for two variables is AB = BA ≡ A B A+B B A B+A A B AB B A BA ≡ ‹#›
ASSOCIATIVE LAW A B C A+(B+C) A B C (A+B)+C A B C A(BC) ≡ ‹#› A B C (AB)C ≡ B+C A+B BC The associative law of multiplication for 3 variables is A(BC) = (AB)C AB The associative law of addition for 3 variables is A+(B+C) = (A+B)+C
DISTRIBUTIVE LAW A+C X=(A+B)(A+C) 45 B C A B+C A B A C X AB AC X=AB+AC X=A+(B.C) B C A X X=A(B+C) The distributive law for addition is A+(B.C) = (A+B)(A+C) A B A C X ≡ BC A+B The distributive law for multiplication is A(B+C) = AB + AC
BASIC THEOREMS OF BOOLEAN ALGEBRA + = A 2. A + 1 = 1 3. A ∙ = A ∙ 1 = A A + A = A A + A = 1 9. A = A 10. A + AB = A 11. A + AB = A + B 12.( A + B )( A + C ) = A + BC A ∙ A = A A ∙ A = A, B, and C can represent a single variable or a combination of variables. ‹#›
DUALITY PRINCIPLE Duality Duality X + = X X ⋅ 1 = X X + X ⋅ Y = X X X ⋅ (X + + Y) X = ⋅ Y X = X X ⋅ (X + Y) = X Duality X + X = X Duality X ⋅ X = X A Boolean equation remains valid if we take the dual of the expressions on both sides of the equals sign The dual of an expression is reached as follows: Interchange any 1 with a (and vice-versa) Interchange any AND ( ∙ ) with an OR (+) (and vice-versa) ‹#›
DEMORGAN’S LAW 48 A ⋅ B = A + B ≡ A + B = A ⋅ B ≡
EXAMPLE Get the logic function from the following truth table and implement it using basic logic gates (AND, OR, NOT) A B P 1 1 1 1 1 1 1 P = A’ B’ + A’B + A B’ It needs two inverters + three AND + two OR gates = 7 gates to implement the function outputs 49 Can we make this circuit better ? Cheaper: fewer gates Faster: fewer delays from inputs to The answer in the simplification of the logic function
SIMPLIFICATION OF THE LOGIC FUNCTION 50 A’B’ + A’B + AB’ = A’ * (B’ + B) + A * B’ = A’ * (B + B’) + A * B’ (Distributivity) (Commutativity) = A’ * 1 + A * B’ = A’ + (A * B’) (x + x’ = 1) (x +x’y)=(x+x’)(x+y)(Distributivity) = (A’ + B’) (De Morgan’s) = ( A B)’ 1 GATE (NAND) ONLY Simplification rules allow us here to optimize the design and use a single gate!
51 DERIVED GATES NAND AND-Invert NOR OR-Invert XOR Odd XNOR Even X Y Z 1 1 1 1 1 1 X Y Z 1 1 1 1 1 1 X Y Z 1 1 1 1 1 1 1 X Y Z 1 1 1 1 1