Presentation is loading. Please wait.

Presentation is loading. Please wait.

Logic Gates & Boolean Algebra Chin-Sung Lin Eleanor Roosevelt High School.

Similar presentations


Presentation on theme: "Logic Gates & Boolean Algebra Chin-Sung Lin Eleanor Roosevelt High School."— Presentation transcript:

1 Logic Gates & Boolean Algebra Chin-Sung Lin Eleanor Roosevelt High School

2 Logic Gates & Boolean Algebra System Concept Systems & Subsystems Analog Systems vs. Digital Systems Combinational vs. Sequential Circuits Truth Tables & Basic Logic Gates Logic Simulation Digital Logic Circuits Equivalent Logic Circuits Digital Building Blocks

3 System Concept

4 What Are They In Common? VS. Computer Onion

5 System Concept System (System Function) System (System Function) Input Output

6 System Concept System (System Function) System (System Function) Input Output Input Output System Function

7 System Concept A convenient way to view and understand both the nature and man-made worlds. Hide details and complexity from the viewers by encapsulating this detail information into a “system”. Only the inputs/outputs (I/O) of the system, and the function of the system (called system function) are important. System (System Function) System (System Function) Input Output

8 Systems & Subsystems

9 System (System Function) System (System Function) Systems & Subsystems Systems can be further divided down to subsystems. Subsystems are connected together through inputs and outputs to form the larger system. Input Output Subsystem Sub- system Input Output

10 Subsystem Sub- system Input Output Systems & Subsystems Subsystem themselves can also be further divided down to “Sub-subsystems”. This process can be continued until we reach the most basic elements of the digital logic world— basic logic gates. A system has a layered hierarchical structure like an onion. Input Output Input Output

11 Systems & Subsystems

12 Analog System vs. Digital Systems

13 Two types of systems: Analog system and digital system. Analog System Analog System Input Output Digital System Digital System Input Output

14 Analog System vs. Digital Systems The values of input/output/internal signals of an analog system can vary over a continuous range of values. Analog System Analog System Input Output

15 Analog System vs. Digital Systems The values of input/output/internal signals of a digital system can only be 1’s and 0’s. Digital System Digital System Input Output 01 0 01 0 1 0 1 1

16 Analog System vs. Digital Systems Lots of real-world signals are analog in nature. Analog-to-Digital (A/D) converter has been used to process (digitization/quantization) the incoming analog signals and change them to digital (binary) signals. The digital signals can now be processed by the digital system (e.g., microprocessor). Digital System Digital System Digital I/P 01 0 01 A/D Converter A/D Converter Analog I/P

17 Analog System vs. Digital Systems The output digital signals from the digital system are digital (binary) in nature. Digital-to-Analog (D/A) converter has been used to process the outgoing digital signals and change them to analog (continuous) signals. Most of the computers are the mix of analog and digital systems. Digital System Digital System Digital I/P Digital O/P 01 0 01 0 1 0 1 1 D/A Converter D/A Converter A/D Converter A/D Converter Analog I/P Analog O/P

18 Digital System Digital System Digital I/P Digital O/P 01 0 01 0 1 0 1 1 D/A Converter D/A Converter A/D Converter A/D Converter Analog I/P Analog O/P Analog System vs. Digital Systems

19 Digital System Digital System Digital I/P Digital O/P 01 0 01 0 1 0 1 1 D/A Converter D/A Converter A/D Converter A/D Converter Analog I/P Analog O/P Digital Systems In this unit, we are going to focus ONLY on the digital system.

20 Combinational vs. Sequential Systems

21 Combinational System Combinational System Input Output 01 0 01 0 1 0 1 1 Sequential System Sequential System Input Output 01 0 01 0 1 0 1 1 Two types of digital systems/circuits— combinational and sequential.

22 Combinational vs. Sequential Systems The outputs of a combinational digital system/circuits are solely decided by its inputs. Combinational System Combinational System Input Output 01 0 01 0 1 0 1 1 Combinational System Combinational System Input Output 01 0 01 0 1 0 1 1 Combinational System Combinational System Input Output 10 1 10 0 0 1 1 0

