Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected...

42
Topic 4 – Switching Circuits

description

Serial vs. Parallel Transmission Parallel implies a “multiple elements at once approach,” where a signal passes through multiple elements simultaneously.

Transcript of Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected...

Page 1: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Topic 4 – Switching Circuits

Page 2: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Serial vs. Parallel Transmission Circuit elements can be connected

in either a serial or parallel manner.

Serial implies a “one path through” approach, where a signal would pass through one element, then the next, then the next, and so forth.

Page 3: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Serial vs. Parallel Transmission Parallel implies a “multiple

elements at once approach,” where a signal passes through multiple elements simultaneously.

Page 4: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Switching Circuits Switching circuits (digital logic circuits) are

composed of combinations (serial or parallel) of elements known as gates.

A gate is a high-speed electronic switching element which is capable of turning on or off within a few nanoseconds.

In such a system, switching variables are associated with the input signals to the gates and switching functions are associated with the output signals…the switching function describes the input/output relationship.

Page 5: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Electronic Circuits and Logic Values Truth tables that describe the operation of

gates are presents in terms of high (H) or low (L) voltage (physical) values.

The designed may choose to use these values to represent the logic values 0 and 1 in different ways.

Positive logic uses voltage high (H) to represent 1 and voltage low (L) to represent 0. Negative logic uses voltage high (H) to represent 0 and voltage low (L) to represent 1. Mixed logic uses a combination of both.

Page 6: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Electronic Circuits and Logic Values Mixed logic uses positive logic for some

signals and negative logic for others…never different conventions for the same signals.

A signal that is set to logic 1 is said to be asserted, active, or true. An active-high signal is asserted when it is high (H) and an active-low signal is asserted when it is low (L).

If not asserted (set to logic 0), the signal is said to be deasserted, negative, or false.

Page 7: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Logic Gates Now, let’s look at the seven types of

digital logic gates. The roles of these gates are true and

valid for active-high logic. For example, an AND gate will produce the logic AND of its two active-high inputs as an active-high output. Later, we will see what happens with active-low logic.

Page 8: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The AND Gate

This is an AND gate. Its truth table is straightforward…

So, if the two inputs signalsare asserted (high) the output will also be asserted.Otherwise, the output willbe deasserted (low).

A B Y0 0 00 1 01 0 01 1 1

AB

Y

Page 9: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The OR Gate

This is an OR gate. Its truth table is also straightforward…

So, if either of the twoinput signals are asserted, or both of them are, the output will be asserted.

A B Y0 0 00 1 11 0 11 1 1

AB Y

Page 10: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The NOT Gate (Inverter)

This is a NOT gate or an inverter. It has only one input and is used to implement the complement concept of switching algebra.

A bubble (seen here) at the output of any logic gate indicates that an internal logic 1 produces an external logic 0 and vice versa. Since the inverter has a bubble and does not implement any additional logic function, the output is simply the complement of the input.

A Y

A Y0 11 0

Page 11: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The NOT Gate (Inverter)

The inverter can be seen as changing the polarity of a signal from active-high to active-low. As such, the bubble can be drawn at either the input or the output.

By convention, the bubble is always drawn with the active-low signal. If the input is active-high, and the inverter is changing it to active-low, the bubble is drawn on the output. If the input is active-low and the inverted is changing to to active-high, the bubble is drawn on the input.

Page 12: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The NAND Gate

This is a NAND gate. It is a combination of an AND gate followed by an inverter. It’s truth table shows this…

NAND gates have several interesting properties… NAND(a,a)=(aa)’ = a’ = NOT(a) NAND’(a,b)=(ab)’’ = ab = AND(a,b) NAND(a’,b’)=(a’b’)’ = a+b = OR(a,b)

A B Y0 0 10 1 11 0 11 1 0

AB Y

Page 13: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The NAND Gate These three properties show that a NAND gate

with both of its inputs driven by the same signal is equivalent to a NOT gate, a NAND gate whose output is complemented is equivalent to an AND gate, and a NAND gate with complemented inputs acts as an OR gate.

Therefore, we can use a NAND gate to implement all three of the elementary operators (AND,OR,NOT). Therefore, ANY switching function can be constructed using only NAND gates. Such a gate is said to be primitive or functionally complete.

Page 14: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

A Y

A

BY

YAB

NOT Gate

AND Gate

OR Gate

NAND Gates into Other Gates

(what are these circuits?)

Page 15: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The NOR Gate

