EEE2243 Digital System Design Chapter 1: Combinational Logic Recap by Muhazam Mustapha, January 2011
Learning Outcome By the end of this chapter, students are expected to refresh their knowledge on combinatorial logic related to HDL
Chapter Content Boolean Logic Representation of Boolean Function
Boolean Logic
Definition Boolean algebra has 2 similar but different definitions for mathematician and engineers Mathematician: Boolean algebra is part of the so called abstract mathematics that involves structures and lattice –Wikipedia: Engineers: Boolean algebra is calculus of truth values that is used as a means to facilitate the design of logic and digital systems –Wikipedia: We’ll refresh our boolean algebra / logic enough for use with HDL (Verilog)
Boolean Values Pairs of 2 distinct values 10 HIGHLOW TrueFalse ONOFF
Boolean Operations OR (binary operation) –symbol: ‘+’ (plus) –gives true ( 1 ) if any of the parameters is true AND (binary operation) –symbol: ‘·’ (dot) – optional –gives true ( 1 ) if both parameters are true NOT (unary operation) –symbol: ‘‾’ (bar / overline) –gives true ( 1 ) if the parameter is false –gives false ( 0 ) if the parameter is true –also called ‘inverter’
Boolean Operations NOR –OR followed by NOT –A NOR B = A+B NAND –AND followed by NOT –A NAND B = AB XOR –true if either one, but not both, is true –symbol: ‘ ⊕ ’ XNOR –true if both parameters are the same –XOR followed by NOT –symbol: ‘ ⊙ ’
Boolean Gates AND NAND NOT OR NOR XOR XNOR
Basic Truth Table ABAB ABA+B ABAB ABA+B AB AB AA AND NAND NOT OR NOR XOR XNOR
General Truth Table ABCACBF Example of step by step construction of truth table of function:
DeMorgan’s Theorem Used to split groups of large inversion ABABABA+B ABAB AB
DeMorgan’s Theorem Reflections of DeMorgan’s Theorem on logic gates NAND NOR A B A B Negative OR A B Negative AND A B
Representation of Boolean Function
Boolean Function Representation There are 3 ways of representing boolean functions that are convenient for HDL: –Truth Table –Minterm (Maxterm is less useful for HDL) –AOI (AND-OR-INVERTER) Gate Tree (OAI (OR-AND-INVERTER) Gate Tree is less popular)
Boolean Function Representation ABCF Truth Table Sum of Product (SOP)
Boolean Function Representation A B C F Sum of Product Gate Tree in FPGA ××× × ××× ××× ××× ××× × × × ×
Boolean Function Representation ABCF Truth Table Product of Sum (POS) POS is not so useful for HDL as most of FPGA (programmable logic) hardware are build with SOP structure
Simplification In introductory courses of digital electronics we spent so much on boolean function simplification Thank God! In intermediate digital electronics we don’t have to do that for FPGA programming This is due to the fact that FPGA structure is made of minterms This means we are not going to cover function simplification