CMSC 250 Discrete StructuresCircuitsCombining & Determining I/O RelationshipDraw the Circuit for:Number ConversionsAddition of Binary NumbersSlide 7Using a Circuit for AdditionHalf AdderFull AdderParallel Adders2's ComplimentCMSC 250CMSC 250Discrete StructuresDiscrete StructuresLogic Applications(Circuits & Adders)January 14, 2019 Logic Applications 2CircuitsCircuitsAND gateOR gateNOT gateJanuary 14, 2019 Logic Applications 3Combining & Combining & Determining I/O RelationshipDetermining I/O RelationshipP ~ (Q ^ R)January 14, 2019 Logic Applications 4Draw the Circuit for:Draw the Circuit for:P, Q & RareinputsSimplifybefore buildingthe circuitP Q ROutput1 1 1 11 1 0 11 0 1 01 0 0 10 1 1 00 1 0 00 0 1 00 0 0 0January 14, 2019 Logic Applications 5Number ConversionsNumber ConversionsBase of the Number System–10 (decimal), 2 (binary), 8 (octal), 16 (hexadecimal)–Tells how many different numerals are used–Determines the value of each placeConversions from anything to Base 10–Use the definition of the number systemConversions from Base 10 to anything–Use repeated integer divisionJanuary 14, 2019 Logic Applications 6Addition of Binary NumbersAddition of Binary NumbersCarry if the number would be too large for the number system – if it is greater than 11001+ 101001+ 111011+ 111011+111January 14, 2019 Logic Applications 7Addition of Binary NumbersAddition of Binary NumbersCarry if the number would be too large for the number system (larger than 7 or 15)7238+ 1282658+ 338ABC16+ 1216CDE16+ED16January 14, 2019 Logic Applications 8Using a Circuit for AdditionUsing a Circuit for AdditionWrite as a logic expression Translate to circuitsInput OutputP Q Carry Sum0 0 0 00 1 0 11 0 0 11 1 1 0January 14, 2019 Logic Applications 9Half AdderHalf AdderQP and Q are binary values (1 bit each)sum = (P v Q) ^ ~(P ^ Q)carry = (P ^ Q)PsumcarryJanuary 14, 2019 Logic Applications 10Full AdderFull AdderP, Q and R are binary digitsP + Q + R gives sum value and carry valuehalf-adder #1half-adder #2PQRS1C1CSC2January 14, 2019 Logic Applications 11Parallel AddersParallel AddersChain these half adders and full adders together for multi-bit additionX1X2X3 + Y1Y2Y3 = CA1A2A3 half-adderfull-adderfull-adderX3Y3X2Y2X1Y1A3carrycarrycarryA2A1January 14, 2019 Logic Applications 122's Compliment2's ComplimentTo represent negative values using binary1. Find the binary equivalent of the absolute value.2. Pad on the left to completely fill the bits.3. Switch all of the 1's to 0's and 0's to 1's.4. Add 1 to the result.Find the 8-bit 2's compliment representation of -431. 43102. 10101123. 0010101124. 1101010025. 110101012 =
View Full Document