Focus Groups CMSC 33 Lecture 7 Need good sample of all types of CS students Mon /7 & Thu /2, 2:3p-2:p & 6:p-7:3p Announcement: in-class lab Thu /3 Homework 3 Questions Circuits for Addition Midterm Exam returned UMBC, CMSC33, Richard Chang <chang@umbc.edu>
CMSC 33, Computer Organization & Assembly Language Programming, section Fall 23 Homework 3 Due: October 3, 23. (2 points) Draw schematics for the following functions using AND, OR and NOT gates. (Do not simplify the formulas.) (a) X(Y + Z) (b) X + Y Z (c) X(Y + Z) (d) W(X + Y Z) 2. ( points) Question A.3, page 493, Murdocca & Heuring 3. ( points) Prove the Consensus Theorem AB + AC + BC = AB + AC using the postulates and theorems of Boolean algebra (except the Consensus Theorem itself) in Table A- (p. 45). Hint: use absorption creatively. 4. (4 points) For each CMOS circuit below, (a) Provide a truth table for the circuit s function. (b) For diagram (a), write down the Sum-of-Products (SOP) Boolean formula for the truth table. For diagram (b), wrtie down the Product-of-Sums (POS) Boolean formula. (c) Simplify the SOP or POS formula using the postulates and theorems of Boolean Algebra (p. 45). Show all work. (d) Draw the logic diagram of the simplified formula using AND, OR, NAND, NOR and NOT gates. +5v A +5v A B z B z C D C D GND GND (a) (b)
Last Time Postulates & Theorems of Boolean Algebra Periodic Table & Semiconductors P-N junction Field-Effect Transistors CMOS Logic Gates UMBC, CMSC33, Richard Chang <chang@umbc.edu>
Half Adder Inputs: A and B Outputs: S = lower bit of A + B, c out = carry bit A B S c out Using Sum-of-Products: S = AB + AB, c out = AB. Alternatively, we could use XOR: S = A B.
Adder Inputs: A, B and c in Outputs: S = lower bit of A + B, c out = carry bit A B c in S c out S = ABC + ABC + AB C + ABC = A B C. c out = MAJ3 = AB + BC + AC. 2
3-6 Ripple Carry Adder Two binary numbers A and B are added from right to left, creating a sum and a carry at the outputs of each full for each bit position. b 3 a 3 c 3 b 2 a 2 c 2 b a c b a c c 4 s 3 s 2 s s
3-7 Constructing Larger Adders A 6-bit can be made up of a cascade of four 4-bit ripplecarry s. a 5 a 4 a 3 a 2 b 5 b 4 b 3 b 2 b 3 a 3 b 2 a 2 b a b a c 6 4-Bit Adder #3 c 2 c 4 c... 4-Bit Adder # s 5 s 4 s 3 s 2 s 3 s 2 s s
3-8 Subtractor Truth table and schematic symbol for a ripple-borrow subtractor: a i b i bor i diff i bor i+ b i a i bor i+ subtractor diff i (a i b i ) bori
3-9 Ripple-Borrow Subtractor A ripple-borrow subtractor can be composed of a cascade of full subtractors. Two binary numbers A and B are subtracted from right to left, creating a difference and a borrow at the outputs of each full subtractor for each bit position. b 3 a 3 b 2 a 2 b a b a bor subtractor subtractor subtractor subtractor bor 4 diff 3 diff 2 diff diff
3- Combined Adder/Subtractor A single ripple-carry can perform both addition and subtraction, by forming the two s complement negative for B when subtracting. (Note that + is added at c for two s complement.) b 3 b 2 b b ADD / SUBTRACT a 3 a 2 a a c c 4 s 3 s 2 s s
3-2 Carry-Lookahead Addition Carries are represented in terms of G i (generate) and P i (propagate) expressions. G i = a i b i and P i = a i + b i c = c = G c 2 = G + P G c 3 = G 2 + P 2 G + P 2 P G c 4 = G 3 + P 3 G 2 + P 3 P 2 G + P 3 P 2 P G
3-22 Carry Lookahead Adder b 3 a 3 b 2 a 2 b a b a G 3 P 3 G 2 P 2 G P G Maximum gate delay for the carry generation is only 3. The full s introduce two more gate delays. Worst case path is 5 gate delays. c 4 c 3 c 2 c c s 3 s 2 s s
In-class Labs Homework 3 due Homework 4 assigned Next Time UMBC, CMSC33, Richard Chang <chang@umbc.edu>