This is a NOR gate. It is a combination of an OR gate followed by an inverter. It’s truth table shows this…

NOR gates also have several interesting properties… NOR(a,a)=(a+a)’ = a’ = NOT(a) NOR’(a,b)=(a+b)’’ = a+b = OR(a,b) NOR(a’,b’)=(a’+b’)’ = ab = AND(a,b)

A B Y0 0 10 1 01 0 01 1 0

AB Y

Page 16: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Functionally Complete Gates Just like the NAND gate, the NOR gate is

functionally complete…any logic function can be implemented using just NOR gates.

Therefore, both NAND and NOR gates are very valuable as any design can be realized using either one. It is easier to build an IC chip using all NAND or NOR gates than to combine AND,OR, and NOT gates. Additionally, NAND/NOR gates are typically faster at switching and cheaper to produce.

Page 17: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

NOT Gate

OR Gate

AND Gate

NOR Gates into Other Gates

(what are these circuits?)A Y

YAB

A

BY

Page 18: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The XOR Gate (Exclusive-OR)

This is a XOR gate. XOR gates assert their output

when exactly one of the inputsis asserted, hence the name.

The switching algebra symbolfor this operation is , i.e.1 1 = 0 and 1 0 = 1.

A B Y0 0 00 1 11 0 11 1 0

AB Y

Page 19: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

The XNOR Gate

This is a XNOR gate. This functions as an

exclusive-NOR gate, orsimply the complement ofthe XOR gate.

The switching algebra symbolfor this operation is , i.e.1 1 = 1 and 1 0 = 0.

A B Y0 0 10 1 01 0 01 1 1

AB Y

Page 20: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Combinatorial Circuits Now that we know of all the logic gates,

let’s look at circuits composed of a combination of these gates. We will do two things with these circuits… Analysis – Here, we will look at a circuit and

derive an expression which summarizes its operation. This can be used to verify a circuit does what we want it to and/or to allow us to convert the circuit to a different form, either in fewer gates, or a different type of gates.

Page 21: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Combinatorial Circuits Design and Synthesis – Here, we will

begin with an expression or description and then design and then implement a circuit to fulfill that function. This circuit can be designed with gates, programmable logic devices (more about them later) or other logic elements.

Now, let’s look at analysis of combinatorial circuits.

Page 22: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Analysis: Algebraic Method Any given switching network can be

completely represented by a switching expression.

Remember, any switching expression may be written with AND, OR, and NOT gates. This also means any circuit can be completely represented with NAND gates or with NOR gates.

As an example, let’s analyze a simple combinatorial circuit.

Page 23: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Example #1 - Analysis Example #1 on the board. This is a combinatorial circuit. To analyze

this circuit using algebraic analysis, we will derive switching expressions at each point propagating to the output of the circuit.

Then, we will simplify the resulting expression and implement the resulting simplified expression in logic gates.

Page 24: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Analysis: Timing Diagrams Another method of analyzing combinatorial

circuits is through the use of timing diagrams. A timing diagram is a graphical representation

of input and output signal relationships in a switching network. Often, intermediate signals are also represented.

From this, if all possible input combinations and all outputs are shown, a switching expression for the circuit can be determined.

Page 25: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Example #2 – Timing Diagrams Example #2 on the board. This is a combinatorial circuit and a

corresponding timing diagram. We can examine this diagram to find all possible input combinations, and then learn the resulting output signal(s) at that point in time.

In this example, let’s determine the truth table for the circuit and the minterms for the two outputs.

Page 26: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Propagation Delay Ideally logic gates would function

immediately. As soon as one of their input changed, the output would immediately change.

In physical devices, the delay between an input change and the corresponding output delay is nonzero and is referred to as the propagation delay.

This value is dependent on many issues such as the type of gate, logic family, temperature, and many other factors.

Page 27: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Propagation Delay Many gates have different propagation

delays for going high-to-low than for going low-to-high.

