Lesson Objectives Aims Be able to define problems using Boolean logic Manipulate Boolean expressions including the use of Karnaugh maps to simplify those expressions Use De Morgan’s Laws, distribution, association, commutation and double negation Use logic diagrams and truth tables – half and full adders
Do NOT trust the book on this topic: Note Do NOT trust the book on this topic: There ARE mistakes in there It does NOT provide a good explanation of these topics.
Biconditional equivalence Key terms Symbol Formal term Informal term ∧ Conjunction AND ∨ Disjunction OR ¬ Negation NOT → Implication IF ↔ Biconditional equivalence Equality ⊕ Exclusive or XOR
Conjunction - AND P Q P AND Q T F P Q P AND Q 1
Disjunction - OR P Q P OR Q T F P Q P OR Q 1
Inverse (NOT) P NOT P T F P NOT P 1
Writing Boolean Expressions
The easiest way to simplify an expression with up to 4 inputs Karnaugh Mapping The easiest way to simplify an expression with up to 4 inputs Basic gist: Get the Boolean expression Make truth table Plot karnaugh map Look for blocks (in powers of 2 (book makes a mistake here!!)) Interpret what those blocks mean
More rules It does not matter which order you plot the inputs on the map A zero will be interpreted as NOT Each rule is conjoined by OR You are looking for what does NOT change in a block If you have two inputs together in a block that do not change, they will be ANDed
Example Simplify ¬A ∧ (B ⋁ ¬A) Truth Table (2 inputs) A B ¬A B ⋁ ¬A 1 1 A B ¬A B ⋁ ¬A ¬A Λ (B ⋁ ¬A) 1 A B 1 A B 1 A B ¬A 1
Plot the Karnaugh Map A B 1 A B ¬A Λ (B ⋁ ¬A) 1 A B 1
Notes It does not matter where you plot A and B, try it – you can reverse if you like The order of the 1’s and 0’s in the table headings don’t matter either as long as only ONE variable changes at a time (irrelevant on 2 inputs, relevant on 3 or more)
Now look for groups of 1’s Next Now look for groups of 1’s They MUST be in powers of 2 (you cannot select 5 or 3 for example) but you CAN have a group of 1 A B 1
Interpret the group ¬A ∧ (B ⋁ ¬A) ¬A A B 1 is You are looking for the variable which does NOT change in the group. In this example, B changes from 0 to 1, so we ignore it. A stays the same – 0 If the variable that stays the same is a 1 then you write it down “as is” If the variable that stays the same is a 0 then it is NOT that variable. In this example, A stays the same, but is a Zero, so the rule for this group is ¬A There are no more groups so the simplification of ¬A ∧ (B ⋁ ¬A) is ¬A A B 1
Harder Question – 3 inputs Simplify A ∧ B ⋁ A ∧ (B ⋁ C) ⋁ B ∧ (B ⋁ C) Hint, your Karnaugh Map will look like this: Note the order of the column AB – it does not go 00, 01, 10, 11 as you would expect. This is because only ONE variable may change from one column to the next AB C 00 01 11 10 1
A B C A Λ B B ⋁ C A Λ (B ⋁ C) B Λ (B ⋁ C) A Λ B ⋁ A Λ (B ⋁ C) ⋁ B Λ (B ⋁ C) 1
AB C 00 01 11 10 1 A B C A Λ B B ⋁ C A Λ (B ⋁ C) B Λ (B ⋁ C) A Λ B ⋁ A Λ (B ⋁ C) ⋁ B Λ (B ⋁ C) 1 AB C 00 01 11 10 1
B A Λ C AB C 00 01 11 10 1 AB C 00 01 11 10 1
A ∧ B ⋁ A ∧ (B ⋁ C) ⋁ B ∧ (B ⋁ C) = B ⋁ (A Λ C)
Answers
Now try this…
Those groups give us: (A Λ B Λ C) V (A Λ ¬B Λ ¬C Λ ¬D) And also: (¬A Λ C Λ ¬D) V (¬A Λ ¬C Λ ¬D)
(¬A Λ C Λ ¬D) V (¬A Λ ¬C Λ ¬D) This can be simplified: ¬A V ¬A = ¬A C V ¬C = 1 (So removed) ¬D V ¬D = ¬D Therefore (¬A Λ C Λ ¬D) V (¬A Λ ¬C Λ ¬D) = (¬A Λ ¬D)
Simplifying expressions Rules…
Basic rules Work out the brackets first – expand them Then look for rules that cancel out Then re-arrange if necessary to create other simplification rules from the table Continue until reduced to simplest form
Exercise Its worksheet time
Simplification questions
Answers – hello cheats
What do the outputs look like? Sum = XOR Carry = AND Circuits Half Adder: What do the outputs look like? Sum = XOR Carry = AND INPUTS OUTPUTS A B SUM CARRY 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1
Half Adder You will need to be able to draw this circuit from memory in the exam.
Why is it called a half adder? Because it doesn’t take in to account any carry values being brought IN to the calculation
Full Adder Truth Table: INPUTS OUTPUTS A B CIN COUT S 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1
Full adder circuit
S = (A ⊕ B) ⊕ Cin Cout = (A ∧ B) ∨ (Cin ∧ (A ⊕ B) )
4 bit Adder What happens to the final Cout? What implication does the cascaded carry have?
Implication Boolean implication A implies B simply means Q P → Q T F Boolean implication A implies B simply means "if A is true, then B must be true". This implies that if A isn't true, then B can be anything. This can also be read as (not A) or B "either A is false, or B must be true"
Review/Success Criteria