Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Logic. 4 Why is 32-bit or 64-bit significant in terms of speed, efficiency? 4 Difference between OR and XOR 4 What is a mux for? PLA 4 Two kinds.

Similar presentations


Presentation on theme: "Digital Logic. 4 Why is 32-bit or 64-bit significant in terms of speed, efficiency? 4 Difference between OR and XOR 4 What is a mux for? PLA 4 Two kinds."— Presentation transcript:

1 Digital Logic

2 4 Why is 32-bit or 64-bit significant in terms of speed, efficiency? 4 Difference between OR and XOR 4 What is a mux for? PLA 4 Two kinds ever combined? 4 Largest number of circuits a gate could have? 4 What is the makeup of the CPU in terms of basic circuit types?

3 Introduction 4 This topic –reviews the Boolean algebra you have studied previously –relates the Boolean logic to hardware 4 Why –so we understand how the abstractions of Boolean logic are related to what a real machine can actually do –This will reveal both the power and the limitations of these machines

4 A few definitions from http://webopedia.internet.com/TERM/t/transistor.html 4 Transistor –A device composed of semiconductor material that amplifies a signal or opens or closes a circuit. Invented in 1947 at Bell Labs, transistors have become the key ingredient of all digital circuits, including computers. Today's microprocessors contains tens of millions of microscopic transistors. 4 Semiconductor –A material that is neither a good conductor of electricity (like copper) nor a good insulator (like rubber). The most common semiconductor materials are silicon and germanium. These materials are then doped to create an excess or lack of electrons. –Semiconductors make it possible to miniaturize electronic components, such as transistors. Not only does miniaturization mean that the components take up less space, it also means that they are faster and require less energy. 4 Doping –To add elements into a semiconductor material during the manufacturing process to increase its conductivity. The impurities added are called dopants. Common dopants include arsenic, antimony, bismuth and phosphorous. –The type and level of doping determines whether the semiconductor is N-type (current is conducted by excess free electrons) or P-type (current is conducted by electron vacancies).

5 Transistor operation 4 When the voltage provided to a transistor is too low, the transistor turns off and acts like an infinite resistance. –Plumbing analogy: closed tap 4 When the voltage provided to a transistor is high enough, the transistor turns on and acts like a wire. –Plumbing analogy: open tap 4 P-type transistor acts exactly opposite from (complementary to) N-type. 4 Circuits that combine the two types are called CMOS (Complementary metal oxide semiconductor)

6 Inverters 4 If the top transistor is open, the voltage flows through it. If the bottom transistor is closed at the same time, the voltage can only flow out through OUT. 4 When the IN is low, the P-type transistor acts like a wire, allowing in the 2.9 volts. At the same time, the N-type transistor is closed and so the voltage has to go to OUT. 4 Similarly, when IN is high, P-type acts like a plug and N-type is open, so OUT gets its value from ground (0 volts). 4 V out = NOT V in. P-type N-type

7 NOR gates 4 In order for the high voltage to get to C, both P-type transistors must be letting the voltage through. That means that both A and B must be 0 (P-type acts as a wire when its input is 0) 4 At the same time, the N-type transistors provide the opposite connection to ground. 4 C will always receive its value from either the voltage source or from ground C = NOT (A OR B) = A NOR B Voltage source

8 OR gates 4 Take the output of the NOR gate and put it through an inverter (a NOT gate) to get an OR gate

9 NAND and AND 4 Similarly, we can construct NAND and then put that through an inverter to produce AND

10 Basic Gates 4 Now that we know we can construct the basic logic gates, we will not concern ourselves with transistors anymore. We will use symbols to abstract the operation of these gates. (Note the bubble means invert. It makes AND into NAND and can be used on inputs to mean invert the input signal.) Inverter AND gate OR gate NAND gate NOR gate

11 Implementing a Boolean Function 4 Five steps that always work: 1.Write down the truth table for the function 2.Provide an input line for each variable and an inverter for each variable 3.Draw an AND gate for each term with a 1 in the result column 4.Wire the AND gates to the appropriate inputs 5.Feed the output of all the AND gates into an OR gate