23 Combinational vs. Sequential Systems The outputs of a sequential digital system/circuits depend not only on its inputs, but also on the “current state” of the system. Sequential System Sequential System Input Output 01 0 01 0 1 0 1 1 Sequential System Sequential System Input Output 01 0 01 1 0 1 0 0 Sequential System Sequential System Input Output 10 1 10 0 0 1 1 0

24 Sequential System Sequential System Sequential System Sequential System Sequential System Sequential System Combinational vs. Sequential Systems The outputs of a sequential digital system/circuits depend not only on its inputs, but also on the “current state” of the system. Sequential system/circuits have some sort of “memory” in it, so it can “memorize” the “current state” of the system and behave accordingly. Input Output 01 0 01 0 1 0 1 1 Input Output 10 1 10 0 0 1 1 0 Input Output 01 0 01 1 0 1 0 0 State: 101 State: 110 State: 001

25 Combinational vs. Sequential Systems Combinational System Combinational System Input Output 01 0 01 0 1 0 1 1 Sequential System Sequential System Input Output 01 0 01 0 1 0 1 1

26 Sequential System Sequential System Input Output 01 0 01 0 1 0 1 1 Combinational Systems In this unit, we are going to focus ONLY on the combinational digital system. Combinational System Combinational System Input Output 01 0 01 0 1 0 1 1

27 Truth Tables & Basic Logic Gates

28 Truth Tables A truth table shows how a logic circuit's output responds to various combinations of the inputs. A truth table describe the system function of a logic system. Use “1” and “0” to represent “T” and “F” respectively. 1 1 1 1 1 0 0 0 0 0 0 0 p q pqpq Use a logic gate symbol to represent the function.

29 Truth Tables & Basic Logic Gates X = A  B There are eight basic logic gates. However, only AND, OR and NOT are the most fundamental ones.

30 Negations (NOT) The negation of a statement always has the opposite truth value of the original statement and is usually formed by adding the word not to the given statement. StatementRight angle is 90 o NegationRight angle is not 90 o TRUE FALSE StatementTriangle has 4 sides NegationTriangle does not have 4 sides FALSE TRUE

31 Truth Table – Negation (NOT) The relationship between a statement p and its negation ~p can be summarized in a truth table. A statement p and its negation ~p have opposite truth values. p~p TF FT

32 Conjunctions (AND) A compound statement formed by combining two simple statements using the word and. Statement: p, q Conjunction: p and q Symbols: p ^ q

33 Truth Table – Conjunctions (AND) A conjunction is true when both statements are true. When one or both statements are false, the conjunction is false. pqp ^ q TTT TFF FTF FFF

34 Disjunctions (OR) A compound statement formed by combining two simple statements using the word or. Statement: p, q Disjunction p or q Symbols: p V q

35 Truth Table – Disjunctions (OR) A disjunction is true when one or both statements are true. When both statements are false, the disjunction is false. pqp V q TTT TFT FTT FFF

36 Truth Tables & Basic Logic Gates Use 1 and 0 to represent True and False respectively. The truth table summarizes all the possible values of input signals and their corresponding output signal values. p~p TF FT XY 10 01

37 Truth Tables & Basic Logic Gates The truth table is an effective way to describe the system function of a digital system. Input X Output Y XY 10 01 0/1 1/0 System Function

38 Truth Tables & Basic Logic Gates A logic gate is a device performing a logical operation on one or more logical inputs, and produces a single logical output. 0/1 1/0 Logic Gate X

39 Boolean Algebra & Boolean Functions Boolean algebra is a branch of algebra in which the values of the variables are the truth values true (1) and false (0). The main operations of Boolean algebra are the conjunction (and,  ), the disjunction (or, +), and the negation (not, ). 0/1 1/0 Logic Gate X

40 Boolean Algebra & Boolean Functions A Boolean function describes how to determine a Boolean value output based on some logical calculation from Boolean inputs. Y = X Y = A + B Y = A  B (NOT)(OR)(AND)

41 Truth Tables & Basic Logic Gates X XY 01 10 NOT (Inverter) Boolean Function Truth Table Logic Gate Y = X

42 Truth Tables & Basic Logic Gates AND Truth Table Logic Gate ABY 000 010 100 111 Y = A  B Boolean Function