In a datasheet (the manufacture's specifications for their product), the low-to-high delay is normally specified as tPLH and the high-to-low delay to normally specified as tPHL.

When precise timing is not necessary, the average propagation delay is used for each gate.

Page 28: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Synthesis of Combinatorial Logic Circuits

Now, let’s turn to designing and implementing combinatorial logic circuits.

Page 29: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

AND-OR Networks As you’ll remember, AND gates implement

product terms and OR gates implement sum terms.

If a switching expression is expressed in the sum-of-products (SOP) form, it can be implemented easily using AND-OR networks.

Each product term is implemented using an AND gate in the input stage of the network. Then, each product term is ORed together to implement the sum term. This will result in the desired output.

Page 30: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Example #3 – AND-OR Networks Example #3 on the board. Here, we will implement the switching

function f(p,q,r,s) = pr’ + qrs + p’s Each product term is implemented

using an AND gate and then the sum term is implemented using an OR gate.

Therefore, this expression is directly implemented in AND-OR logic.

Page 31: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

NAND Networks Any switching function can be implemented

using just NAND gates. If we take the SOP function, complement it

twice and apply DeMorgan’s Theorem, we will arrive at the NAND form of the expression…f(p,q,r,s) = (pr’ + qrs + p’s)’’= ((pr’)’ (qrs)’ (p’s)’)’= ((pr’)(qrs)(p’s))’= NAND((pr’),(qrs),(p’s))

Thus, we can implement this directly in NAND logic.

Page 32: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

OR-AND Networks If a switching expression is expressed in

the product-of-sums (POS) form, it can be implemented easily using OR-AND networks.

Each sum term is implemented using an OR gate in the input stage of the network. Then, each product term is ANDed together to implement the product term. This will result in the desired output.

Page 33: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Example #4 – AND-OR Networks Example #4 on the board. Here, we will implement the switching

function f(a,b,c,d) = (a’+b+c)(b+c+d)(a’+d)

Each sum term is implemented using an OR gate and then the product term is implemented using an AND gate.

Therefore, this expression is directly implemented in OR-AND logic.

Page 34: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

NOR Networks Any switching function can be implemented

using just NOR gates. If we take the SOP function, complement it

twice and apply DeMorgan’s Theorem, we will arrive at the NAND form of the expression…f(a,b,c,d) = ((a’+b+c)(b+c+d)(a’+d))’’ = ((a’+b+c)’+(b+c+d)’+(a’+d)’)’

= NOR((a’+b+c)’, (b+c+d)’,(a’+d)’) Thus, we can implement this directly in NOR

logic.

Page 35: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Two-Stage Networks Networks like the AND-OR and OR-AND networks

we have just seen are referred to as two-level networks.

Inputs pass through two levels of gates before reaching the output.

The first level is defined as the level that contains the gate that produces the output. The gates that receive the circuit inputs are on the second level.

In general, a network has n levels if at least one input signal must pass through n gates to arrive at the output.

Page 36: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Three-Stage Networks Switching functions in the POS or SOP

form can be implemented directly in two-level networks when the inputs are available in both complemented and uncomplemented forms.

A three-level network is required when only one form of the inputs is available. In this case, only NOT gates are needed on level 3 of the network.

Page 37: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Two and Three Stage Networks

U3AU2A

U1B

U1Apr’

Level 1Level 2

U4B

U4A

U3AU2A

U1B

U1Apr

Level 1Level 2Level 3

Two-Stage Network Three-Stage Network

Page 38: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

NAND Gate Networks At this point, you now have all of the

tools necessary to take a switching function in minterm form and implement it in NAND logic.

The implementation procedure is easy… (1) Express the function in minterm list

form. (2) Write out the minterms in algebraic

form.

Page 39: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

NAND Gate Networks (3) Simplify the function in SOP form

using switching algebra. (4) Use switching algebra theorems to

transform the expression into NAND formulation.

(5) Draw the NAND logic diagram. As an example, let’s implement

f(X,Y,Z) = Σ m(0,3,4,5,7) in NAND logic (Example on the board).

Page 40: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Factoring In some cases, gates with a number of inputs

required may not be available (i.e. we need a 5-input NAND gate and only have 3-input NAND gates).

In such cases, factoring can be used to reduce the number of literals in large product or sum terms to values less than or equal to the number of available gate inputs.

Factoring normally involves using the distributed law. There is no step-by-step way to perform it…it’s more of an art.

Page 41: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Factoring Example #1 Given the expression

f(A,B,C,D) = AB’ + AD’ + AC’we can factor it…f(A,B,C,D) = A(B’ + D’ + C’)= A(BCD)’

Therefore, we can now implement this with one 3-input NAND gate and one 2-input AND gate, instead of three 2-input NAND gates and one 3-input NOR gate.

Page 42: Topic 4 – Switching Circuits. Serial vs. Parallel Transmission Circuit elements can be connected in either a serial or parallel manner. Serial implies.

Factoring Example #2

The function f(a,b,c,d) = Σ m(8,13) needs to be implemented using only 2-input AND and OR gates.