0% found this document useful (0 votes)
73 views

FC Lesson 1 Basics of Logic Design

Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
73 views

FC Lesson 1 Basics of Logic Design

Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 42
1 Som Dip. Fundamentals of Compauers (CS) Chapter 1 Basics of Logic Design Tnsadicio wo Newb Sac 1111 Bimy Nanber Sytem 1.12 Oval Number Sytem 1.13 Dasinal Nombe Sem 114 Hess Devil Number System Conversion from One ~ Nunber Sse 1 Ober 1.2.1 Binary -t- Dena Conesion 122 Davina ~o- Binary Conversion 1.23 Ocal ~10- Desimal Conversion 124 Daximal~o- Ocal Caneson 1.25 Ocal ~~ Bary Coneson 12.6 Bimry-10- Octal Comession 1.27 Desinal“o- Hes Dein Coovesion 1.28 Hexa Desinal ~~ Dein Conersion 129 Hens Deimal to Bay Conversion 12.10 Binary 1 Heta Decimal Conversion Complements of Nunber Sysens an Artec Opirions 1311's Complemen 1322's Conplemen WW 13 Basies of Logic Design : 2 Binary Subtraction ig a 25 Cope VAT Complement Sobiactn 142.7% Comlanee Sehetin 143 Bay Aine Opens 1S. Campa Cos 131 BoD \sa encore 153 ASC Cae | | 134m owe | 135 Ens} Cae 136 Unde | 1.6 Logic Gates | 161 The OR Gae 1.62 The AND Gute | 163 The NOT ae | 64 The NAND Ge M65 The NOR Gue 1.6.6 The Exclusive ~ OR (EX-OR/XOR) Gate 1.6.7 The Exclusive ~ NOR Gate (KNOR) Gate 1.7 Boolean Algebra 1.7.1 Laws of Boolean Algebra 1.7.2 ales of Boolean Algebra 1.7.3 De Morgan's Theorems 1.74 Boolean Expressions - SOP and POS 1.75 Simplification of Boolean Expressions @ Review Questions 1.1 Introduction to Number System "Number Systems suggest basic tymbols as individual digits of specific number system. It also defines range of limit for that ‘number system and individual weights or values assigned to each specific digit or symbol of each number 1 Sem. Dip Fundomensals of Compuiers (CS) "8 Number system in all define different number systems such as >+Hexa-decimal and it also define number of different “digit symbols” [calles “Base” or “Radix” of that particular number system] in each ‘of the number system listed as above. 3% ror example > Binary Number System define only (wo digit symbols called binary digits (bits) ~ Oana 1 ‘& Similarly, Decimal Number System define 10 digit symbols called decimal numbers or decimal digits Viz AWverTo conclude - as umber system is fundamental to day-to-day Business Mathematics such counting, Bank Balance in Rupees, ‘Account, Cash in Hand, Number of days of Leave applied etc. Similarly, Binary Number System is fundamental and an essen- tial component for the study of working of a digital computer systems. Since Digital computers operate using Binary Digital Number system principles. 1.1.1 Binary Number System refers (0 a number system with its two digits “O™ and ‘Therefore it is 4 base -2 system. Thus Base or Radix of Binary Number System is 2. The two binary digits (bits) are a ‘oand al asics of Lowee Dosen 4 Examples of Binary Numbers © 101. 1010. 1110, gy Tse ina es Woy Binary Weights Values» 236 13864 $ For example + Consider a binary number 1001 The weights or values of each of the binary digits ae DP pal 25, 34. from right-to-left assignment (€-) one Fares Lrooo$ be? 40x27 4082! +142" 1x8 +0x4 +002 B+0+0+1 9s the devimal equivalent of binary number 100: #P Thar 1s the decimal equivalent of binary number 1001 4s © Consider a binary number 1010 ‘Weight or positional values of each digit is ixt Tova 10 is the decimal equivalent of (1010), Using 5421 code one can express any binary umber unis of weigies (mmmticns) as Tao's, fours. caies. soueen's, dump-rmo's-postional seigiss = beary 62 For example te binary mabe TIOT bas © One mere example of binary somber anh 6 bes 6 8 4 mo 1 10010 = R+6-0+0-2-6 = cece eprcicn of 10010; & 10 coaciate oo Binary Number Syemt Exch dige postice in 2 Bisary Number bas 2 weight 16 postional values lke 1's. 2's. #5. 8s, 16's. from ngteelet Le, frome Leas Sigrcficare Bz (LSB) 2 Most Sursfcare Bt oMSB) = For example consider 2 binary mumber (10101), Positional aetghas wn 6% 4 7 LSB ayy yy yy 10101 Left eo Rist In given Binary Number - the LSB-ieas signifcam dign bt the on the right mos) tas 2 buary seghe of 1. The second ign trom LSB (trom nigix mos) has 2 weight of 2. The curd Gigs from LSB has a weight of 4 and the acu & 16, 32. 64 like sie-the weighs are ip ascending order powers of 2 hat 2 Benary Number is ther number systems " 6 the decimal equivalent of # Binary number say torn = HP 2002 rer! 2 116+ 168-0041 2eted = 16+8+0-265 " Therefore 27 is the decimal equivalent value of 11011 1.1.2 Octal Number System ‘The octal number system consist of 8 basic. symbolsidigts Hence the base or radix of octal number system ts 8 The & basic dugas are 0.1.23. 4. $. 6-7 An octal umber i writen with 2 subscript § to distinguish it from decimal | "For example ($4), (62), 102),, (18),. (40), octal aumbers ‘= In octal number system each digit position has weight or positional value interms of powers. of eight 35 8°. 8). 62 9,4, 8° exc. assigned from right most digit (LSB) to leh most digh (MSB) respectively. In other words, positional octal weights could be determined is follow Ocal Weighs > 8 Values aes of Le se 1 vrs power of #40 determing Thar ctl ube CT dts 0 4 Ben Teanat wes oF FOPE a Ms# 8 8! 8 1g ‘ o 7 ce The dina equivalent oF 102. 102 = 1x82 + 08! + Du @? 1x64 + 0X8 + 2x1 oe 8+ 2= 7 0 Consider another octal number | (62)s Weights: <8 8 6 2 ‘The decimal equivalent of (62) = 62 = 6x8! + 2x8" = 6x842x1 = 4842 (3 cal number 175 Weights: <- 8 <8! a 84. ‘The decimal equivalent (175, = 17S MsB Lsa. 175 = 1x8? + 7x8! + sx ‘& One more example 1x64 + 7x8 + 5x1 = 61+ 364s = 25} 1 Sem Dip. Fundamentals of Ce ws C3 1.1.3 Decimal Number § stem The decimal number system consists oft Hence the base or radix of Decimal Number v® The 10 basic digits or symbols are ®N2KS 6789 ve A decimal number is writen with a subset 1 from other number system. 0 basic symbolsdigits system is 10, 10 to distinguish, Also, decimal number system is called a Base 10 system “e One can express any decimal integer or decimal number (whole umbers) in units, tens, hundreds, thousands and so on. 38 per Positional weights or positional values from right (LSB) to let (MSB) “or example consider a decimal number 28 2x10! + gx10° — The digi @ tas a aslo + x1 weight of 1 +8 = 2B), ve Consider a decimal number 2956 ‘When decimal weights are assigned 2956 becomes. The digit has weight of 10 Weighs © <10°<-10<-10!<-10%< m= 2 9 5 6 t MSB (eft) LSB (right) 2x10) + 9x10? + S10! + 6x10" 21000 + 9100 + $x10 + 6x1 4 4 4 4 bowsinds hundreds tens mts 2000 + 900 + 50+ 6 2956), Bastes of Laie Design w To conta he sale of» dg i determine by as ption We. positional weight) in the umber and hasan aig eight ie, in decimal powers «10° 10.10", 10°. aml so on oy Fe. | 10" 10 108 10" 102 10! 10° ‘Similarly, for fractional mumbers. ~ the decimal weights are hegative powers of ten (10) that will decrease from tet of decimal” poim towards ht and it begins with 10°, Symbolically it is shown as Deximal point ¥ 4 2 8 3.6 2 5 10" 10% 10" 10" 101 108 Los, . ‘© Thus Value ofa decimal number isthe sum of digs ater each Aigit has been multiplied by" as corresponding weight Consider a decimal number with fraction 243.58 = 210° 4x10's 3010+ S104 sso? = 2x100 + 4x10 + 3x14 SKONS Bx0-01 = 200+40+3+0-5+0-08 = 243-58) 1.14 Hexa Decimal Number ystem eis a base -16 number system. It uses 16 different digits oF symbols, It consist of 0-9 digits and A-F letters. ‘That is hea devimal number system composed of 16 numeric and alphabetic characters. The fase of radi of Hexadecinal number system is 16 1 Sem Dip, Fundamentals of Computers (CS! ‘& The 16- different symbolsidigns ane G12 3456.7, 898,B.0, DEF ‘© The weights or positional values of each of the hexadecimal numbers are 16", 164, 16%, 16°, 164, 16° assignment (<-) The weighted values for each postion can be determined 3s powers of 16 as shown below from right (LSB) to left (MSB) 16 | 168 Hexadecimal Weights » 16 | 16! oy i > 086286 IT ‘That i, hexadecimal number system powers of 16 to determine the positional weights of respective hex digits in a. given hexadecimal number ; ro eum oer es di! be AP 16 <= 16 < 16° AE = 1x16? + Axl6! + Fx16? = 1256 + Ax16 + Fxl = 256 + 10x16 + 15 256 + 160 + 15 30 = 431 is the decimal equivalent of (IAF), £8 The following table illustrate the binary~ decimal and hexadeci smal equivalent numbers, Aves of Lace DE 4 fecal digit 1S represe Here each hens ds 1 ees Pease 0 lent nuribet spbit binary & quival vx decal Tue STE SHS eg pact 89 1.2 Conversion from One Number Systems to Other 1.241 Binary-to-Decimal Conversion ‘To convert a given Binary number (0 its decimal equivalen ‘alue-perform the addition of weights of all binary bits whos valve is a 1 and discard the weights of all binary bits whos value is 2 0 AA. convert (IOLIOL), = (hp ue. convert the given binary number 101101 t0 decimal Binary weighs > 2° 2" 2) > Binary umber 1 0 1 iT +048+4r0% 4s Therefore 48 is the decimal eguvaleat valve of the given Binary number 10110 te. ontoL B. Convert (OL 110), {e- comen the given binary umber LOL HOE wo devimat Please note that Binary traction with UIDL Binury weighs -e MoE YY? a Binary Number» 1 10 11 1 tod D2 1x2 4002 Hts Leer sosrdetszt INL FINS SONS FIN INT HINO 3+ 1X0-25+ 000-125 +10: 0025, 1er8+0) 278128 9 Therefore 27. 8129 is the decimal equivalent value of the ssiven binary number CIOL. L101 140-5+0.25+0+0-0025 cuioit 1101 ~ Comert the binary (010100; 1 hy raion umber O.101L ce decimal Binary weights > Binary number OO 1 0 1 Ot 0 ogee 84 Therefore O-6NECS is te evi oQUINALENE Naar OF Be give Drmary acta nunder 01010) 1 wre (Ootets 1.2.2 Decimal or comerting 4 given Gevumal eumber Wan equivalent Banas nutter the filowing ettes san be used 1 Sum of seigbes anerboxt 2 Repeated Division byt metbod 8 Repeated Multiptcation -by-T wetboat or someting decural trast «6 Dinars ounier 1. Sum of weights method Here i his meet set OF BABY weigOe Valdes are Sewer hose sum equal a oe she decimal gender to Baary Comvenson For example Fil Bunaiy ayuivalene under of 8 Binary wergdes guvalowe Binary Number = 10010 root Gn, Sawn, Se Theretone LOOLOL 6 che uy Eguialeat of Seventh suenter 15 1 Sem Dip Fundamentals of Compuers (CS) 2. Repeated Division ~ by-2 Method Here in this method-the given decimal number to be converted 10 Binary is repeatedly divided by 2 wnt the quotient 1s 0 That is subsequently divide each resulting quotient by 2 until quotient results 10 a 0 whole number : > The remainders generated by each division form the equivalent Binary number The first remainder beig produced isthe least Significant bit (LSB) in the Binary number and the last remainder being generated is the most significant bit (MSB) "#To conclude reading the remainders from bottomt0-top in the Fepeated division method give rise to an equivalent binary number: +7 This procedure is shown as below to convert the decimal hhumber 45 10 ts equivalent binary number A. convert (45), => ( 2/43 Pew Seems afar 4 7 afin Msn us I | =p Mois olf (45)jq => (O1101), B. Comven (43), Step 1: First convert the whole number 27 into Binary by Repeated Division -by-2 method 27-819 > Os ai 2/131 Ese | 2/3 +0 rar 2 10rd MsB (sole umber part) | ac Devs \ py-2 method imal fraction {0 binary fecal ‘ 0.8125. ynverted to, sonal part 18 60! bina vow an 2 BOS as fo ere gs| “=| Consider the number tefl of decimal pong 25 | | subsequently multiply gy .§ | resulting. fraction by y 0 | uni fraction becomes g ier from op down £0 the If of eng 3 Now reading TY fraction ie. 0.1101. Now the gy ape rn cena 7 > (1101-1101), (e7.8125.0 whole number part — fraction par vanal fasion 0.65625 into Us eqtalen bray te (0.65625)y =? ( )s se Repeated multiplication by 2 method to © Comer dec see act ino Binary eumber equivalent toe (ls separa sey? v Now reading the resulting product from top-down to the let of decimal point give rise (0 binary traction i.e., 10101 (ie. (65625), > © 0.10101), Fem 1 Pata of omgaes 9) | | n octal umber vo decimal cuter the decirat | equivalent of an oat umber 4 ws be fou by alapsying each gt | ty a wei an at successive digit penton i right raat digit (USD) Te column fas a weight of ng the products In a given octal numer each Increasing power of Light starting goticane at he eight For example A Conver octal rmber (26), 2 (4,406 deci equivalent Weights 8a whee He Octal number 2 4h DAR AR Ged = 264s 3 -K 641 12k 2466 = 158 Therelore 236), 22 (15, Conver ortal mumber(63.25), 24 hy, to ts decimal equivalent Weighs 8! 8 gt at Qeul number 6 3. 2S ’ Octal point Gol SBR Dek Su = GBs 3414 220-1254 50-015625 48 +3+0.25 +0.078125 St 32E125 Haus of fonts Deen ™ 124 Declnal tw Octal Conversion Hs eoavert a given Lei Secanut i repeated ive hy uber to an cctal mumier the He subsequent rerrainders give ive te digs of vctal mater systems The frst remainder ence se ESD (Least Significant Dit The tesulling octal faunier 6 eed eis bat uceated racine ute fo the Hust generated retainer oo. A. Convers the devinal mune (Q9B),,2 °C 0 an octal number ‘equivalene 19K Remalnders Hi 6 180 2 l Msi = 236 oe theelte [Shy 180, ie, 246 18 the equivalent octal number of the given decimal umber 198 1 Conver the decimal munber (S128) 22 (>, #[ 31 bo} ut 0328125 0.025 + & 2.625 | Converting fracions by 5. 0-y Repeated multiplication by & 02s ee therefore [(51,326125 (63:25), 9 Sem Dip. Bindamentals of Commrers (C3) A.2S Octal-to-Binary Conversi es convenient 9 represent each oetal digi by a Jbit binary umber Therefore tw convert an etal umber-to-a binary fsumber-sinply replace each octal digit by am equivalent 3-bit binary number. #8 The following table depict octal digits and their binary equiva- vents Octal Digits _ Binary Numbers| 1 ool 2 10 3 ou 4 100 5 101 6 10. 7 mt 16 Ocral-Binary Comersion & For example 4. Convert octal number (147), 10 ( Jz. Binary Number, wel 407 yo YY = ot (147), => (OOLOOLTD, Js the equivalent binary number B. Convert (M25), 10 ( Jy Binary Number. 3425 4205 yr 00 010" 101 1s tho equivalem binary: number au comers GEIS OE” m ros Cea ey LE to-Octal Conversion yur 30 a al MUN ay from right-most BF0UP OF 9-918. Mae rom ght-to-let and SUbStTAE cage Mts group. HC the IAS BFOUp do gy mmplte the 2f0up TRE resuag to an octal Muthber from, 1.2.6 Binary To comer ven ti roups of 3 -bits each sari og of ns vig Da For eae A. Convert binary number (( conn or100111g (yma oo, 100 1H Pia en [TOD = AT | 6 the eval ea ombe 1B. Conver binary number (Q1LIOQO10101). £0 ( )g octal number ousiopo10101 =» O11 100, 010 101 YY -3 4 “Theeore 011100070100, => CHO) isthe equratent oul be. rd Hones we Meretnd ist " tomers es mer 4 wos tit tegeaet, tories Pte: Nenad hea torn ae whats yada ae yearns rata 8 Vie remaiater 14 fa tevien tn ros seats SAE 101 0 The preentiate canis se Segal Marion tye cmveriag pies tent mts oat, Aba nese ue wis pent tas frustrate ae os makes itn han Ua ie 0 tetas ‘ae uke Yr fn enattpe A Conver tet nis ractoer hy, 3 0 ' teralcens mtbr aS < ears wen SDM Mens Drenalin Core iom aioe rah Speak ene 6) Sak apsraen sncchns Uasgy; ead ‘ae nose Cogs ye enienpnfing weeps ah et take ee wi Se Ses eRe we tse te wry Ae Nenask ties ae © seseastg, owes tA tem “ab vary 6 Dy Hurdumertats of Compuers (CS) Yo OF exaingple 4 Convert the hewa Alec mambo MPD g 4 muimber equiv: " UW Lola to 1 ¢ ue 1 Isto ixtely Bate! 12560 116 8 Bed 2864 Id 286 Therefore umber ATE 8 2861, As the equivalent decimal & Convert the hevadecimal number (EA2 > ( Dy decimal tmomber equivalent 164 16 16'< 16° WAD= 9 FA? 9x10 4 PXIG 4 Axio 2x16" 94096 + P2564 AXIG + 2x1 © 3OBOI 115% 256-4 1016 4 2 = 3OR61 + 3840 + 160 + 2 40866, Therefore (GEA2), * > 40866), the equivalent decimal ‘eumber 1.2.9 Hexa Decimal-to-Binary Conversion The bera decimal numbers consist of digits 0.9 and fetter F Thus each hexadecimal digit can be represented usi number (S421 code). The following table illustrate Decimal -Hexa decimal -Binary Fquivalen aus of Lage Des . decimal number (0-15 gy in hexadecimal digit by iy te. keer Table us Del vg en he Now 10 conver! inary Equivateny _Number ~ 0000 0001 0010 ool 0100 olor oro | out 1000 1001 1010 loll L100 im) L110 wit sponding, Decimal Tne Decial-Binury-Hexa-decimal ‘a Conversion Equivalents A. 2B rar oul Ac Comet OFA2 , => (Ig Binary Equivalent number, OFAD = 9 F A 2 ay 7S SS oor 111 1010 0010 1001111110100010 rile [FAB 2 OTT TOODTO), is ee ten Binary Taner B. Comven (WE), © ¢ ), Binary Equivalent Number fen a a pes awe Goi ito __= 000100011110 Therefore [(1IE),, => (0 Binary number Ja] 5 the equivalent 1.2.10 Binary-to-Hexa Decimal Conversion To convert given binary number into its equivalem Hera decimal number-irake grouping of binary sumbers ino a group of + bss each starting from right -most (LSB) to the left, Now replace ach 4 bit binary number (group) with its equivalent hexadecimal (yg Hera decimal equivalent number (000100011110), = 0001 9901 1110 y fe =uE ‘Therefore [(000100011110), => (1IE),] is the Equivalent Hexa-decimal nunber B. Convert Binary Number (IOMO1011101011), => ( yg Hexa “decimal equivalent number HOH01011101011 = 1101 1010 1110 t01T ee ee DAE B DAEB Therefore [(1101 101011101011), => (AEB), is the ‘Equivalent Hoca-decimal number © Convert the Binary Number (10101 10001 10-1101010). to Hera decimal equivalent qurber 11011000110 1101010 = 1010 1100 9119, 1101 oro we vc 6D 4 ‘Therefore | (101011000110 1101010) bai) © Equivalem Hea decimal Nomber 1.3 Complements of Number Systems and Arithmetic Op- erations ® 1's Complement and 2's Complement Wile performing Binary Actimenc-s complement sad 2's complement are useful Since, Complementing Binary auabers permit the representation of acgative mumbers. Neqatve au bers in a computer are handled by employing 2's complement arithesic ve Let's convert a given binary mumber to its 1's complement and 2's complement equivalents 1.3.1 1's Complement Given a binary number-the 1's complement is found by changing all its 1's to 0's and all 0's wo I's (vice-versa) 1B For cng: Fs omlenet of Bary Nee 100 Ginn Bay Sunder s+ 11-01 0 yyy Vs complement is > 0 0101 A Obtain 1's complemens of Binary Number 1011101 Given Binary Numbers > 10111010 1ooo101 1's complement is» 0 7 1 Sem. Dip. Fundamentals of Computers (CS) B_ Find 1's complement of Binary Number 110111011100 Given Binary Number is > 110111011100 H's complement is » 001000100011 1.3.2 2's Complement Given a binary number -2’s complement is found by a 2-tep process step 1 : Get 1's Complement step 2 :Add 1 tothe LSB of I's Complement i.e, | 2's complement = (J's complement) + 1 2B or oul Fit 8 comet of Biya! 0 ‘LSB Given Binary Number > 10 1 1 [. AVY} Irs 1's complement > 0 1 0 0 Add a1 t0 LSB + 1 01 0 1 _=2)?"s complement s To conclude O101 is the 2's complement of given Binary number 1011. Dr Fnd 2's compen of een ary maber 1 0.0.00 LSB Given Binary Number > 1 0.0.0 v 0 1 i o o 1 1 i's 1°s complement > Add ai to LSB > saves of , . 0000 is the 7S complement of Given To conclude we ven binary rionber 1101165 1 eimplement 8" He 2s lene ‘2's complement of Given Big seo conelude 00101000 isthe ‘Number 11011000. 2m alternative method (0 ‘obtain 2's complement . se Binary Number-start fF Pgh os Sen 1 Get rand copy the Bis a8 i 1S and UP Lay including the first appearance of bit 1. suey 2: Nw take the 1's complement of remaining bis wis. rc ph 2 1a 2 oi of a given binary ‘number : 11101000 "iso . Y Given Binary Number > 111010 Apply step 1 Apply step 1 (ie, Take 1's complement 0.0.01 10.0 02> 250m plemet + To conclade 00011000 is the 2's complement of given is swmber 11101000 » 1 Sem. Dy, butameanas of 14 Binary Subtraction Usiug Ls and 2's C9 Signe Numbers ave represented 8 gompaters by Mpls Single bit at MSE Accordingly, tke given wunaber Is megative det the Signe DHE IS aD aaa has a Oa postive mumbers se Usually Negative mumbers gre represented using U's url 2's jomplement form Oleourse batty V's and 2's complements Perinit Subsraction of Binary Numbers. wo be pestosmed by employing mere Additions only! Uhetefore let's learn Binary Subtractions using. Ps complement and 2's complement torn of represemtation se The sign bat The sign bit is the leftmost (MSH) bit in a signed. nary number AO sign bit tells the given binary mumber is POSITIVE AL sign Dit ells dhe given binary mummber is NEGATIVE The sign Magnitude Form Whenever a signed binary number is represented it sign magnitude form-lett most bit (MSB) is the sign bit atl rest of the bits represent mugninide “The magnitude bits ane in true Punry (Uncomplemented form) foe both Positive and Negative Numbers 1 For instance +14 is expresses. and -14 9s expressed ts nr of Lege Bearer “ AW Ay the 6 compet foram = A negative number 16 the complem:nt of the corresponding Pustive Number 1) Sinaiaty, a the 2 eomnpement form egative mumber is the 2% complement of the corresponding Posittre number LAL DS Co ypleanentSubtraetion Sabyraction of Tiwary Numbers using U's eomplement can be performed by countering to event situations (eases) vie 1 Tes sulurict muller number from a larger number 2 Tin audunive larger number from «smaller onder: 16 Fist let's cosh the situation where tn to suberakt & smaller number from larger nner The steps ate as flows Sep 1: Bind the Ps complement of smaller number « the monder 1 be sulvracted (ve nuruber) Adil this Ts complement of smaller number to the larger ruber (This 18 as good as subvruction is done but by Addiion) Sep 2 Step JU there is generation of endoaround carry. remove | ‘ths carry how ts place and itt the sum result) © Kor evample subteact S642 in binary using U's complement [Note that devin mumnbers are used for gomeniene at fesy reference 40 «rss chexk the resus)? 111000 0101 0 1('scomp) < 1) > P1110 ——» 1001110 5 i eer ee tT 1 5 m1 | End Around (TOO 11000 432168421 Cary» + 1 ‘,0011001 Reukz> 0011001 << @ > "Now let’s consider the situation where in to subtract 2 larger number from smaller number. Using ’s complement method. The steps are : [1s Complement Method of Subtraction} ‘Step 1: Find the 1°s complement of the larger nunber (ie, negative number 10 be subtracted. jement 10 the sraler ry, s eomguraction 1 AON By ay nie itn a Ngati Sibeo example subtract 4 Prego rion 1) sem wg 3 coe 3421 } To00 13 1101 rset a — = 5-010! 1000 *o010 1010 “Ame sar, set Rena ‘Take 1's complement and prefix mim sign y ue - 0 ec em = ie, 5) (> Suberac 46 from 25 in Binary using 1's complement metho subracion (25-46). tn Decia.‘Now wsng 1's complement Direct Subtraction med? a 011001 +011001 46 101110 >1's complement: 010001 r-010101 10101 0>>Aaer bi Xmen Direct Sibeaction Tall Vs complement and prefix minus sign sedan @- 46 = Eo10101 (20) 1 Sem. Dip. Fundamentals of Compuners (CS) 1.4.2 2's Complement Subtraction Binary number subsraction can also be performed using 2's ‘complement method First let's consider the situation where in wo subtract a smaller ‘number from a larger number 2 4 The 2's complement method’ steps are as follows we Step 1 Find the 2'S complement of the smaller number (he. Negative number to be subtracted) Step 2: Add the 2's complement 10 the larger number (.e., as good as subtraction is done by addition) + Discard or negieet the carry if any generared. = For example subiract 24 from 38 in binary using 2's complé- ‘ment method of subiraction (38-24, Decimal. Now using 1's complement. 0-66 e 00+ Y mesaz1 y 38 100110 _ loot 11000 Takes compen :: 1.01000 uiiiooo eae * sue 4001110 ioor1t @ooiii0 (+14) * + 1 ak iin Answer ines Subracion = TOTOOOs---? = (414) Discard cary {100110 - 011000} =>/0 01 1 1 0) = as 29 ie, GH Basis of Logie Design 4 Wr suture 18 irom 25 in binary using method 2's complement method of subtraction (25-18) In Desinal. Now using 1's complement Y wraat \ 23 Toot ettoor “18 10010 elias canara So1ii08 407 soo111 01101 @oorrs Gant i Ree ¥ 1 Anbver Diet Sioeacion OTTO re as 18 Dead cary (11001 - 10010) => (001TH ic. «+7 Sow ls con he snation whe in bt a are omer om alr er $B the 2 conor tnd sep ea los "Sep nd te 75 enpemeofihe ager mambo 2 Nau Manfer'e he nba Sep 2 he 2 cmp oh sale urbe ‘weds ase ne Oy As tp 3 hare wil mf ye Te res 2 ole ov om oe wp ‘= For example subiract 14 from 09 in binary using 2's comple- ‘ment method of subtraction (09-14) In Decimal. Now using 1's complement y 8420 09 1001 "14 "1110 > Take 2's complement -05 -0101 ooo +1 . : eens ‘cupieueit ori oo10 > ¥ Direct Subtraction 35 ! Sem Dip. Fundamenals of Computers (CS) [To getcorect eating New] CComperenieform. Take 2 | Compement and shang en) {Complement and tna sig] : o100 2's complement form + —1 001-1110) =>[-1071) diet (09 - 14) ie, O101 (+5) GS) @> surat 17 from 14 in binary using 2's complemen method subtraction (14-17) ae ommend In Decimal. Now using 1's complement Yo wear ak otito orto 1110001 tae 2s compen FeO ETL oa pineal “os “00011 oifio =k SET OT (3) +1 - writ ness Dies Sain penetra > Take 2's complement Vs comlenen "00010 is a4 - 1 2's complement form 00011 for110-1000N =>[-11101 oo) 1.4.3 Binary Arithmetic Operations Basic Arithmetic Operations using Binary Numbers. Since, computers perform arithmetic operations on binary numbers, we shal discuss Binary Addition, Binary Subtraction, Binary Multiplication and Binary Division operations with examples ® Binary Addition Binary arithmetic performed on binary fumbers are binary addition, binary subtraction, binary multiplication and binary division, ~ |, [Here sum i not ecimg, sum is 270 With a cay and read 38 one-2er0) 1 (Bere sum i 1 with cay and read 35 one tes of Binary Addition on binary Let's consider examp! valent addition is’ al ‘on the right side decimal eau alent addition 15210 Show easy reference + Example 1: 14141 ‘Add 10 and 01 10 02 +0 14 01, ri © Example 2: Add 110 and 111 110 06 riito7 | ty em 1101 ra | eedeor=3 | «Example 3; Add 1101 and 0010 11014 13 [842i +0010 02 friitais TTT | arae2siats * Raaenpgle S$: st (100019 ant 1OHTLIO b1roo 1005 otro i esiee 2s 11 0010 (4-32-G-0-6-2-00100 tooling A-0-0-824-2-0078 52168421 161 1.0100 1%-0-32-16-0-4-0-0=180 Add 10110101 and 11001001 6116101 WG 32- 16-02 4-001 =181 256 128 64 3216842 boriiinio 286 -0- 64-52-16 Bo 4-26) Binary Sobraccice For Beary Subeacsoethere are four tac roles as listed below aa e Lev’s consider ctumples of Binary Sebractice on binary mu bers on the right side decimal equiva seboaccioa 5 also shown for easy reference © Example 1 : Sobre (11).510,, Et) 1 Sem Dip. Fundamentals of Comonters (CS) * Example 3 :Subtract (1110)4-(1010), sani E110 14 | yiosgs44240=14 J210 - 19 | orocgro+2+0=10 =~ | o100=0+4+0+0=24 Example 4 : Subtract (1111), from 10111), ie.,10111),-(1111), 23 | 168421 TO111=16+0+4+2+1=23 11112 8444241215 01000=0+8+0+0+0=08 bold pirates o1000 08 * Examples + Subsract (0110), from (001 1), i¢., (0011),-(0110), Here take 2's complement of Result ignoring borrow i.e., 1101 11or ool 03 0.010 Gsm 0110 03 + 1 : o6 torre to ® Binary Multiplication ‘Multiplication in binary is same as multiplication with decimal numbers For binary multiplication - there are four basic rules as listed below 168421 10010 =16+0+0- =18 ‘+ Example 3: Multiply 1100 x 1001 1100 12 5 1o001x 09 STOO Tor | 1286432168421 +0000 11 01100 ree! = 64432+0+8+4+0-0 T1017100 =108 F Sem Dip. Funlaneals of Compue’s (CS) we 4 Multiply (11001), « (11), Tio oa 2s al 175 (175 128 6432168421 roto 2128 +0432+0+84 44241 =15 Example $ : Multiply (100), x (1101), 1ooo1 7 x 1101 X13 STITT 22 400000 +10001 seororalt Ans: CTO TT TOD; 2 220) 128 64 32168421 110 #LLOL = 128+ 64404 16+844+041 =21 ® Binary Division Binary Division is carried out in the same way as decimal division. For Binary Division the basic rules used are as listed below Basies of Logie Design orl Teal Bers amie camper Bay Dvn 0 Bary anes ou beng eda! ele don 0 sown ony tee Example 1: Divide 100+ 10 0 2 TOO 24 Ansty 0-4 ooo 0 Example 2 : Divide 1110+ 110 101 3 [168421 uyatito 630 | yy yy 110 _ 230 | 16+8+44240=30 oro = 0 | 110= | =ni0 44240206 000 101= 4ns:100, 440+1=05 Example 3 : Divide (11001), + (101), 101 3 wo TTOOT sP35 tor 8 | iegaan i 11001 =o 1648+0+0+1=25, to 10 t= 101 4+041=05 000 4 4 Sem Dy undanenals of Comptes Hsumple 45 Divide 111100), « c1n0), Mm 1 wo) THO a) 100 2K 1OKA2) O10 w tito 100 WV RA 0106 28 o100 oo _ 100 eee 000 v0 AvdeleOr Ans), 9 OD yy 1.5) Computer Codes eM Digital computers make use of specialized computer codes or digital codes viz BCD, EBCDIC, AS Unicode in order to represent binary numbers, deci English alphabets (letters), special symbols and instructions Gray, Excess 3 and 1 numbers, Some odes are numeric. For exumple-BCD code and other digital codes are Alpha numeric. We shall discuss in brief each of these codes 1.8.1 BCD. se The term BCD stands for Binary Coded Decimal, I allows us 10 represent decimal digits 0 10 9 by a 4-bit binary code. I Also referred to as 842/ BCD ende or simply 8421 code. The {8421 combination indicate the binary weights of the 4-bit code viz, Ne 7 ye 8 4 21 BCD AT = 10 pea trot 1 gy can te iy aie mee i ong codes a 7 Hon, table belo 2 ony \ ony ‘ om 5 on 4 Ky 1 ony * 100% y sony —_—aee good imertice 1 binary we BCD cade proves & re eypad ints, DIBA Ef in ee read 306 WHE DIM ry 4s Cavers be ny decimal number tw BCL y, To convert andlor ress 3 rPrceimal digit wi he COTesponding simply replace each decimal ‘421 BCD code, | 4 For example convert the following, decimal numbers uy br A) 28 B) 4 9% D) 123 yw? f 2 (OO101000),, a eo) 22 (0011010), Ps oot! 0100 DIB = 1 Goi 6010 Gor = Similarly, one can convert BCD coded number imo an equiva: lent decimal digits. To do so make groups of bit each the BCD coded bits staring from Right Most bit. Now write down the corresponding decimal digit represented by each 4-bits BCD (ee on 2 fer cumple omer te foloning BCD ones dial tw * cr0n0 B) anoroenr0 © ow D) esotoroont i010 => OLD =O yy vy pyovreowoen10 => gu gw BI =e Trt ry oon =a 5 ray oven not = eat 2 a au! =O ry yy Be spn 20 Cb Digital’ Devices like 7-segment display (LED'S) based digital meters (DMM’s), digital clocks, thermometers etc., make use Bars of ‘of BCD codes and the corresponding decimal conversions= = ‘order to simplify the display of decimal number outputs = However for calculation purposes BCD code is not a5 efficient as binary numbers 1.5.2 EBCDIC We have another standard code to represent characters inter rally in binary form. and this code is known as EBCDIC (Extended Coded Decimal Imerchange Code). This code makes use of 8 bit binary string parern to represent each character and therefore 2 ‘maximum of 2°=256 characters can be coded using EBCDIC. It's an Bit code. I's still used in IBM main frame computers and mid range ‘computer systems but rarely found in personal computers © For instance some EBCDIC representations for alphabets and rumbers can be given as follows 1100 0001 *T" ~ 1110 0011) 1000 0001 “I = 1100 1001 " - M101 1000 C* = 1100 011 °Z+— 110 1001 °K" - 1101 0010 / “2 - 1111 0010 “0° - 1111 0000 S-bit EBCDIC code 1.5.3 ASCII Code ‘The most popular international standard for representing the ‘characters, numbers and symbols, is the ASCII Code (American ‘Standard Code for Information Interchange). This standard uses 7 bit binary code to represent each character 27=128 thus 2 maximum of 128 characters can be represented using ASCII form of binary code. The following table shows the ASCII codes for some of the charac: tr. Fr rangle ASC ene for pint Ais LO000 ad 110001 for a ° “0 ASCH code for “A” is o ose Similarly. ASCH code plo ot value is 97 a je defines 128 character code then oscar ma ee amr by Bae A einer anisms, ee ae acta or USA as an St code, SS Eee aa are deer repesened raters, Ou ms piste Loe ere ca on EBPs ioe lee pom ag a et ty AS en cme te SUMA is ro1ooi1 1010101 1001101 1000001 Ue a 5 U = Consier another example, the ASCII code for R is 1 Cone aa al hey 0 he ASC Ke tment oes inary Sthds electrical signals to represen oe 1010010 which nothing but the eral repress ok: inside the computer to denote character R. ASCII ns commonly used in almost all types of computers. ine © To conclude ASCII i the most preferred ‘ ternational Fn tse tor ayoourd dats encoding, St tan Te ner computer incface applications with piers video terminals. wo A new version of 3 was developed DY Tw ak 7 bit ASCII Cog 0 1 Sem Dip Puamentls of Computers (C8) LS Gray Code gi 834 sole an Uneighted hi cde an is ra an Anthmetic code Gray eode bit patterns do 0 pr cil oeesses 4.6 , weights 2Fe not assigned to bit positions The spectal feature of Gray code is that-it exhibits @ single bit change from one gray code bur pattern 10 the next successive gray coxde bit pattern, Therefore Gray code is also termed as Unit Distance Code v2 Why Gray Cote. ‘> One-bit change propery of Gray Code finds ts application in shaft position encoders. The shaft encoder is a one kind of Analog-10-Digual Converter that make use of Gray coded disk 1k measures the physieal position in digts form ® The following table illustrate 4-bit Gray code forthe binary and decimal number eqialems from 0 1915. BINARY | GRAY NUMBER | Table » ait Gray code Please observe cay om] | i a 1010 uence (he see of non | sive pairs of 2 Foo pray ode bit B Hol lout patie) 4 io mn aes of Lug Des 0 f The Gray cove 1s preferred im these applications because © chances of error occusTence iteases with the (more) number ‘of bit changes between successive or adjacent numbers bit sticam sequence | © But Gray cade always offers only-one-bit change from one ray code bit pattern to the subsequent (next) bit pattern © Gray code is also relerred to as “Cyclic cade” or “Reflected ene LS.S Excess-3 Code As the name itself indicate that ~ by adding 3 (0 each decimal digit im a ven decimal mumber and converting the sum (0 a bit binary number-give rise 10 Exeess-3 code 43> For example get the excess -3 code for the decimal number 6 6 +3 9 => [0.01] is the Excess-3 code of decimal 6 ly find excess-3 code for decimal number 27 ee +3 73 a 10 voY¥ 101 1010. Therefore [01011010] is the Excess-3 code of the devia number 27) —— emo Fundam 5° J oilman abe snows Exue9-3 cues for he decimal and D Eauvalem sumoers trom 0 1 9 sco cope EXCESS3 EXCESS CODE + ao : +3 sa To comiute the Excess-3 code is an “Unweighed it code” Siaee. ow specific weights are assigned 10 bit positions. Also, Excess! code extmbie sefompiemennng property which is sseful if Aretomenc operations \.¢. umplemear 9s complement subeenom) LSaUmeode se Tone or Sone SCI and EBCDIC coding schemes did cor tave surficen mumber of ns (bury digs parers) to accommo- (ore ana cepresenr il te characers and language specific symbols of 4 ocai language [ike ini lapanese. Chinese on Computer's Das. Prosesing) t DeCaMe ifficit co etchange cext files of regional angers at imermanomi leet > Tererore (meade standart was designed 1 overcome these gmomiers (meode 's 4 universal character encoding standard “tar sefines oumary odes i bytes. words and double word for farses sec oll mayor languages (mulling) ot the orld sed for wren commumcanon ass of Les Ds jg evommendedinerratony i, oF varios INELIES ep geseing Tagish) FO COMPU dsp distinct number ‘nique fi for special chang fines codes fOF Special chang” Is Unicode has the eas” J) characters With unique cach and ©) chracer weary) value called its “Code poig) eT > vides internal FEPTESENEtion gp st re ro er is encoded in amary bit pater. = the Unicode sumdard defines 3 19Pe5 of cn > Accordingly. fee ted as bEIOWS TT UTR - 8 [Unicode Transformation format -8] = 16 (Unicode Transformation Format-16) ration Format -32] 1 2UTE 3 UTE - 32 {Unicode Transfor o Byte-oriented format representing all Uni ae se cna Lye. 2-bytes, bytes and 4-bytes. fe UTF-16 is a wordoriented format that represent all Univ Characters in emliples of 6-iS [considering 16-is=1 yo co UTF-32 1s 2 doublesword oriented format that represen ; unicode characters in muliples of 32-bits [considering 3 bits=2 words} ie. two words each of 16-bits width only. 7, is each characteris encoded with 32-bits [double word.as fi length character To conclude on Unicode Standard Ie specifies an algorithm 10 handle and present text with directional behaviour. For insunce english text uses serpy ) from left-to-right and languages such as Arable uses sri 16 from nigheatet Sexy changes in are mat ‘which it nctudes special characters to sfievtion when Sept oF aifterem ditections Thus ‘uniowte sandant provides an ‘mmulolingualeaeesine plain tear Unicode efficient way to eneate 1B provides upto d-bytes 3240 32-68 to represent inividual letter, amber of symbol. 1's femal as Uniaate Worle stan sandani Unicode has compatibiliy with ASCH gade godes in Unicode are identical to the ASCU and Extended ASCIT With four by byte (32 be created 19 or symbols Logic Gates Logic Gate are the electronic circuits in digital form. They can operate at two distinct states. They are made out active electronic components viz, Diodes ain! Transistors and passive slectronie components viz Resistors and. Capacitors. "These Physical electronic (Uransistor) logic cirewits are capable of switching berween two saturated states viz cu off and. sat ice the first 286, 256 codes used by the esting. systems ‘it-long) provisions, unicode codes ean Fepresent as many as 4 billion diferent characters These two states are approximated as Logie High oF TRUE or 2-°1" state and Logic Low or FALSE of a ‘0° state, This behaviour of digital logic circuits is also referred 10 a8 Logie State transitions of simply sate ransitions. (wo state logic ‘and logic 0. These basic logic gates are used 10 construct complex digital logic circuits called Integrated Cireuits (IC's) oF more com monly referred to as Electronic Chips. In short these Electronic Integrated Digital logic cireits are termed as Digtal Logic Sssiems of simply Digital Systems, Mawes of Lage Deven “ Such IC's oF Digital Systems pettonit specific functions siz 1. Anihetic amd Logie Operations (ALU ot 4 Corpntery For example > Addition > tnvrting/Nepaton (Nor > Suiracton > Anding >» Counting» OR > Multiplication 2. Logie Functions (olen Algebnn Functions) og Vor example ®ComparisoniGireater than, Less than) (comparmor) > Shitting (shitRowte bit operations) > Ropisters » Counters > Complementing > Multiplexer > Encoder/Devoder —® eemutipexer To conelute the basic elements i these digital systems are + NOT Gates + OR Gates + AND Gites SY2To summanse the logic gates are the skeleton that form Digial © Integrated Loxte Circuits and are labecated to deliver diferent ‘ogic function including combinational and. sequential logic (cireui) funetions. In short A. fogte Amaiding block of a Digual Cirewe fate ts an elementary ‘Let's discuss and realise the busi logic ates with thei Truth lables as how they behave (Le., deliver outputs in accordance with inputs as given in their respective Truth tables), 1.6.1 The OR An OR Gate is a digital logic itcuit that per Addin or Logical ddion. Aw OR gate ean be oF more Inputs and a single output Boolean composed of two 3s Tey segs cas ae OR gate wth ro inp A and B ad ——= ‘Sandard logic symbol for the OR gate appears Oat Fem & Loge Syntol of OR Gate ¢ The OR Gate functions in accordance with the truth table a5 ven above ee [How OR Gate works behave..2 } Accontingly the logical operation of the OR gate is such that se i produces a “1° or “HIGH™ output when one or more inputs 10 OR Gate is HIGH i. at logic “1” <> it produces a “0” or LOW output when both (oF al of its) of is inpas are at logic “0° or LOW. 2 To conctase For a 2-input OR gate-ouput Vis HIGH (1) when either argue A or input B is HIGH (1) or when bow inputs A and B are HIGH ()) + Ouapua ¥is low (0) only when OR Gare inputs both A and B are Low (0) © The operation of 2-input OR gate can be expressed as- Boolean equation: Y = A+B o The + plus) sign represent logical OR function mathemati cally and here the + (plus) is read as “OR” og og ton SITE a5 OR, & please note gical OF boolean tion here differs from binary f tion. Since 1+1 = No cary However in binary addition 14120 with a carry | ion ‘> Boolean addi ie. ication © = Gate Ce van be used nan aplication cle, The OR Gates FT can be used a5 2 SUCH in py, Detection System. connections ‘aOR Gate Operation * Fora 2-inpat OR gate al the comespoding ouput ae 4-possible input combinations sown schematically here - 1.6.2 The AND GATE ‘An AND gate is a digital logic circuit that perform Bod ‘maltplication or Logical Mutiplication. An AND gate can composed of two or more inputs and a single output Usually gate inputs are on the left of logic symbol andthe output is on the right of the logic symbol. Gare is a tem used to describe an electronic circuit that performs a bac logic operation ee 37 lagu put 1 Sem Dip. Fandamenuls of Conpuers (CS) Let's consider a basic AND te with two inputs A and B and ‘single output Y. ‘The standurd logic symbol for the AND gate appears as Follows TAND Gwe SB otha Kn 4 Figure & Logie Symbol of OR Gate Truth Table of AND gate, 4 ‘The AND gate functions in accordance with the truth table as shown above, B Accordingly, logical operation of the AND gate is such that it prods a “HIGH” inputs ae HIGH it produces “LOW” or “0” ouput en any of be nus ae bv © Beto conte Fora 2-iput AND gat, oupa V HIGH C) ol | ‘when both inputs A and B are HIGH (1). * Output ¥ is Low (0) when ether A or B input. is Low (©), or when both A and B inputs are Low (0) or a “1” output only when all of the ‘> The operation of 2-input AND gate can be expressed as Boolean equation Y=Aa-B ‘> The dot (>) sign represent logieal AND ing function mathemati- cally and here the . (dot) sign is read as “AND” Basies of Lexie Design 58 ‘© Boolean multiplication or logical multiplication is same as the AND function ie = AND Gate Application : ‘The AND gate can be used as an Enable / Inhibit Device for a Frequency counter. Also it can be used in a Seat Belt Alarm Circuit in an Autommbile/Vehicle to detect owoff staus of an Fenition switch, = AND Gate Operation : For a 2-input AND gate all 4-possible input combinations and the relevant output are shown schematically here De 1.6.3 The Not Gate A NOT gate is a digital logic circuit tat performs a basic logic function called Inversion or Complementaion. Unlike OR and AND fgate-the NOT gate is composed of single input only and of course single output. +> The NOT gate circuit is also called the Inverter and is said to perform logical Negation. + The logical negation ‘or inversion or complementation behaviour fof NOT gate is indicated by a bar (-) symbol or prime (°) symbol on the input variable A. AS a 59 1 Sem. Dip. Fundamental of Computes (CS) & ‘The standard logic symbol forthe NOT gate appears 25 telow Figure & Logic Symbol of NOT Gate ‘A Truth Table of NOT gate The NOT gate functions in accordance with the truth table 2 aiven above NOT gate works/behave ‘} Accordingly, the logical operation ofthe NOT gate is such that ‘> it produces @ “1” or “HIGH” output only when its single input is maintained at a “0” or “LOW” ‘input. ‘> it produces a “0” or LOW" output as and when NOT gate input is given a logic “1” or “HIGH”. a To Conclude For a NOT gate-the output Y is HIGH (1) when the input is LOW (0) © Output Y is low (0) when the input is HIGH (1) * There by NOT gate produces an inverted output pulse. © In terms of bits-the NOT gate changes a 1 0 2 0 and a >The operation of NOT gate can be expressed as Boolean equation. > The complemented variable can be read as “A bar" or “Not a ex oro] =1 > Thus logical negation or inversion is 2 Applicat NOT Gate APF or more NOT EHS canbe a binary number. For’ eg N “ caer proauces 1S complement of a5 I's inverter oi . ath urbe i ie Opera + nor Gs ioroperatio Ft 2osie ig ‘The NOT Oe corresponding mereorsm mats 2 eatialy Bete wes ND Gate res and NOR Bates are termed a5 Uy 1.6.4 The NAl The NANT rts gat CBE CONSTI a fy ae te) sing only NAND and NOR gates 8 ag ti gat isa combinaign of AND and Nop ? er wo generate complemented (inverted) came gate function (behaviou. thy ier'a basic NAND gate wit two inputs 4 be ieee Y. The standard (ANSUIEEE Sanday 8 Stntl ef NAND gt ad is NOT-AND equal gy are shown as below NAND Gate Inpus—— Figure A Logic Symbol of NAND gate oo 1 Sem. Dip. Fundamentals of Computers (CS) Basics of Logie Design a —= To Conclude SDP & aC function for a 2-input NAND gate is ¥ = A-B Fue A. Conzacton or NOT-AND Gate (NAND function) ‘5 The NAND gate functions in accordance with the truth table as ‘A. 2input NAND Gate Truth Table ‘The operation of 2-input NAND gate is shown schematically as above. How NAND Gate works/behave {The NAND Gate Operation ‘© For a 2-input NAND gate-oupot Y is LOW (0) only ‘when both inputs A and B are HIGH (1) ‘© Output ¥ is HIGH (1) when either A or B input is HIGH (1) oF when both inputs A and B are Low (0) +» NAND Gate Application : Using only NAND gates-the basic gates OR; AND and NOT ‘ean be constructed andlor realized. A combination of these ‘ates can be realized, Therefore NAND gate is referred 10 as “Universal building block” in Digital Electronics fel 1.6.5 The NOR Gate ‘The NOR gate is a combination of OR and NOT gate that is imended 10 deliver complemented (inverted) output of OR gate function (behaviour. +> Lets consider a basic NOR gate with two inputs A and B and a single output Y. The standard logic. Symbol of NOR gate and its NOT-OR equivalent diagrams are as shown below 'NOR Gate A B ‘Ourput Figure A Logic Symbol of NOR gate Figure &Couraston NOT-OR Gate (NOR function) ee © f Fem Diy Sundamertas of Compaers 97 The SOK pate fueron SE BE Sarr im mused wth the rah he a —b— |p. 6 Ding OR Cate Tras Table 4 The operation of L-ingat NOR gate is sharon whematically a5 How SOK yate works/behave “Le The NOR Gate Operation For 2 Digan SOR gate ouipsn ¥ is HIGH (1) only when berth sngpats and Bate low © Ouipes ¥ is LW (0) when either A or B inpst is HIGH (1) oF when ton, A ad B ign are HIGH) & 10 Cometude Lopeal expressem oF Boolean Expression that deveribe NOK foratwn for a Z-ingt NOR gate is Y= AB ue tr Del q wo NOR Gale ” gies SSI aes moe tac ISAS vm ety MM wes rena be cng Behe AND AS VF Haag ge NAND RAE II gy ee Ne tN i achive - 8 A-ORIXOR) Cale ee is a unteh see HOR 9 AA DHE ZI py The eS aad omy oe * to asain wd se tac 5 V2} 8 pag name ve ip Basie We hs napa ¥. Te saad Vth bok ot yy ano ss sharwa be * tig re St A HOR wae PL 2 I EK Ce 18 I ‘The taclusive -OR Gate Sanctions: in accordance wth ty ‘Truth-Table as given above. “Te operation of -ingat KOK pte 8 sown schema by 1A} 4-posible combinations of inp as below tr T DoD oD—| sD (A Ling BX-O8 ate operation shiemati _1 Sen. Dip. Fundamonals of Computers (CS) Exclusive -OR Gate Works! behaves ALE The Exclusive -OR Gate Operation (XOR sanction) | + For a 2-input Exctusive-OR gate-ourput ¥ is HIGH (1) |, NHR ether inp A or igpt Bis HIGH * Output Y is LOW (0) if both inputs Avand B are either |__LOW (0) or HIGH (0) rogerher. re conaate Logical expression or boolean expression that deseribe XOR te function is represented as SO aa SLY = ABS AB if ABO AB | Please note a special @ symbol is used to indicate exclusive -OR operation 1.6.7 The Exclusive-NOR Gate (XNOR) The Exclusive-NOR gate is a combination of XOR and NOT gate that is intended to deliver complemented (inverted) output of XOR gate function (behaviour) +> Let's consider a basic XNOR gate with two inputs A and B and 4 single output Y. The standard logic symbol of XNOR gate land iis NOT-EX-OR equivalent diagrams are as shown in figure below Fie A Lip Symh of XNOR ge Fig. Cowan of NOT-EX-OR Tr Tate {NOR function) Basics of Loge Design 6 8 The Exclusive-NOR Gate functions in accordance with the truth tuble as given below sD | SD ‘A: 2ipt XNOR Gate Truth Table The operation of 2-input XNOR gate is shown schematically as above for all_4-possible combinations of inputs. & the Operation OF Bscnsve NOR Gate (XNOR Junaon ‘© For a 2-input Exclusive -NOR gate-ourput Y is LOW (0) wen cite pu A o ap Bis HIGH | + Output ¥ is HIGH (1) if both inputs A and B are either low (0) or HIGH (1) together. BT Concade Logical expression or boolean expression that describe XNOR file function is represented as y ABYAB o _1 Sem Dip. Fundamenals of Compuaers (C5) 17 Boolean Algebra Boolean Algebra a is mathematical system formulate logical expressions eal system that can be used 10 ‘Ons representing digital logic circuits +> Such logical expressions can be ‘simplified and /or reduced Then Tised) with the help of Boolean algebra rues and las. Fit nn tt AYE an economical, simplified digital logic Hult with minimum number of electronic components (gate). “» Therefore Boolean Algebra is extensively used while dsining an efficient digital logic circuits that are employed in different kinds of computers and Electronic Appliances, To Conclude > Boolean Algebra was developed by an English mathematician George Boole the mid of 18th centuary. It became known 25 Boolean Algebra after his name. > Boolean Algebra is popularly known as “Mathematics of Digital Systems” ‘> By learning Boolean Algebra-the logic designer can achieve evonomy of construction and cultivate the methodology of how 10 simplify the electronic logic circuis. >In the Boolean Algebra terminology-the variables used in Boolean Equations are termed as Boolean Variables and they assume only wo possible states / values viz binary 0 or binary 1 or 1. "= The fundamental boolean operations are © Inversion (Complement) Addition © Multiplication ‘> The “Boolean addition” is equivalent to OR gate operatton and the “Boolean Multiplication” is equivalent t0 AND gate opera wn | © Please note = Boolean Addition is nO same_ 5 Bimay > Boolean Multiplicatiog when same as Bioary Mug, The basic avs of 1, Commutative Law ~ for Addition and Multiplication 12 Associative Law - for Addition and Multiplication 4, Distributive Law - of three variables We shall discuss each of them now Commutative Law of Addition fortwo variables is wrines xy algebraically expressed 2s A+B=B+A © Commuarve Law of Mubiplication for two variates 5 expressed as AB = BA Gris Law states that the order in which the variables 2x * Red or ANDed. makes no difference of Computers C3 The application of commutative Law of addition with OR HES Is shown im the figure below The application of commuative law of Mukiplication with AND gates is shown in the figure above 2. Associative Law of Addition for three variables can be ex- presed as AL BOS AtBEC Similarly the associative law of Multiplication for three variables can be written as: ABO ABC Ss tow sates tat ORing or ANDIng a poop of varies probes the same re irespeveof grouping of te ‘arabes ‘The application of Associative law of Additions with OR ‘gates is shown in the figure below Bases of Lope Deven a © The application of Associative law of multiplication wih AND guts is shown in the figure below 3. Distributive Law for three variables can be expressed as AB + © = AB + AC Gris taw states that ORing ewo or more variables and then " ANDing the result with a single variable is equivalent 10 ANDing the single variable with each of the ro or more variables and then ORing the product. (© The application of Disriburive law with OR and AND gates, is lustared in the figure below : % Tocomhe he toving ble smmasis liso Bostan Algebra 1. Commute Law: A+ B= BSA AB=BA 2 Associative Law oA + (BHC) = (A+B) + C ABO= ABC 3. Distributive Law AB+C) = AB+AC Tass of Boolean Alpers Snob {Sem Dip. Fundumenals of Compucers (CS 1.7.2Rules of Boolean Algebra ‘The following table list ‘that can be used to simplify Rule number 1 © 9 will be viewed in terms of their application {0 Tope gates. Where as rule umber 10,11 and 12 ae detent hon Previous simpler rules of Boolean Algebra Here A.B and C can ‘combination of variables Out 12 basic rules of Boolean Algebra Boolean expressions Fepresemt a single variable or a Rulel: A+0=4 AA variable ORed with 0 is always equal 10 the variable self. It can be verified with OR gates ass of Lane Dose —_~ — el An 1O piatl ° Rule 2 if ayiable OR ae ' Db ‘Oy “ yal 10 is aways A WithOR yg n be | 10 ko, ates. L Rule 3: A” th 0 is always equal to 9 a aril ANDet OD i te te verified with A 1eA Rule 4 ‘ ariable ANDEd vith 1 is aI¥QYS qu y g sable. It can be verified with AND gates Rules: A+AZA ways equal ble ORed with itself is always : vreable can be verified wih OR gates enka of Copter (C8) Wie AA RL A variable OR wit ts commen is aways equa 10 VW cam be veritied with OR gates Rue 7 ALAZA A variable ANDed with itself is always equal 1 the variable. I can be verified with AND gates. Rule SAK =0 A variable ANDed with its complement is always equal 10 0. It cam be verified with AND gates : asi of Logie Design " Rule KOA The complement of complement of a variable s always equal tothe variable. Wan be verified with NOT gates Rule 10: A + AB = A This rule can be verified and proved by applying. distributive law and boolean rules 2 and 4 AHAB= AL+ AB y Rule = AC. +B) Distributive law + rule 2 BAL ws Rule & A ‘2° This rule is illustrated with logic circuit and proof can be given with truth table when A and B inputs are applied 10 the logic sate circuit as shown below " ‘ 186 Hy Hummes Af apes HO) J yp v ont Mule KON OW Fe tte HH be trae we eed bao ASAD = ASAD © Ay Hale A OAH = A IARI ANS Ay Wik hohe ~ BASABIAAS AY Wile A VAM MNS AI AAS hy Hy bering ~ tha hy (Aehy whens hw td =F they Wie AIA -hon Asn Hale 12 (NSB) ASE) = ‘This rite oan be sneered we dotted barn (DSB IDSC) WAS EA DNSHE Kherhonion inn =A MAMI Mie KA = AWA) MIM Mile D ASI =I = AL 8 ABS WE Raunt etrinnine bony = My OM . Pawn -h 16m Mier Aodnd how His A DH NABI SE) = AO ans a tone vy vane ye wmwn? We WAH be Soi, 0 yt Boast gaa amr Hy onl) Wssae ops 06 4 ena ue yp poner A msibles to wi he wil Hable AY hy, epirtiyy bd abe mM jhe ye ie} te 0H" wort “nye a ew tsps pe abn hl) Die Moran's Nye shasneny says “Lamyplemnent of pra inpatient 9 the oui nf vnphewants ” Sem yy Buwhaneadts f raguasss 8) 2, De Morgan’s Secon theorem states tha He scmnptenant of sun arabes 16 esl the pont the comptemetdy of the sais The boatean equation ut the second dhe toy 2 yarables A and B can he expessed as [ABAD o> The ate equivalents and the uth table outputs sMustraucd the proot for De Morgan's Secon these ‘Ouput ue a8 Opa Sa he | A W Neatve AND gate ied AND Ge, ‘De Morgan's second hear (s equvatem tthe says = "Complement of sum pt af the complemenns” P Prease Nove De Morgan's theorems can be applied to expressions havi HA Sanheaw Saprrniiann AW aud M7 1 dun Prinses ts 2 orks of Sa Such stanlad Wve singly wedlnatin mi pian Wurlean expe Jan's Ulvaeus Hi) comme aninne Ae “Kh ak Hf anand nme ot Yonica «nian J Sam ot Proves (ADH) torn A pores C10 sik I ria! MaMpinAinA Sf vat saone ait ay ait spina Wau 090 YF ste pel te a satin npr 4: Manin Adin, a uly sayuniod © mami yes OY) ton & bu utes words YF uupiriiainn neo iy We vane 1 009 OME ANN yats/tyuntane 1 SOV engtesonn wt Oke Woyetine 6 Jrasuples of su ot prot Yu i Hae AY fre (OW) tue eapserians ats ies ae BD A 0 BBC bY. bey Be ACs ab 5, ree Nie tht a8 VO nn Ta variably ese variable cai be competi Uunwomplonssted tut ————__1 Sem Dip. Fundamenals of Computers (C3) . He ae can to note that in an SOP expression a singe over bar (complement) cannot extend over more than on oa send over more than one * But more than one variable in Variable in a product terms can have overbar. Product terms can have an 2, Product-of-Sum (POS) form. A sum term consist of logical sum of variables and/or theit complements ‘When two or more sum terms are multiplied logically (called Boolean Multiplication) the resulting expression is in Product- of-Sum (POS) form @ In otherwords POS implementation consist of ANDing the ‘outputs of two or more OR gates/functions. i-e., POS expression is nothing but two or more OR functions ANDed together. "= Examples of Product-of-Sums (POS) form expressions are: (A+) (A+B+0) D-(A+O (A+0) (B+D+E) (B+O) [A+C+D) B+O +H) @ Please note that a POS expression can conan a singe variable term Also, a single over bar cannot exead over more than one variable. But more than one variable in a term can have an overbar & For instance A+B+C is correct (7) APB+C is not correct (X) poolean Expressions roressios 10 iMplAY Wing der some eS Morgan heorems Beg Alga aes Os sic Simplify the exPreS 1 Sp a +AD AB (D+D) AB y= AB 2 Simply te exresson y = ACD+ABCD coiatas) = Rule H A+AB= a, y = cD (A+B) y = ADC+BCD ify the expression a Meuaie By De Morgan's thee = (awe = (A+@))-C vv Rule A= A y= A+B) C 4. Simplify the expression Y= A4BC = (B.C) v AFB = A-B De Morgan's 7 RaBHO) = AB = A+B De Morgan's AuB+O) Boolean Rule 9 Y = AB+AT 3 ‘Dr Deommi Name sser 5 as sie os ata ec U ume sm 2 Tie Amr Number seem sas ier co ze Name Ssem 3 Tae Coat mmme seem s at wie os Bex S mime sem 4 Tee Coat ame cer we ee = Sami fe egress 3 Anew wesor of ASCE one ale Sammie SOE S Tie ERODAC smart ees Seay amet cone cat sure he hears | Sem Diy Fundameraas of Compusers CS; Review Questions 15, Wene Oe a 4 bose HET : 1 What is 2 radix of [36 Wome eae wh DE IIE I ey 2 bap, Late ot ber sem + pain |r wae en an 3. Distinguish = vee a Number systems j i) AND yy SAND vy Me Syn Cece ste an Nonptens Norter | St wns as 4. Write short notes on 1 Esp te age 4) Computer | 5) Conmme : a EBCDIC or ase Sie by Binary Cong c) BCD : . " stinguish | Disrinaive Give eevee Rea eae aoe ts nes wie ie PAE (Te PON) 6. Give radix values for ; na engin x PEE A 4) Binary Number System i) Octal Number System |» ye 5) Oh pte AND ee ) Decimal Number System ys ‘p NAND ete 7. Give BCD codes equivalets for NO a wt NO pe a) 447 bis 6 1899 4% 21, kagaia the 8. Give decimal equivalents for 22, Site De Morgps's Ceorem os Se’SOP aad 14 a) IAB by B20 ©) 2BAD 4) 40 2B, Eaghin wi examples PE pe tes 9. How to convert Binary Fractions to Decimal Equivalents ” 24 ta a Bos Ma OS tn 10. Explain with an E bodes - a) I's pana I 25. Explaio with examples tow 10 pertorms Bexar) Adtoay « ) 2's complement subtraction i: irs apr = Consider subtraction of larger number from smaller one 2b, Describe Binary = =. 11. Explain with an example to convert : 71. How 10 perform Binary + Epa 2) Decimal to-inary ——_b) Oxtalto-binary vith a9 cape ¢) Hexa decimal-to-binary 4) Binary to-cctal na@e- 12. Write short notes on | a) Gray code . by Exvess-3 code 7 © Unicode 4) Computer codes | 13. What are Logic Gates ’ Define gates 14 Write truth table and logical symbol of OR gate

You might also like