{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture17

# lecture17 - CMPT 150 Arithmetic Operations Page 1 CMPT 150...

This preview shows pages 1–2. Sign up to view the full content.

CMPT 150 Arithmetic Operations Page 1 Adding and Subtracting box5 We know how to build a simple adder: FA FA FA FA A 3 B 3 A 2 B 2 A 1 B 1 A 0 B 0 0 C out box5 Incorporating subtraction: box5 We want to modify this circuit to add a new input M such that: box5 M=0: S barb2left A + B box5 M=1: S barb2left A B box5 Remember: S barb2left A B = S 3 S 2 S 1 S 0 CMPT 150 Arithmetic Operations Page 2 Four Bit Adder/Subtractor box5 Note the following: box5 B 0 = box5 B 1 = box5 Note that we lose the ability to add with carry box5 This means we cannot build an 8-bit adder/subtractor by stringing two 4-bit adder/subtractor’s together FA FA FA FA S 3 S 2 S 1 S 0 C out CMPT 150 Arithmetic Operations Page 3 Multiplication & Division box5 We haven’t considered multiply and divide box5 Real integer units do multiply and divide using an iterative process box5 Using sequential circuits and multiple cycles box5 Another possibility is to have a giant look-up table in ROM box5 Only requires a single cycle box5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}