Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week 7: Gates and Circuits: PART II

Similar presentations


Presentation on theme: "Week 7: Gates and Circuits: PART II"— Presentation transcript:

1 Week 7: Gates and Circuits: PART II
READING: Chapter 4

2 Properties of Boolean Algebra
EECS Computer Use: Fundamentals Properties of Boolean Algebra DeMorgan’s law, in particular, is very useful in Boolean algebra. For instance, it means that: ___ 1 NAND gate is equivalent to 2 NOT gates with an OR gate

3 Properties of Boolean Algebra
EECS Computer Use: Fundamentals Properties of Boolean Algebra Suppose we have the following logic circuit diagram: 3T A 2T Requires 8 transistors in total to implement B 3T C D Recall that a NAND gate needs 2 transistors: Vout Vin1 Vin2

4 Properties of Boolean Algebra
EECS Computer Use: Fundamentals Properties of Boolean Algebra If we apply DeMorgan’s law: (AB)’ = A’ OR B’ ___ So, we will obtain the following logic diagram: 2T 3T A 3T A 2T B B 3T 2T C C D D Requires 7 transistors in total to implement

5 EECS 1520 -- Computer Use: Fundamentals
Addition One of the most basic operations a computer can perform is to add two numbers together Addition operations in binary are carried out by special circuits called adders

6 EECS 1520 -- Computer Use: Fundamentals
Adder A circuit that computes the sum of two single bits and produces the correct carry bit is called a half adder How do we implement the circuit? Recall adding two binary digits: Carry Sum

7 EECS 1520 -- Computer Use: Fundamentals
Half Adder Based on the previous results, we obtain 2 output results: Sum, Carry The next step is to create a truth table that consists A, B, Sum and Carry Carry Sum

8 EECS 1520 -- Computer Use: Fundamentals
Half Adder Based on the previous results, we obtain the following truth table with 2 output results: Sum, Carry Corresponds to AND gate A B Sum Carry 1 Corresponds to XOR gate

9 EECS 1520 -- Computer Use: Fundamentals
Half Adder Based on the previous results, the circuit for a half adder is : A B Sum Carry 1 Because the circuit produces two distinct output values, we represent the half adder with 2 Boolean expressions:

10 EECS 1520 -- Computer Use: Fundamentals
Half Adder A half adder does not take into account a possible carry value into the calculation (carry-in) For example: if we want to perform another addition based on the following result, the Carry bit is ignored Carry Sum Half adder is only good for adding 2 single bits, but cannot be used to compute the sum of 2 binary values with multiple digits each

11 EECS 1520 -- Computer Use: Fundamentals
Full Adder A circuit called full adder takes the carry-in value into account Based on the logic diagram, we should then create the truth table for the full adder

12 EECS 1520 -- Computer Use: Fundamentals
Full Adder Let’s go back one step and try to understand why we need an OR gate at the output Suppose: A = 1, B = 1, 1 1 1 = A + 1 = B 1 0 1 If we want to add a single bit of 1 (called “C”) to the previous sum, C = 1 1 1 = A + 1 = B 1 0 + 1 = C 1 1 1 1 1

13 EECS 1520 -- Computer Use: Fundamentals
Full Adder Suppose: A = 0, B = 1, 1 1 0 = A + 1 = B 0 1 If we want to add a single bit of 1 (called “C”) to the previous sum, C = 1 0 = A + 1 = B 0 1 + 1 = C 1 0 1 1 1

14 EECS 1520 -- Computer Use: Fundamentals
Full Adder An OR gate can do the job 1 1 1 = A + 1 = B 1 0 + 1 = Carry in 1 1 0 = A + 1 = B 0 1 + 1 = Carry in 1 0 1 1 1 1 1 1

15 EECS 1520 -- Computer Use: Fundamentals
Full Adder The truth table for a full adder is: A B Carry-in AND1 AND2 Sum Carry-out 1 A B Carry-in AND1 AND2 Sum Carry-out 1 A B Carry-in AND1 AND2 Sum Carry-out 1 A B Carry-in AND1 AND2 Sum Carry-out 1 A B Carry-in AND1 AND2 Sum Carry-out 1 AND2 AND1

16 EECS 1520 -- Computer Use: Fundamentals
Multiplexers S0 S1 S2 F D0 1 D1 D2 D3 D4 D5 D6 D7 The control lines S0, S1, S2 determine which of eight other input lines (D0 – D7) are provided to the output “F” For example, if S0 S1 S2 = 000 , the output will be equal to D0 In general, the binary values on n input control lines are used to determine which of 2n other data lines are selected for output.

17 EECS 1520 -- Computer Use: Fundamentals
Sequential Circuits Digital circuits that store information form a sequential circuit. In this circuit, the output of the circuit also serves as input to the circuit. That is the existing state of the circuit is used to determine the next state of the circuit


Download ppt "Week 7: Gates and Circuits: PART II"

Similar presentations


Ads by Google