Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematics CS 2610 February 19, 2009. 2 Logic Gates: the basic elements of circuits Electronic circuits consist of so-called gates connected.

Similar presentations


Presentation on theme: "Discrete Mathematics CS 2610 February 19, 2009. 2 Logic Gates: the basic elements of circuits Electronic circuits consist of so-called gates connected."— Presentation transcript:

1 Discrete Mathematics CS 2610 February 19, 2009

2 2 Logic Gates: the basic elements of circuits Electronic circuits consist of so-called gates connected by wires OR gate AND gate x y xy x x Inverter (NOT gate) X Y X+Y

3 3 Half Adder sum carry y x

4 4 Full Adder Half Adder Half Adder sum Carry out Carry in x y

5 5 Add Three Bits Half Adder Full Adder Full Adder y2y2 x2x2 y1y1 x1x1 y0y0 x0x0 s0s0 s1s1 s2s2 c 2 =s 3 c0c0 c1c1

6 6 Circuit Minimization We have seen that a function can be represented by many different equivalent expressions Before building our circuit, we want to find a simple expression for the function When building circuits, we want to use the minimum possible number of gates (why?) For example, instead of xyz + xyz, we can use xz How do we find the minimum expression?

7 7 Adjacent Minterms To minimize circuits, start by writing your function in DNF (sum of products) Two minterms are adjacent if they differ by one variable, which is negated in one minterm and not negated in another The sum of two adjacent minterms is equivalent to the single term that results when this variable is removed E.g., xyz + xyz = xz

8 8 Why Adjacent? We can represent functions by using Karnaugh maps x x yy x y

9 9 Example xy + xy + xy = x + y x x yy 11 1

10 10 Three Variable Karnaugh Maps With the three variables x, y, z, we can let x and x be on the vertical side as before The table will now have 4 columns: yz, yz, yz, and yz Order is important! Columns must be adjacent to each other We also consider the first and last columns to be adjacent Picture the table as a flattened cylinder A block of 2 cells cancels out 1 variable A block of 4 cells cancels out 2 variables What if we have a block of 8 cells?

11 11 3-Variable Example xyz + xyz + xyz + xyz + xyz = z + xy 11 11 1 x x yz


Download ppt "Discrete Mathematics CS 2610 February 19, 2009. 2 Logic Gates: the basic elements of circuits Electronic circuits consist of so-called gates connected."

Similar presentations


Ads by Google