12 Example – Boolean to Gates 4 F = A (B + C’) + A’C 4 Step 1: Truth table ABCF 000 001 010 011 100 101 110 111

13 Example – Boolean to Gates 4 F = A (B + C’) + A’C 4 Step 1: Truth table ABCF 0000 0011 0100 0111 1001 1010 1101 1111

14 Example – Boolean to Gates 4 Step 2 Provide the input lines, and the negation of each input A B C ABCF 0000 0011 0100 0111 1001 1010 1101 1111

15 Example – Boolean to Gates 4 Step 3: Provide an AND gate for each 1 in the function ABCF 0000 0011 0100 0111 1001 1010 1101 1111 A B C

16 Example – Boolean to Gates 4 Step 4: Wire the AND gates to the appropriate inputs A B C ABCF 0000 0011 0100 0111 1001 1010 1101 1111

17 Example – Boolean to Gates 4 Step 5: Feed the output of all the AND gates into an OR gate A B C ABCF 0000 0011 0100 0111 1001 1010 1101 1111 F

18 Simplifying Boolean Functions Recall the properties of Boolean algebra: –Identity: 1A = A0 + A = A –Null: 0A = 01 + A = 1 –IdempotentAA=AA + A = A –InverseAA’=0A + A’ = 1 –Commutative AB = BAA + B = B+A –Associative (AB)C = A(BC) (A+B)+C = A+(B+C) –Distributive A + BC=(A+B)(A+C) A(B+C)=AB + AC –Absorption A(A+B)=AA+AB = A –DeMorgan(AB)’=A’+B’(A+B)’=A’B’

19 Algebraic equivalence 4 M = A’B’C’ + A’B’C + A’BC + ABC 4 What can we do to simplify this? 4 A’B’C’ + A’B’C = A’B’(C’ + C) = A’B’ 4 A’BC + ABC = (A’+A)BC= BC 4 SO, M = A’B’ + BC Some practice: Show each of the following is true: X + WX’ = X + W XY’ + Y’Z +ZX’ = XY’ +ZX’

20 Functions to Gates Again 4 Once we have a sum of products form for a Boolean function, making the logic diagram is even easier: –Make an AND gate for each term –Route the outputs of all the AND gates to an OR gate. –M = A’B’ + BC A A’ B B’ C C’

21 Exercise 4 Write a function that is 1 if the majority of the inputs are 1 and is 0 otherwise. The function has three inputs. 4 Show the truth table for that function 4 Draw the logic diagram.

22 A decoder 4 A decoder takes inputs and interprets them as the ID of the output line to be asserted. 4 Two inputs can encode four values (00, 01, 10 11) A B 01230123 Overview Details of the logic by MMLogic

23 Multiplexor 4 A multiplexor (MUX) involves input, control line(s), and output. 4 One input is routed to the output, depending on the control state. A B S In this simplest MUX, one control line (S) is used to select either A or B to attach to the output.

24 Full Adder 4 Add bits –Input: Three parts -- the two values plus a possible carry in –Output: the result of the addition plus a possible carry out –Do the truth table –Make the gate level description (logic diagram) Be sure to produce both the sum and the carry out 4 Full Adder -- includes the carry

25 Programmable Logic Array (PLA) 4 Like a template, or a kit from which other things can be built. All the pieces are there, but they have to be combined correctly. 4 The AND array gives us every possible row of the truth table. 4 Each OR gives us one possible output. We connect any set of ANDed inputs to an OR gate to produce an output function.

26 Logical Completeness 4 The set {AND, OR, NOT} is obviously a logically complete set. That is, we can implement any logic function if we combine inputs using some combination of AND, OR, NOT. 4 Interestingly, that is not the only logically complete set. Another such set is this: {NOR}

27 NOR as logically complete 4 How can that be? How would we show that? 4 Since we know that the set {AND, OR, NOT} is logically complete, we could try to show that we can build each of those functions using only NOR gates.


Download ppt "Digital Logic. 4 Why is 32-bit or 64-bit significant in terms of speed, efficiency? 4 Difference between OR and XOR 4 What is a mux for? PLA 4 Two kinds."

Similar presentations


Ads by Google