Fst Boolen Alger ELEC 267 notes with the overurden removed A fst wy to lern enough to get the prel done honorly Printed; 3//5 Slide Modified; Jnury 3, 25 John Knight Digitl Circuits p. Fst Boolen Alger Fst Boolen Alger These re the lecture notes, with detils left out tht re not needed to prepre for the l. The exmple design of 2-it comprtor, is not in the lecture notes. The design of full-dder is used in the second l. Printed; 3//5 Comment on Slide Modified; Jnury 3, 25 John Knight Digitl Circuits p. 2
Two Vlued Alger The lger of nd Boolen Alger Two Vlued Alger Vlues re clled nd or True nd Flse or High nd Low. Vriles A vrile cn hve only two vlues, or. Opertions Complement, Not, or Inverse is the opposite of is if re oth. is if or oth re. -,, Exclusive is if exctly one of or is. Symol + Schemtic = 2 = - = 3+j6 = = Truth Tle Printed; 3//5 Comment Slide 2 on Slide 63 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 3 Bsic Boolen Alger Opertions Bsic Boolen Alger Opertions Printed; 3//5 Comment on Slide 2 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 4
Opertions (continued) Opertions (continued) NOT- N NOT- -N Exclusive-N, NOT-. (Equivlence) Multiple Input Opertions - mens either or, (don t cre) Symol + c c + + c c c Schemtic Truth Tle c - - - - - - c - - - Exclusive-,. c c Numer of inputs 2 3 - - - - Printed; 3//5 Slide 3 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 5 Boolen Opertions Boolen Opertions Common Mistke is not the sme s. PROBLEM Prove the ove sttement y evluting oth expressions for =, =. Multiple Input Opertions N-input Gtes In theory gte cn hve ny numer of inputs. For trnsistor circuits, the gtes ecome very slow with more thn four inputs. However theoreticl circuits will often hve more thn four inputs. With trnsistors it is esier to uild nd N thn nd. However people mke fewer mistkes if the design is done with nd. 2. PROBLEM Is + is the sme s +. If not, give counter exmple. Printed; 3//5 Comment on Slide 3 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 6
Multiple Input Opertions Lws with Zeros nd Ones Bsic Lws + = (Z) or just (Z) = (Z2) + = ( O ) = ( O 2) Indempotent A vrile is unchnged y operting with itself. + = (I) = (I2) or (I) for Doule Negtive ( ) = (N 2 ) No 2nd form Negtion Lws + = (N) = (N2) or (N) Commuttive Lws + Y = Y + (C) Y = Y (C2) or (C) Associtive Lws + (Y + Z) = ( + Y) + Z (A) (Y Z) = ( Y) Z (A2) or (A) Distriutive Lws ( + Y) Z = Z + YZ (D) Y + Z = ( + Z)(Y + Z) (D2) Rememer This or just (Z) or just Z for ny of these four Printed; 3//5 Slide 4 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 7 Bsic Lws Multiple Input Opertions Numering System for the Lws Bsic Lws In this course one frequently needs to refer to these lws, hence they hve een given numers. (Z) stnds for zero lw numer, (Z2) for zero lw numer 2. ( O ) for one lw numer, etc., where O is script letter Oh. If you do not wnt to rememer these numers, most of the lws on these pges re simple enough to just write smll exmple insted. On the next pge oth the numer nd n exmple re given. The ove lws will e tken s xioms These lws re firly ovious from the description of the gtes (opertors). The only strnge on is the second distriutive lw (D2). This one hs to e memorized ecuse it is very useful s well s strnge. We will tret ll these lws s xioms except (D2). This will e proven very shortly. Printed; 3//5 Comment on Slide 4 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 8
Bsic Lws Multiple Input Opertions Using Boolen Alger Prove: AB + B = B Simplifiction lw (S) Proof: AB +B = AB + B from ( O 2) = = ( A + )B from (D) ( + Y)Z = Z + YZ = ()B from ( O ) + = = B from ( O 2) = Prove: AB + C = (A + C)(B + C) Second distriutive lw (D2) Proof: (A +C)(B + C) = Q(B + C) let Q = (A + C) = QB + QC from (D) ( + Y)Z = Z + YZ = (A + C)B + (A + C)C since Q = (A + C) = AB + CB + AC + CC from (D) = AB + CB + AC + C from ( I ) = = AB + CB + C + AC + C from ( I ) + = = AB + C + C use (S) twice Y + = = AB + C from ( I ) Simplify: AB + AB + AB AB +AB + AB = AB + AB + AB +AB from ( I ) + = = A( B + B)+(A + A)B from (D) ( + Y)Z = Z + YZ = A() + ()B from (N) + = = A + B from ( O ) + = Printed; 3//5 Slide 5 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 9 Bsic Lws Useful Rule Useful Rule Simplifiction or Asorption Rule x + xy = x is one of the most useful rules, nd firly esy to rememer. Printed; 3//5 Comment on Slide 5 Modified; Jnury 3, 25 John Knight Digitl Circuits p.
Bsic Lws Boolen Alger: Exhustive Proofs Boolen Alger: Exhustive Proofs Good for smll numer of inputs (up to out 4) Mke tle ) List ll possile inputs ) Clculte ll vlues of the left hnd side c) Clculte ll vlues of the right hnd side d) See if they gree Alternte Proof Second distriutive lw: (A + C)(B + C) = AB + C Proof: Use truth tle nd prove for ll cses LHS RHS ABC (A + C) (B + C)(A+C)(B+C) AB AB + C The two sides re equl for ll comintions of ABC. Printed; 3//5 Slide 6 Modified; Jnury 3, 25 John Knight Digitl Circuits p. Bsic Lws Useful Rule Trying All Comintions The method is good for proofs, with not very mny vriles. It is not good for simplifiction. Exhustive Prolems 3. PROBLEM WITH S Prove tht A B = A B = Α Β 4. PROBLEM Prove tht C + BC = C + B Prove it () lgericlly nd () with truth tle. 5. PROVE A + c + ca = A + ca Consensus theorem This is hrd to prove lgericlly. 6. PROVE xa + xb = (x + A)(x +B) Swp rule This is esy to prove lgericlly fter you hve proven the consensus theorem. 7. PROVE THAT: A B = A B. Hint c = ca + ca. Printed; 3//5 Comment on Slide 6 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 2
Bsic Lws Boolen Alger: Exhustive Checking Boolen Alger: Exhustive Checking Checking An Answer You think the following simplifiction is true: (A + BC)(B + C)(B + C) = AB + C Check it out. ABC (A + BC) (B + C) (B + C) (A+BC)(A+C)(B+C) AB AB + C Not the sme With 3 inputs tle hs 8 entries With 4 inputs tle hs 6 entries With 5 inputs tle hs 32 entries With 6 inputs tle hs 64 entries With 7 inputs, lger strts to look lot esier. Printed; 3//5 Slide 7 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 3 Bsic Lws Useful Rule Circuit Prolems 8. PROBLEM: F CIRCUIT SHOWN Simplify the circuit. A A AA=A F= B 9. PROBLEM Simplify to 4 literls (letters)- AD +AE + AF. PROBLEM Implement:- ABCD + ABCE + ABCF with one multi-input nd one multi-input.. PROBLEM Simplify - (A + B)(A + C)(A + D) 2. PROBLEM Implement:- (A+B+C+D)(A+B+C+E)(A+B+C+F) with one multi-input nd one multi-input. Hint; try Prolem. first. Printed; 3//5 Comment on Slide 7 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 4
Bsic Lws Deriving Formuls From Truth Tles Deriving Formuls From Truth Tles A formuls for using, nd NOT Truth Tle ( ) Eqution for when ( ) is ( ) = + ( ) is for ll other comintions FMULA. Write out the Truth Tle 2. Look for where the result is. 3. Write down the letters corresponding to the inputs Thus in the column is written s. in the column is written s. 4. the letters to mke term like. 5. The eqution is the of ll the terms where the output is. ( ) = + Printed; 3//5 Slide 8 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 5 Bsic Lws Otining Formuls from Truth Tles Otining Formuls from Truth Tles This method will give formuls in wht is clled of s or (SUM of PRODUCTs) form. These formuls re letters or their inverses ed together nd the resulting terms ed together, like c + cd + cf + ce +... We need only find ll the terms tht mke the finl nswer. If no term mke the formul, then it defults to. To Find the Formul Go through the truth tle nd writes down ech terms tht mke the result. Then ll these terms together Tht is the desired formul. nd N gtes These re more complex to implement thn most other two-input gtes. They re often implemented using formul like the one derived ove.. SUM of PRODUCTS form hs no rcketed terms like (f + d) or the rckets implied y long inverting rs like = () Printed; 3//5 Comment on Slide 8 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 6
Bsic Lws Deriving Circuits From Truth Tles Deriving Circuits From Truth Tles The Comprtor A A B B This compres two, 2-it numers z= z= If: A A >B B z is if ny of the terms in the tle re. z = A A B B + A A B B + A A B B + A A B B + A A B B + A A B B () To simplify z, look for the terms with the most common fctors A A B B + A A B B + A A B B + A A B B = A B (A B + A B + A B + A B ) (D) = A B (A (B + B ) + A (B + B )) (D) = A B (A () + A ()) += = A B (A + A ) = = A B () += = A B (2) = Truth Tle Boolen A A B B z Formul A A B B A A B B A A B B A A B B A A B B A A B B Printed; 3//5 Slide 9 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 7 Bsic Lws Compre Compre Comprtor circuits compre numers. Here we only consider non-negtive inry numers, further the exmples re restricted to two its. The () nd (2) re eqution numers. A A Deciml vlue 2 3 3. PROBLEM ON COMPARE Design circuit which compres two 2-it numers A A nd B B. It gives out Z= if the two numers re equl. In this prolem plese do not use or N gtes. A A B B z= z= If: A =B, nd A =B Deriving Circuits From Truth Tles Recll we only need consider cses which evlute to. Boolen formuls defult to if they re not. If the output is when A, A, B, B =,,,, this gives the term A A B B together ll the terms tht give n output of, to get the complete formul. The formuls so derived will not e in reduced form. Printed; 3//5 Comment on Slide 9 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 8
Bsic Lws Deriving Circuits From Truth Tles Deriving Circuits From Truth Tles The Comprtor, reducing the eqution.) A A B B z= z= If: A A >B B z = A A B B + A A B B + A A B B + A A B B + A A B B + A A B B () Sustitute eqution (2) into () = A A B B + A B + A A B B (3) Look for term(s) hving the most common fctors with terms A A B B nd A A B B A A B B hs 3 with the st, nd gin A A B B hs 3 with the 2nd. In (3), in 2 extr copies of A A B B. z = A A B B + A B + A A B B + A A B B + A A B B ( = + ) = A B + A A B B + A A B B + A A B B + A A B B ( +Y = Y + ) = A B + A B B A + A B B A + A A B B + A B A B ( Y=Y ) = A B + A B B (A + A ) + A A B (B + B ) (D) = A B + A B B () + A A B () (+=) = A B + A B B + A A B ( =) Finl reduced nswer z = A B + A B B + A A B ) Printed; 3//5 Slide Modified; Jnury 3, 25 John Knight Digitl Circuits p. 9 Bsic Lws The Comprtor The Comprtor The finl formul is esy to understnd. Use - to men either or. The first term (A B ) sys A A > B B when A A = - nd B B = -. Tht is - > -. - is either deciml 3 or deciml 2. - is either deciml or deciml. Thus (A B ) covers 3 > or nd 2 > or. The second term (A B B ) sys A A > B B when A A = - nd B B =. In deciml 3 > nd >. Printed; 3//5 Comment on Slide Modified; Jnury 3, 25 John Knight Digitl Circuits p. 2
Bsic Lws Deriving Circuits From Truth Tles Deriving Circuits From Truth Tles (More) The Full Adder The full-dder dds 3 its A B Cy (out) Full Adder Σ (sum) Cy(in) Cy(in) Cy(out) Σ Result, Deciml 2 2 3 2 Cy(in) Cy(out) Cy Cy Cy Cy Σ Cy Cy Cy Cy Eqution for when Cy(out) is Cy(out) = Cy + Cy + Cy + Cy Cy(out) is for ll other comintions Eqution for when Σ is Σ = Cy + Cy + Cy + Cy Printed; 3//5 Slide Modified; Jnury 3, 25 John Knight Digitl Circuits p. 2 Bsic Lws The Comprtor The Adder The four results from dding two its A B Cy Hlf Adder Σ This upper circuit is clled hlf dder ecuse it dds only two its. A full dder (lower ox) cn dd three its. The third it is the crry input from previous stge. For dding one-it numers, or the first its of multiit numer, hlf dded is ll right. Otherwise full dder is needed. CY(IN) A B Full Adder Cy (out) Σ (sum). We will use for ddition here, since + ws used for. In mny plces + is used for oth, nd you hve to figure out which is which. Printed; 3//5 Comment on Slide Modified; Jnury 3, 25 John Knight Digitl Circuits p. 22
Bsic Lws Deriving Circuits From Truth Tles The Full Adder (Cont) Simplify the full dder equtionso Cy(out) = Cy + Cy + Cy + Cy = Cy + Cy + Cy + Cy + Cy+ Cy (I) x + x = x = ( + ) Cy + ( + ) Cy + (Cy+ Cy) (D) y + y = ( + )y = () Cy + ( ) Cy + () (N) x + x = = Cy + Cy + ( O) x = x = mjority gte 2 Cy(out) Cy Σ = Cy + Cy + Cy + Cy = Cy + Cy + Cy + Cy = ( + ) Cy + ( + )Cy (C) (D) x + y = y + x y + y = ( + )y Cy = ( + ) Cy + ( + )Cy (Formul for N) + = + = ( ) Cy + ( ) Cy (Formul for ) + = ( ) = ( ) Cy (Formul for ) u Cy + u Cy = (u Cy) u = ( ) Σ Printed; 3//5 Slide 2 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 23 Bsic Lws Simplifying the Full Adder Simplifying the Full Adder Crry Term This is strightforwrd Sum Term This requires eing wre of the vrious forms of nd N. A B = A B = Α Β = + = + ( ) c + ( )c = c 4. PROBLEM Strting on the second line of the simplifiction of the crry, Cy(out) = Cy + Cy + Cy + Cy + Cy+ Cy use the simplifiction rule to reduce the mount of writing to get the finl nswer. Printed; 3//5 Comment on Slide 2 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 24
Bsic Lws Deriving Circuits From Truth Tles Common Mistkes. Sying is the sme s 2. Not using AB + A =A to simplify expressions efore using more more complex rules. Also not reducing using A + AE = A + E. Simplifying nd reducing first my sve mny lines of lger. 3. Sying + = Everyody knows etter thn this, ut they still do it. Printed; 3//5 Slide 3 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 25 Bsic Lws Lrger Adders Lrger Adders The full dder only dds one-it numers. To dd multiit numers, one needs severl full dders. A 4-it dder which dds two 4-it numers is shown. 4-Bit Adder mde from four full-dders C 4 A 3 B 3 Full dder C 3 C 3 A 2 B 2 Full dder C 2 C 2 A B Full dder C C A B Full dder C Σ 3 Σ 2 Σ Σ A 3 B 3 A 2 B 2 A B A B C C 4 A 3 +B 3 +C 3 C 2 C 3 A 2 +B 2 +C 2 A +B +C C A +B +C Σ 3 Σ 2 Σ Σ Printed; 3//5 Comment on Slide 3 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 26
Bsic Lws DeMorgn s Theorems, Simple Forms DeMorgn s Theorem DeMorgn s Theorems, Simple Forms DeMorgn The 2nd DeMorgn A + B = A B (DeM) D + E = D E (DeM2) Inverse The 2nd inverse A + B = A B D E = D + E A B A B A+B AB AB D E D+E D E D E Equivlent grphicl forms: A B A B = K = A + B K A B K D E D + E = G = D E G D N E N G A B A B = C = A + B C A B C D E D + E = F = D E F D E F Printed; 3//5 Slide 4 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 27 Bsic Lws DeMorgn s Theorems DeMorgn s Theorems A theorem relting s nd Ns. An gte with inverted inputs is equivlent to n gte with n inverted output. An gte with inverted inputs is equivlent to n gte with n inverted output. Inverting inputs nd outputs of n mkes it n. Inverting inputs nd outputs of n mkes it n. EAMPLE Convert ( + )( + c) to n expression with 3 letters nd inversion rs only over single letters. ( + )( + c) = ( + ) + ( + c) (DeM) = ( ) + ( c) (DeM2) = + c (Cler rckets) = ( + c) (D) xy + xz = x(y+z) 4. PROBLEM Reduce 42. PROBLEM Reduce (+) + d(de) + (de)e to four letters with inversion rs over single letters only. to four letters with inversion rs over single letters only. Printed; 3//5 Comment on Slide 4 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 28
Bsic Lws DeMorgn s Theorems, Simple Forms Using DeMorgn s Theorem Equivlent Gte Symols N N Rel Gtes re nd N N One cnnot mke nd gtes directly. Circuit with rel gtes F c d F = () (cd) Esy to Understnd Gtes re nd Circuit with simple gtes c d F = + cd F Which one is esier for you to understnd? Printed; 3//5 Slide 5 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 29 DeMorgn s Theorem DeMorgn s Theorems DeMorgn s Theorem The two expressions for the circuit with rel gtes nd the circuit with simple gtes, re equivlent + cd = F = () (cd) Use High-True And-Or Signls for Thinking Thinking Thinking in nnd-nor logic is difficult. Just look t ny industril schemtic used extensively for mintennce. The mrgin will e full of s nd s pencilled in y users. These Notes If the logic is importnt s nd s will e used. If the gte design is importnt, s when we tlk out CMOS gtes, s nd Ns will e used. 43. PROBLEM Prove, using DeMorgn s Theroem(s), tht + cd = () (cd) Printed; 3//5 Comment on Slide 5 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 3
DeMorgn s Theorem DeMorgn Trnsfers Rel Gtes Into DeMorgn Trnsfers Rel Gtes Into Simple Gtes Circuit with rel gtes F c d F = () (cd) Use DeMorgn s gte symol t output Inverting circles cncel ech other Circuit with simple gtes c d F = + cd F Circuits ment for understnding the logic use s nd s. - Drw your circuits with s nd s. Circuits for construction re drwn with s nd Ns. - L circuits to e wired re drwn with s nd Ns Drw construction digrms y: - trnsforming the understndle circuit into the rel circuit - using the DeMorgn lternte symols. Thus Compromise drwings hve S nd Ns with the circles re rrnged to cncel ech other. lternte symol Printed; 3//5 Slide 6 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 3 DeMorgn s Theorem Trnsforming -N Digrms into Trnsforming -N Digrms into - Digrms Digrms in this course will e drwn with s nd s s much s possile. Digrms for construction or mintinnce, tht wnt to show exctly wht gtes were used, will e drwn with s nd Ns. This is prticulrly true of older digrms. A compromise method, which is lmost s esy to follow, ut shows the rel gtes s used, is to mke lternte gtes with the lternte symols, the ones with the inverting circles on the inputs. N NOTE: One output circle cncels ll the input circles it feeds. 44. PROBLEM Trnsform this circuit into simple gtes. ) Printed; 3//5 Comment on Slide 6 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 32
DeMorgn s Theorem DeMorgn Trnsfers Rel Gtes Into Printed; 3//5 Slide 7 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 33 DeMorgn s Theorem Trnsforming -N Digrms into Printed; 3//5 Comment on Slide 7 Modified; Jnury 3, 25 John Knight Digitl Circuits p. 34