Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University 2007-2008.

Similar presentations


Presentation on theme: "Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University 2007-2008."— Presentation transcript:

1 Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University 2007-2008

2 Analysis of Combinational Logic Combinational logic deals with the method of “combining” basic gates into circuits that carry out a desired application. Examples of combinational circuits : decoders, encoders, multiplexers, adders, subtractors, multipliers, comparators, etc. decoders, encoders, multiplexers, adders, subtractors, multipliers, comparators, etc. Logic circuits that contain no memory (ability to store information) are combinational. Those that contain memory, including flip-flops are said to be sequential Those that contain memory, including flip-flops are said to be sequential

3 Logic Functions Any logic function can be implemented with AND, OR, and NOT. One standard form is the sum of products Example: Y = (A B + C D) Inputs AND gates OR gates Inverters Outputs

4 Logic Function Logic can be described in several ways Logic Diagram Logic Diagram Boolean Algebra Boolean Algebra Truth Table Truth Table

5 Universal Logic Gate Some other logic functions NOR ::= Negative OR NOR ::= Negative OR Y = ( A + B )´ NAND ::= Negative AND NAND ::= Negative AND Y = ( A B )´ Multiplexor Multiplexor Y = A S + B S´ Look up table (LUT) Look up table (LUT) Small memory

6 Universal Logic Gate NOR Function NOR ::= Negative OR Y = ( A + B )´ NOT OR AND

7 Universal Logic Gate NAND Function NAND ::= Negative AND Y = ( A B )´ NOT OR AND

8 Universal Logic Element Boolean Algebra

9 Boolean Algebra Suppose two variables: a and b, which have only two probable values: 1 and 0. To understand the Boolean rules better, compare the variables with the switches shown in the following circuits:

10 Boolean Algebra (continued…) Boolean rules:

11 Boolean Algebra (continued…) 14) Duality: The dual of a true expression is also true and can be formed by replacing and’s with or’s (and vice versa), 0’s with 1’s (and vice versa). 14) Duality: The dual of a true expression is also true and can be formed by replacing and’s with or’s (and vice versa), 0’s with 1’s (and vice versa). 15) Demorgan’s Law: 15) Demorgan’s Law: Precedence of operators:1.not 2.and 3.or Example:

12 Decreasing the Use of Transistors in Overflow Detector by the Boolean Algebra Manipulation of an expression will be a worthy act as it can be used to reduce time and energy consumption in the circuit. Example:

13 Decreasing the Use of Transistors in Overflow Detector by the Boolean Algebra Using less transistors to realize a circuit usually means less delay and power consumption too. Example: If we realize the hardware directly from this expression we will need 26 transistors. We will now try to decrease this amount by using Boolean algebra: The last expression will only need 14 transistors to realize.

14 Truth Table

15 Karnaugh Map Using Boolean algebra for minimization causes it’s own problem because of it mainly being a trial and error process, and we can almost never be sure that we have reached a minimal representation. A Karnaugh Map allows us to find input variable redundancies, thus help reduce output equation.  The K-map method is easy and straightforward.

16 Karnaugh Map (continued…) We can come close to our aim by using a graphical notation named Karnaugh Map shown as follows:

17 Karnaugh Map (continued…) As it can be seen, each box of the Karnaugh map corresponds to a row of the truth table and has been numbered accordingly. In the following example, the truth table and the Karnaugh map correspond in the above mentioned manner: This form of representing w in the following example is called a Sum of Product (SOP).

18 Karnaugh Map (continued…) When attempting to minimize a function with Boolean algebra, writing the expression in standard SOP form will make the rest of the process easier. For instance: According to the facts mentioned above, in order to use the Karnaugh maps for minimizing a function, it’s enough to map the physical adjacent 1’s in the Karnaugh map and write the relative Boolean expressions of the maps as it’s shown in the following example:

19 Examples of K-Maps:  Examples: Cell numbers are written in the cells.  2-variable K-map 32 10 0 1 01 A B A K-map for a function of n variables consists of: 2n cells, and, in every row and column, two adjacent cells should differ in the value of only one of the logic variables.

20 3 and 4 -Variable K-Map  3-variable K-map 0132 4576 00 01 11 10 0101 A BC01324576 12131514 891110 00 01 11 10 00 01 11 10 AB CD  4-variable K- map

21 Karnaugh Map Methods Can form final simplified expression from the minimum number of circles required to encompass all the ones. minimum expression we could also include the third circle and thus we could also include the third circle and thus but this is not a minimum expression. Two loops cover all the ones.

22 Karnaugh Map Methods for which an implementation would be

23 Karnaugh Map Methods or we could loop the zeros.

24 Karnaugh Map Methods for which an implementation would be


Download ppt "Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University 2007-2008."

Similar presentations


Ads by Google