43 Truth Tables & Basic Logic Gates Truth Table Logic Gate ABY 000 011 101 111 OR Y = A + B Boolean Function

44 Truth Tables & Basic Logic Gates XY 00 11 Buffer Boolean Function Truth Table Logic Gate Y = X X

45 Truth Tables & Basic Logic Gates NAND Truth Table Logic Gate ABY 001 011 101 110 Y = A  B Boolean Function

46 Truth Tables & Basic Logic Gates Truth Table Logic Gate ABY 001 010 100 110 NOR Y = A + B Boolean Function

47 Truth Tables & Basic Logic Gates XOR Truth Table Logic Gate ABY 000 011 101 110 Y = A  B Boolean Function

48 Truth Tables & Basic Logic Gates Truth Table Logic Gate ABY 001 010 100 111 XNOR Y = A  B Boolean Function Y = A  B

49 Truth Tables & Basic Logic Gates X = A  B

50 Logic Simulation

51 Logic simulation is the use of simulation software to predict the behavior of digital circuits.

52 Digital Logic Circuits

53 Logic gates can be connected and cascaded to form logic circuits. Every logic circuits can be treated as a system, and can be described by a system function— truth table. We can derive the truth table of the circuit by evaluating the logic circuit stage by stage. Y

54 Digital Logic Circuits ABCDEFY 00 01 10 11 C D E F Y

55 ABCDEFY 00 1 01 1 10 0 11 0 C D E F Y

56 ABCDEFY 00 11 01 10 10 01 11 00 C D E F Y

57 ABCDEFY 00 110 01 101 10 010 11 000 C D E F Y

58 ABCDEFY 00 1100 01 1010 10 0101 11 0000 C D E F Y

59 ABCDEFY 00 11000 01 10101 10 01011 11 00000 C D E F Y

60 ABCDEFY 00 11000 01 10101 10 01011 11 00000 C D E F Y = A B +

61 Equivalent Logic Circuits

62 Logic circuits of different gates and forms can have an identical truth table. These circuits are called equivalent logic circuits. This implies that a digital system with certain system function (truth table) can have many different implementations.

63 Laws of Boolean Algebra One variable NOT: x = x AND: x · x = x x · x = 0 OR: x + x = x x + x = 1 XOR: x ⊕ x = 0 x ⊕ x = 1

64 Laws of Boolean Algebra Commutativity AND: x · y = y · x OR: x + y = y + x XOR: x ⊕ y = y ⊕ x Associativity AND: (x · y) · z = x · (y · z) OR: (x + y) + z = x + (y + z) XOR: (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z)

65 Laws of Boolean Algebra Distributivity x · (y + z) = (x · y) + (x · z) x + (y · z) = (x + y) · (x + z) x · (y ⊕ z) = (x · y) ⊕ (x · z) De Morgan’s laws NAND: x · y = x + y NOR: x + y = x · y

66 Logic Simplification We can apply the laws of Boolean algebra to reduce the expression to its simplest form (simplest defined as requiring the fewest gates to implement)

67 Equivalent Logic Circuits Different implementations are chosen to meet different design considerations Less number of gates (area) less kind of gates (gate type), and less stages of the circuits (speed).

68 Equivalent Logic Circuits For example, what are the following logic circuits?

69 Equivalent Logic Circuits For example, all of the following four logic circuits have the same truth table, and implement the XOR gate functionality.

70 Digital Building Blocks

71 All these logic circuits can be encapsulated into a block (XOR gate) and treated as a system.

72 Digital Building Blocks This XOR gate can be further used as a building block to build larger and more complicated logic circuit such as a “full adder”.

73 Digital Building Blocks A full adder can again be treated as a building block to build a larger logic circuit called Arithmetic-Logic Unit (ALU).

74 Digital Building Blocks ALU can again be treated as a building block to build a Central Processing Unit (CPU).

75 Digital Building Blocks This process can go on and on to build an Intel® Intel® Core™ i7 Processor with these digital logic building blocks. Intel Core i7 Processor

76 Digital Building Blocks The processor is so complicated at this level that it can contain hundreds of millions of basic logic gates.

77 Q & A


Download ppt "Logic Gates & Boolean Algebra Chin-Sung Lin Eleanor Roosevelt High School."

Similar presentations


Ads by Google