Digital Technologies - Lecture 2: Logic Gates and Truth Tables

Combinational Logic

Dr. Lijuan Wang, Room 1.33, Jennison Building, Email: L.Wang@kent.ac.uk

Course Overview – Combinational Logic

  • Lecture 1: Introduction to digital signals
  • Lecture 2: Logic gates and truth tables
  • Lecture 3: Introduction to minimisation
  • Lecture 4: Minimisation using Karnaugh Maps
  • Lecture 5: Boolean algebra, De Morgan’s theorem, Duality
  • Lecture 6: Combinational logic circuits

Digital Operation

  • Digital signals operate at two states:
    • High / Low
    • '1' / '0'
    • 5V, 3.3 V / 0V
    • Asserted / Not-asserted
    • Activated / Not-activated

Basic Logic Gates

AND Gate
  • Symbol: “ . ” is read as “AND”
  • Y will only be activated if A AND B are activated.
  • Boolean Expression/Logic Function: Y=A.BY = A.B
AND Gate Example
  • Lift will only move if the floor has been selected AND the door closed sensor has been activated.
  • Move Lift in Selected Direction occurs when Floor Selected by Pressing Button (Returns '1' when button pressed) AND Door Closed Sensor Activated (returns '1' when the door is closed).
Multiple Input AND Gate
  • Y will only be activated if A AND B AND C AND D are activated.
  • Y will not be activated if any of the inputs are low.
  • Logic Function: Y=A.B.C.DY = A.B.C.D
OR Gate
  • Symbol: “ + ” is read as “OR”
  • Y will be activated if A OR B are activated.
  • Logic Function: Y=A+BY = A + B
OR Gate Example
  • Fire alarm will be triggered if smoke/fire is detected in any room.
  • Sound Alarm if Sensor in Lecture room (Set to '1' when smoke/fire detected) OR Sensor in Lab (Set to '1' when Smoke/fire detected).
Multiple Input OR Gate
  • Y will be activated if A OR B OR C OR D is activated.
  • Y will NOT be activated only if all inputs are low.
  • Logic Function: Y=A+B+C+DY = A+B+C+D
NOT Gate (Inverter)
  • Note: read as “Y is NOT A”
  • A single-input logic gate
NOT Gate Example
  • The door will stop spinning if the stop sensor is activated.
  • Rotating Door Control ('1' = rotate, '0' = stop) is the inverse of Door Stop Sensor ('1' = object detected, '0' = no object).

Truth Tables

  • Two-variable Truth Table:
ABZ
000
011
101
111
  • Three-variable Truth Table:
ABCZ
0000
0010
0100
0110
1000
1010
1100
1111

Truth Tables of Basic Logic Gates

OR
ABY
000
011
101
111
AND
ABY
000
010
100
111
NOT
AY
01
10

Digital Circuit Analysis

  • For logic gates, we define their operation by the truth table.
  • Digital systems are made from interconnections of many gates.
  • How do we analyze more complicated circuits?

A simple circuit

A simple circuit example with AND and NOT operations.

A simple circuit Truth Table

Create the truth table and populate it to understand circuit behavior.

ABCAnd_opNot_op
00001
00101
01001
01101
10001
10101
11010
11110

Symbolic Notation

Examples of symbolic notation for logic gates in circuits.

Symbolic Notation - Examples

Illustration of symbolic notation with multiple examples.

Symbolic Notation - Non-Equivalence

Examples highlighting non-equivalence in symbolic notation.

Symbolic Notation - Precedence

  • What does this mean?
  • An alternative to using brackets is to adopt a convention for precedence of operations or binding order.

Other Logic Gates

Introduction to other logic gates like NAND, NOR, XOR, and NXOR (XNOR).

| Gate | A | B | Output Y |
| :---- | :-: | :-: | :------- |
| NAND | A | B | A.B\overline{A.B} |
| NOR | A | B | A+B\overline{A+B} |
| XOR | A | B | A⊕B |
| NXOR | A | B | AB\overline{A \bigoplus B} |

Other Logic Gates

  • NAND, NOR, and NXOR gates are equivalent to AND, OR, and XOR (respectively) with a NOT gate on the output.

Logic ICs

Examples of Logic ICs: 74HC08 Quad 2-Input AND Gate, 74HC00 Quad 2-Input NAND Gate

Logic ICs

Examples of Logic ICs:

  • 74HC32 Quad 2-Input OR Gate
  • 74HC20 Dual 4-Input NAND Gate

Exercise

  • Complete the Truth Table to analyse the output
  • What do you observe? Can this circuit be replaced with an alternative that will do exactly the same operation?
  • If so, what are the advantages of the alterative circuit?

Exercise - Truth Table analysis

Truth Table analysis of a given circuit.

abcn1n2n3n4op
000
001
010
011
100
101
110
111