Subtopic Notes

15.2 Boolean Algebra and Logic Circuits

15. Hardware and Virtual Machines

NOT Gate

NameSymbolBoolean Symbol
NOT

Truth Table

AOut
01
10

AND Gate

NameSymbolBoolean Symbol
AND

Truth Table

ABOut
000
010
100
111

OR Gate

NameSymbolBoolean Symbol
OR

Truth Table

ABOut
000
011
101
111

NAND Gate

NameSymbolBoolean Symbol
NAND

Truth Table

ABOut
001
011
101
110

NOR Gate

NameSymbolBoolean Symbol
NOR

Truth Table

ABOut
001
010
100
110

XOR / EOR Gate

NameSymbolBoolean Symbol
XOR / EOR
or A.B̅ + A̅.B

Truth Table

ABOut
000
011
101
110

Half Adder

  • Logic Circuit that adds two single binary digits
  • Outputs the result along with carry
  • Typically represented using XOR gate (sum) and AND gate (carry)
ABSC
0000
0110
1010
1101

Full Adder

  • Logic Circuit that adds three binary digits
  • Three inputs including the previous carry bit.
  • Typically represented with two half adder circuits and an OR gate

Flip Flop

  • Basic data storage element in digital electronics
  • Can store 1 bit of data (either 0 or 1) until it is told to change

SR Flip Flop/Latch

  • May use NAND gates or NOR Gates
  • A two-state device controlled by Set (S) and Reset (R) inputs.
  • The flip-flop is a two-state device:
    • Q set to 1 and Q’ set to 0
    • Q set to 0 and Q’ set to 1
    • Invalid State: Q and Q’ having the same value
  • Limitations:
    • One combination of SR Flip flop is invalid
    • Inputs may not arrive at the same time

Using NAND Gate

SRQQ’State
0011Invalid
0110Sets Q to 1
1001Resets Q to 0
11No Change

Using NOR Gate

SRQQ’State
00No Change
0101Sets Q’ to 1
1010Resets Q’ to 0
1100Invalid

JK Flip Flop

JKQnQn+1
0000
0011
0100
0110
1001
1011
1101
1110
  • Has no invalid state, more stable
  • Uses a clock pulse to synchronize and ensure proper function
  • Only active when clock is high

Boolean Algebra

You don't need to remember the name, just use the formulas to simplify expression

NameAND formOR form
Identity law1A = A0 + A = A
Null law0A = 01 + A = 1
Idempotent lawAA = AA + A = A
Inverse lawAA̅ = 0A + A̅ = 1
Commutative lawAB = BAA + B = B + A
Associative law(AB)C = A(BC)(A + B) + C = A + (B + C)
Distributive lawA + BC = (A + B)(A + C)A(B + C) = AB + AC
Absorption lawA(A + B) = AA + AB = A
De Morgan's law
Misc (Derived)A + A̅B = A + BA(A̅ + B) = AB

Example of Simplification

StepWorkingLaw / Reason
1(A + A̅.B)(A + C) + (A̅ + B)(A + B̅) + A.B.C̅Given expression
2(A + B)(A + C) + (A̅ + B)(A + B̅) + A.B.C̅Misc
3A + B.C + (A̅ + B)(A + B̅) + A.B.C̅Distributive law
4A + B.C + A̅.A + A̅.B̅ + B.A + B.B̅ + A.B.C̅Expanding 3rd term
5A + B.C + 0 + A̅.B̅ + A.B + 0 + A.B.C̅Inverse law
6A + B.C + A̅.B̅ + A.B + A.B.C̅Identity law
7A + B.C + A̅.B̅ + A.B(1 + C̅)Factorising
8A + B.C + A̅.B̅ + A.BNull law
9A + A.B + A̅.B̅ + B.CRearranging
10A + A̅.B̅ + B.CAbsorption law
11A + B̅ + B.CMisc
12A + B̅ + CMisc

Karnaugh Map (K-map)

  • A visual method to simplify Boolean expressions
  • Groups adjacent 1s in the truth table
  • Minimises logic expressions without heavy algebra.
  • Reduces number of gates
  • Sum of product: OR Gate between all the combinations that lead to 1 in the output
  • Method
    • Fill in the map diagram by keeping AB on one side and C or CD on the other side
    • Mark a 1 for each combination of inputs where the output is 1.
    • Form groups:
      • Only group sizes of 1, 2, 4, 8… (powers of 2)
      • Groups must be rectangular & wrap around edges
      • Larger groups = simpler expression
      • Each 1 must be in at least one group
    • Take the common values from the groups and use or gates between them