Fall 2011
EECS150 Lecture 19
Page 1
EECS150 - Digital Design
Lecture 20 – Arithmetic Blocks 1
November 10, 2011
Elad Alon
Electrical Engineering and Computer Sciences
University of California, Berkeley
Fall 2011
EECS150 Lecture 19
Page 2
Announcements
•
Project checkpoint #4a due this Fri., #4b due next Fri.
–
Be sure to check off even if you aren’t totally finished in order to
receive partial credit
–
The more tests you’ve written, the more credit you will get
•
(Even if you don’t pass all of the tests)
•
No more homeworks
–
Will post an “optional” homework #8 to help you study for the final

Fall 2011
EECS150 Lecture 19
Page 3
Arithmetic Block Design
Fall 2011
EECS150 Lecture 19
Page 4
Carry-ripple Adder Revisited
•
Each cell:
r
i
= a
i
XOR
b
i
XOR
c
in
c
out
= a
i
c
in
+ a
i
b
i
+ b
i
c
in
= c
in
(a
i
+ b
i
) + a
i
b
i
•
4-bit adder:
•
What about subtraction?
“Full adder cell”

Fall 2011
EECS150 Lecture 19
Page 5
Subtractor
A - B = A + (-B)
How do we form -B?
1. complement B
2. add 1
Fall 2011
EECS150 Lecture 19
Page 6
Delay in Ripple Adders
•
Ripple delay amount is a function of the data inputs:
•
What is the critical path?
1
0
0
1
0
1
1
0
0
0
0
0
1
0
1
0
1
1
1
0
0
0
0
0
1
0
1
0
1
1
1
0
0
0
0
1
1
0
1
0
1
1
1
0
0
0
1
1
t
0
t
1
t
2
t
3