Boolean Algebra is !e "a!e"ai#al a$$roa#! %or &igial logi#' T!e %ollo(ing is !e basi# o$eraions) la(s an& r*le !a a$$lie& in simplifying the Boolean expression(s)' AND OPERATION OR OPERATION A'+ , + A + + , A A'- , A A + - , - A A ' , A A A + , A A A ' , + A A + , - COMMUTATIVE LAW ASSOCIATIVE LAW A . B, B . A A / B C0 , /A B0 C A ' B , B ' A A . / B . C0 , / A . B0 . C DISTRIBUTIVE LAW ABSORPTION RULES A / B . C0 , AB . AC A . AB , A A . / B C 0 , /A . B0 /A . C0 A / A . B0 , A A AB + , A . B EXAMPLES -' Si"$li%1 !e Boolean e2$ression 3 , AB4 AB4 + 3 , AB4 AB4 + - , AB 4 4 / 0 + , AB'- , AB 2' Si"$li%1 F , ABC4 ABC4 ABC4 ABC4 + + + 4igial Ele#roni#s 5 BE4-2-+6 - UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION F , ABC4 ABC4 ABC4 ABC4 + + + , BC4 A A BC4 A A / 0 / 0 + + + , BC4 BC4 + , BC 4 4 / 0 + , BC * Purpose of s!p"f#$%o& $re %o re'u#e %(e #os%) *u'+e% .e !&!,e %(e &u!*er of +$%es use'- $&' %o s!p"f. %(e #o&s%ru#%o& of %(e #r#u%s. Fig*re:- 7 Be%ore Si"$li%i#aion Fig*re:2 7 A%er Si"$li%i#aion E/er#se0 Si"$li%1 !e %ollo(ing e2$ression: -' 8 , 0 / 0 / B A B B A AB + + + 2' F , 9:8 9:8 + 6' F , ABC ABC AC4 AC4 + + + 1.0 De MORGAN2S T3EOREMS 4igial Ele#roni#s 5 BE4-2-+6 2 UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION 4e Morgan;s T!eore" is ano!er !eore" !a #an be a$$lie& o !e Boolean e2$ression in or&er o si"$li%1 !e e2$ression' T!e a&<anage %or !is !eore" is o i"$le"en !e *ni<ersal logi# gaes /NAN4 or NOR gaes0 in logi# &esign= #ir#*i/s0' 4e Morgan;s T!eore" #onsiss o% : 1. B A B A ' = + #an be &e%ine& as !e #o"$le"en o% a s*" e>*als o !e $ro&*# o% !eir #o"$le"ens' 1. A B A B ' = + #a" be &e%ine& as !e #o"$le"en o% a $ro&*# e>*als o !e s*" o% !eir #o"$le"ens' To i"$le"en or a$$l1 !e 4e Morgan;s T!eore" !e ?e1 (or& o re"e"ber is: * 4Bre$5 %(e *$r- #($&+e %(e s+&6 Proo% b1 Tr*!able A B A B + A B A. B + + - - - - + - + - + + - + + + - + - - + + + + E@UAL Proo% b1 Tr*!able A B A B ' = + A B A B ' A B A B + + + - - - - + - - - + - - + - + - - - - + + + + A$$li#aion 4igial Ele#roni#s 5 BE4-2-+6 6 UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION E@UAL TO Fro" !e abo<e) (e #an see !a !ere are (o (a1s o% re$resening a logi#al %*n#ion) (!i#! one is *se& &e$en&s on (!i#! one is !e $#%7e o*$* sae' E8ERCISE : -'4e"organise F , ( )( ) ( ) D B C A + + 2' Si"$li%1 !e Boolean e2$ression A , ( ) Q T S R + 8.0 UNIVERSALIT9 O: NAND GATES AND NOR GATES 4igial Ele#roni#s 5 BE4-2-+6 B B A Y + = B A Y ' = AB Y = B A Y + = E@UAL TO UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION I is $ossible o i"$le"en an1 logi# e2$ression *sing onl1 NAN4 gaes or NOR gaes an& no o!er 1$e o% gae' E/$!p"e0 4igial Ele#roni#s 5 BE4-2-+6 C UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION 4ra( !e logi# #ir#*i !a sais%ies !e e2$ression F= AB + CD . Redraw the circit *sing onl1 NAN4 gaes' ;.0 STANDARD :ORM. 4igial Ele#roni#s 5 BE4-2-+6 D A B C 4 A B C 4 A B C 4 UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION ;.1 SUM O: PRODUCT :ORM T!e "e!o&s o% logi# #ir#*i si"$li%i#aion an& &esign re>*ire !e logi# e2$ression o be in a S*" o% Pro&*# %or") /SOP0' So"e e2a"$les o% !is %or" are: -0 C B A ABC + 20 D D C C B A AB + + + i'e (!en (o or "ore $ro&*# er"s are s*""e& b1 Boolean a&&iion' !ote" #n $m of %rodct expression& an in'ersion sign cannot appear o'er more than one 'aria(le.eg. ABC . ;.1 T(e S%$&'$r' Su! of Pro'u#% 4SOP6 :or! Gi<en) !e e2$ression D C B A D B A C B A Y + + = !as a &o"ain "a&e *$ o% !e <ariables A) B) C) an& 4' Eo(e<er) 4 or D is "issing %ro" !e %irs er" an& C or C is "issing %ro" !e se#on& er"' A san&ar& SOP e2$ression is one in (!i#! all the 'aria(les in the domain appear in each prodct term in !e e2$ression' San&ar& SOP e2$ressions are i"$oran in #onsr*#ing r*! able an& in !e Karna*g! "a$ si"$li%i#aion ;.1.1 Co&7er%&+ pro'u#% Ter!s %o s%$&'$r' SOP F*sing Boolean r*le / - = + A A 0G S%ep 1 M*li$l1 ea#! non7san&ar& $ro&*# er" b1 a er" "a&e *$ o% s*" o% "issing <ariable an& is #o"$le"en' S%ep 1 Re$ea Se$ - *nil all res*ling $ro&*# er"s #onain all <ariables in !e &o"ain' E/$!p"es0 Con<er !e %ollo(ing Boolean e2$ression ino san&ar& SOP %or": -' M , X Y X + 2' D C B A B A C B A Y + + = ;.1.1 B&$r. Represe&%$%o& of $ S%$&'$r' Pro'u#% Ter! A san&ar& $ro&*# er" is e)al to * %or onl1 one #o"binaion o% <ariable <al*es' 4igial Ele#roni#s 5 BE4-2-+6 H UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION E2a"$le) !e $ro&*# er" D C B A is e>*al o - (!en A , +) B,-) C,+ an& 4, -' i'e D C B A , - - ' + ' - ' + = ;.8 T(e Pro'u#% of Su!s 4POS6 :or! :!en (o or "ore s*" er"s are "*li$lie&) !e e2$ression is a $ro&*# o% s*"' E2a"$les: ( )( ) C B A B A + + + ( ) ( )( ) C B A C A B A + + + + ( )( ) D C B B A A + + + Noe: a single o<erbar #onno e2en& o<er "ore !an one <ariable' ;.8.1 T(e S%$&'$r' POS :or! A san&ar& POS e2$ression is one in (!i#! all !e <ariables in !e &o"ain a$$ear in ea#! s*" er" in !e e2$ression' ;.8.1 Co&7er%&+ $ Su! Ter! %o S%$&'$r' POS <us&+ Boo"e$& ru"e + ' = A A = S%ep 1 A&& o ea#! non san&ar& $ro&*# er" a er" "a&e *$ o% !e $ro&*# o% !e "issing <ariable an& is #o"$le"en' S%ep 1 A$$l1 4isrib*i<e La( ( ) ( ) C A B A BC A + + = + S%ep 8 Re$ea se$ - & 2 *nil all res*ling s*" er"s #onain all <ariables in !e &o"ain' E2a"$le: Con<er !e %ollo(ing Boolean e2$ression ino san&ar& POS %or"' ( )( )( ) D C B A D C B C B A + + + + + + + 4igial Ele#roni#s 5 BE4-2-+6 I UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION ;.8.8 B&$r. Represe&%$%o& of $ S%$&'$r' Su! Ter! A San&ar& S*" Ter" is e)al to + %or onl1 one #o"binaion o% <ariable <al*es' E2a"$le) !e s*" er" D C B A + + + is + (!en A,+) B,-) C, + an& 4 ,- i'e D C B A + + + , - + - + + + + , +' ;.; Co&7er%&+ S%$&'$r' SOP %o S%$&'$r' POS T!e %ollo(ing se$s are a?en: S%ep 1 E<al*ae ea#! $ro&*# er" in !e SOP e2$ression' S%ep 1 4eer"ine all !e $ro&*# er"s) (!i#! are no in#l*&e& in !e e<al*aion in Se$ - S%ep 8 :rie !e e>*i<alen s*" er" %or ea#! binar1 n*"ber %ro" Se$ 2 an& e2$ress in POS %or"' E/$!p"e0 Con<er !e %ollo(ing SOP e2$ression o an e>*i<alen POS e2$ression ABC C B A BC A C B A C B A + + + + So"u%o&0 Se$ -: T!e e<al*aion is as %ollo(s: +++ . +-+ . +-- .-+- . --- Se$ 2: Sin#e !ere are !ree /60 in$*s <ariables) !*s !ere are oal eig! /I0 $ossible in$*s #o"binaions' Sin#e SOP e2$ression #onains %i<e /C0 o% !ese #o"binaions) so POS "*s #onain !e o!er !ree /60 (!i#! are ++-) -++ an& --+' Se$ 6: T!e e>*i<alen POS e2$ression is ( )( )( ) C B A C B A C B A + + + + + + Re7e> ?ues%o&s0 -' I&eni%1 ea#! o% !e %ollo(ing e2$ression as SOP) san&ar& SOP) POS or san&ar& POS' a0' D C A BD A AB + + b0' ( )( ) C B A C B A + + + + 4igial Ele#roni#s 5 BE4-2-+6 J UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION #0' C AB BC A + &0' ( )( ) B A C A A + + 2' Con<er ea#! SOP e2$ression in @*esion - o san&ar& %or"' 6' Con<er ea#! POS e2$ression in @*esion - o san&ar& %or"' ;.@ Co&7er%&+ SOP E/presso& %o Tru%( T$*"e :or!$% S%ep 10 Consr*# a r*! able (i! all $ossible in$* #o"binaions' S%ep 10 Con<er !e SOP e2$ression o is san&ar& %or"' S%ep 80 Pla#e - in !e o*$* #ol*"n %or ea#! binar1 <al*e !a "a?es !e san&ar& POS e2$ression an& $la#e + %or all !e re"aining binar1 <al*es' E/$!p"e0 4e<elo$ a r*! able %or !e %ollo(ing san&ar& SOP e2$ression ABC C B A C B A + + So"u%o&0 In$*s O*$* Pro&*# Ter" A B C 3 + + + + + + - - C B A + - + + + - - + - + + - C B A - + - + - - + + - - - - ABC ;.A Co&7er%&+ POS E/presso& %o Tru%( T$*"e :or!$% S%ep 10 Consr*# a r*! able (i! all $ossible in$* #o"binaions' S%ep 10 Con<er !e POS e2$ression o is san&ar& %or"' S%ep 80 Pla#e + in !e o*$* #ol*"n %or ea#! binar1 <al*e !a "a?es !e san&ar& POS e2$ression an& - %or all !e re"aining binar1 <al*es' 4igial Ele#roni#s 5 BE4-2-+6 -+ UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION E/$!p"e0 4eer"ine !e r*! able %or !e %ollo(ing san&ar& POS e2$ression ( ) ( )( )( )( ) C B A C B A C B A C B A C B A + + + + + + + + + + So"u%o&0 T!e binar1 <al*es !a "a?e !e s*" er"s in !e e2$ression e>*al o + are ( ) C B A + + , +++ ( ) C B A + + , +-+ ( ) C B A + + , +-- ( ) C B A + + , -+- ( ) C B A + + , --+ For ea#! o% !ese binar1 <al*es) $la#e a + in !e o*$* #ol*"n' For ea#! o% !e re"aining binar1 #o"binaion) $la#e a - in !e o*$* #ol*"n' In$*s O*$* S*" Ter" A B C 3 + + + + ( ) C B A + + + + - - + - + + ( ) C B A + + + - - + ( ) C B A + + - + + - - + - + ( ) C B A + + - - + + ( ) C B A + + - - - - @.0 BARNAUG3 MAP MET3ODS T!e Karna*g! "a$ /K "a$0 is a gra$!i#al "e!o& *se& o si"$li%1 a logi# e2$ression=e>*aion' Eo(e<er li"ie& o si2 <ariables' @.1 VARIABLE T!e K "a$ %or T:O) TEREE an& FOUR <ariables are gi<en belo(' a0 T:O <ariable' b0 TEREE <ariable' AKB + - 4igial Ele#roni#s 5 BE4-2-+6 ABKC + - ++ +- -- -+ -- UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION + - #0 FOUR <ariable' ABKC4 ++ +- -- -+ ++ +- -- -+ @.1 LOOPING T!e e2$ression %or o*$* #an be si"$li%ie& b1 $ro$erl1 #o"bining !ose s>*ares in !e K "a$ (!i#! #onain -s' T!e $ro#ess %or #o"bining !ese -s is #alle& loo$ing' Loo$ing #an be "a&e %or an1 <eri#all1 or !oriLonall1 a&Ma#en -s' To$ ro( an& boo" ro( are #onsi&ere& a&Ma#en o ea#! o!er' T!e le%"os #ol*"n an& rig!"os #ol*"n o% s>*ares are #onsi&ere& o be a&Ma#en also' Loo$ing Gro*$: o o% T(o /Pairs0 o o% Fo*r /@*a&s0 o o% Eig! /o#es0 o o% ALL o o% One /Single0 O<erla$$ing Gro*$ 5 (!en !e -s are in !e #ir#le gro*$) i is allo(e& o *se !e sa"e - "ore !an on#e' @.8 DON2T CARE CONDITION So"ei"es) i &oesnN "aer (!a !e o*$* is %or a gi<en in$*' To in&i#ae !is) !e leer X is *se in !e r*! able insea& o% a + or a -' T!e 8s are #alle& &onN #are be#a*se !e1 #an be reae& ei!er as a +s or -s) (!i#! e<er lea&s o a si"$ler #ir#*i' @.1 B$r&$u+( M$p SOP M&!,$%o& @.1.1 M$pp&+ $ S%$&'$r' SOP E/presso& For a SOP e2$ression in san&ar& %or") a - is $la#e& on !e Karna*g! "a$ %or ea#! PRO4UCT er" in !e e2$ression' T!e %ollo(ing se$s s!o( !e "a$$ing $ro#ess' S%ep 1 4igial Ele#roni#s 5 BE4-2-+6 -2 UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION 4eer"ine !e binar1 <al*e o% ea#! PRO4UCT er" in !e san&ar& SOP e2$ression' S%ep 1 As ea#! PRO4UCT er" is e<al*ae&) $la#e a - on !e Karna*g! "a$ in !e #orres$on&ing #ell' :!en (or?ing (i! SOP e2$ressions) !e +s are le% o%%' E/$!p"e o% "a$$ing a san&ar& SOP e2$ression X VW X W V + +++ . --+ 9:K8 + - ++ + + +- + + -- - + -+ - + @.1.1 B$r&$u+( M$p S!p"f#$%o& of SOP E/presso& E/$!p"e0 Use Karna*g! "a$ o "ini"iLe !e %ollo(ing san&ar& SOP e2$ression' 3 , X VW X W V + 9:=8 + - ++ + + +- + + -- - + -+ - + @.8 B$r&$u+( M$p POS M&!,$%o& @.8.1 M$pp&+ $ S%$&'$r' POS E/presso& For a POS e2$ression in san&ar& %or") a + is $la#e& on !e Karna*g! "a$ %or ea#! SUM er" in !e e2$ression' T!e %ollo(ing se$s s!o( !e "a$$ing $ro#ess' S%ep 1 4igial Ele#roni#s 5 BE4-2-+6 -6 X V X V Y = UniKl BMI TOPIC 2: BOOLEAN ALGEBRA & LOGIC SIMPLIFICATION 4eer"ine !e binar1 <al*e o% ea#! SUM er" in !e san&ar& POS e2$ression' S%ep 1 As ea#! SUM er" is e<al*ae&) $la#e a + on !e Karna*g! "a$ in !e #orres$on&ing #ell' :!en (or?ing (i! POS e2$ressions) !e -s are le% o%%' E/$!p"e o% "a$$ing a san&ar& POS e2$ression ( ) ( )( )( )( ) C B A C B A C B A C B A C B A + + + + + + + + + + +++ +-+ +-- -+- --+ ABKC + - ++ + - +- + + -- + - -+ - + - - @.8.1 B$r&$u+( M$p S!p"f#$%o& of POS E/presso& T!e r*les %or gro*$ing !e +s are !e sa"e as !ose %or gro*$ing !e -s' E/$!p"e0 Use Karna*g! "a$ o "ini"iLe !e %ollo(ing san&ar& POS e2$ression' 3 , ( ) ( )( )( )( ) C B A C B A C B A C B A C B A + + + + + + + + + + +++ ++- +-+ +-- --+ ABKC + - ++ + + +- + + -- + -+ 4igial Ele#roni#s 5 BE4-2-+6 -B A C B + ( ) C B A Y + =