Boolean logic Flashcards
(22 cards)
What is the difference between boolean logic and boolean algebra?
- Boolean logic refers to the principles of logic based on binary values
- Boolean algebra is a mathematical system used to manipulate boolean values
Boolean notation for AND
A ∧ B
A . B
Boolean notation for OR
A V B
A + B
Boolean notation for NOT
¬A
Boolean notaiton for XOR
A ⊕ B
How to simplify a Karnaugh map
- Break the expression up at the OR statements
- Plot each statement on the KMap
- Draw regions around each grouped 1. Regions should be of size of 2^n (2, 4, 8)
- If the variable remains the same, keep it
What are the general AND rules?
- X AND 0 = 0
- X AND 1 = X
- X AND X = X
- NOT X AND X = 0
What are the general OR rules?
- X OR 0 = X
- X OR 1 = 1
- X OR X = X
- NOT X OR X = 1
How do you apply De Morgan’s rule?
- Initial statement: ¬(A ∧ B)
- Change the AND to an OR (or vice versa): ¬(A V B)
- Negate both statements in the bracket: ¬(¬A V ¬B)
- Negate the whole statement: ¬¬(¬A V ¬B)
- Double negations: (¬A V ¬B)
- Get rid of brackets: ¬A V ¬B
How do you apply the distribution law?
- Initial statement: A V (B ∧ C)
- Factorise the statement: (A V B) ∧ (A V C)
How do you apply the association law?
- We can remove brackets and regroup variables ONLY if the signs are the same (all OR or all AND)
- Initial statement: (A V B) V C
- Regroup variables: A V B V C
How do you apply the commutative law?
- The order of the variables does not change the outcome
- A V B is the same as B V A
How do you apply the double negation law?
- Two NOTs cancel eachother out
- ¬¬A is the same as A
How does a D-type flip flop circuit work?
- There are 2 inputs: D and clock
- There are 2 outputs: Q and NOT Q
- On the rising edge of the clock, if D is high, Q goes high
- If D is low, Q goes low
- Values only change on the rising edge
What is a D-type flip flop circuit?
- Contains 2 stable states and is used to store the state of 1 bit of data. It changes state on the edge of a clock pulse
Explain where you would use a D-type flip flop circuit
- Shift registers
- Counters
- Memory units
What is a half adder circuit?
- A digital circuit used to perform the addition of two single bit numbers
- Has two inputs (A and B)
- Has two outputs: Carry out (Cout) and Sum (S)
How do you simplify the outputs of a half adder circuit?
- Carry out (Cout) is the same as A AND B
- Sum (S) is the same as A XOR B
How do you draw a half adder circuit?
- AND gate with A and B as the input, output is Cout
- XOR gate with A and B as the input, output is S
What is a full adder circuit?
- A digital circuit that allows the addition of 3 bits
- It has 3 inputs: A, B and Cin
- It has 2 outputs: Cout and Sum (S)
How do you use a full adder circuit?
- Add together all the bits in the inputs. E.G: A=1, B=1, C=0. Add together 1+1=2
- Write down the answer in binary: 10
- Cout is 1 and sum is 0
How do you draw a full adder circuit?
- Draw a half adder with A and B as the inputs
- Draw another half adder with the output of the first XOR gate and C as the inputs
- The output from the second XOR gate is the sum (S)
- Draw an OR gate with the outputs of both AND gates as the input. The output of this is Cout