# Cs 121 Ch 4-2 Combinational Logic

## Presentation on theme: "Cs 121 Ch 4-2 Combinational Logic"— Presentation transcript:

Cs 121 Ch 4-2 Combinational Logic
Give qualifications of instructors: DAP teaching computer architecture at Berkeley since 1977 Co-athor of textbook used in class Best known for being one of pioneers of RISC currently author of article on future of microprocessors in SciAm Sept 1995 RY took 152 as student, TAed 152,instructor in 152 undergrad and grad work at Berkeley joined NextGen to design fact 80x86 microprocessors one of architects of UltraSPARC fastest SPARC mper shipping this Fall

Subtractors Half Subtractor Full Subtractor credential:
bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

QUIZ Subtract binary number 11 from 1010 01 10 1 1 1 1 1

1 2 -1 1 Half Subtractor Subtract two binary numbers 0 0 0 0 0 1 1 1
Half-Subtractor (HS), a 2-input bit-wise Subtractor functional block. Subtract two binary numbers A0 , B0 -> single bit inputs D0 -> single bit difference Bo -> Borrow out A B D B Block diagram o A B D o (difference) 1 2 (borrow out) -1 1 Circuit diagram

Logic Simplification: Half Subtractor
The K-Map for Do, Bo is: B A 1 3 2 Do Bo B A Do Å = × + A B A Bo × = A B D o (difference) (borrow out)

QUIZ ? Q#1- What is the difference and borrow outputs from
This half-subtractor circuit? Q#2- What is the difference and borrow outputs from this half-subtractor circuit? Q#3- What is the difference and borrow outputs from this half-subtractor circuit? Q#4- What is the difference and borrow outputs from this half-subtractor circuit? ANS: Di= 0, Bo= 0 ANS: Di= 1, Bo= 0 ANS: Di= 0, Bo= 0 ANS: Di= 1, Bo= 1 (A – B) A = 0 B = 0 (A – B) A = 1 B = 0 (A – B) A = 1 B = 1 (A – B) A = 0 B = 1 ?

Di Same as Si in full adder Full Subtractor Bin Ai Bi Di Bo Bin AiBi
Full-Subtractor (FS), a 3-input bit-wise Subtractor functional block Bin Ai Bi Di Bo Bin AiBi 00 01 11 10 1 1 1 1 1 Di We going to use Ci as Bin Ci+1 as Bo Di = Ci Å (Ai Å Bi) Same as Si in full adder Note: 3 inputs

Ci+1 Full Subtractor Ci AiBi 00 01 11 10 1 Ci Ai Bi Di Ci+1 0 0 0 0 0
Now consider implementation of Borrow out Ci+1 Remember Two outputs per full Subtractor bit (Ci+1, Si) Ci AiBi 00 01 11 10 1 Ci Ai Bi Di Ci+1 1 1 1 1 Ci+1 Ci+1 = !Ai Bi + !Ai !Bi + Ci Ai Bi Note: 3 inputs Note: 2 out- puts

Recall: Full Subtractor Ci+1 = !Ai Bi +Ci !Ai !Bi +Ci Ai Bi
+ Ci(!Ai !Bi + Ai Bi) Ci+1 = !Ai Bi + Ci !(Ai Å Bi) Recall: Di = Ci Å (Ai Å Bi) Ci+1 = !Ai Bi +Ci !(Ai Å Bi)

half subtractor Full Subtractor Di = Ci Å (Ai Å Bi)
Ci+1 = !Ai Bi + Ci !(Ai Å Bi) half subtractor

QUIZ ? Q#1- What are the Difference and Borrow out output from
this full-subtractor circuit? Q#2- What are the Difference and Borrow out output from this full-subtractor circuit? Q#3- What are the Difference and Borrow out output from this full-subtractor circuit? Q#4- What are the Difference and Borrow out output from this full-subtractor circuit? Q#5- What are the Difference and Borrow out output from this full-subtractor circuit? Q#6- What are the Difference and Borrow out output from this full-subtractor circuit? ANSWER: Di = 0, Bo = 0 ANSWER: Di = 1, Bo = 1 ANSWER: Di = 1, Bo = 1 ANSWER: Di = 0, Bo = 1 ANSWER: Di = 1, Bo = 0 ANSWER: Di = 0, Bo = 0 (A – B - Bin) Bin = 0 A = 0 B = 0 (A – B - Bin) Bin = 1 A = 0 B = 0 ? (A – B - Bin) Bin = 1 A = 1 B = 1 (A – B - Bin) Bin = 1 A = 0 B = 1 (A – B - Bin) Bin = 0 A = 1 B = 0 (A – B - Bin) Bin = 0 A = 1 B = 1