lecture17

# lecture17 - Page 4 Signed Inequalities b Operands b If...

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

CMPT 150 Arithmetic Operations Page 1 Adding and Subtracting b 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 b Incorporating subtraction: b We want to modify this circuit to add a new input M such that: b M=0: S b A + B b M=1: S b A B b Remember: S b A B = S 3 S 2 S 1 S 0 CMPT 150 Arithmetic Operations Page 2 Four Bit Adder/Subtractor b Note the following: b B 0 = b B 1 = b Note that we lose the ability to add with carry b 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 b We haven’t considered multiply and divide b Real integer units do multiply and divide using an iterative process b Using sequential circuits and multiple cycles b Another possibility is to have a giant look-up table in ROM b Only requires a single cycle b To multiply 2 8-bit numbers requires: b This option is fast, but not cost effective CMPT 150 Arithmetic Operations

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.

Unformatted text preview: Page 4 Signed Inequalities b Operands b If high-order bit is 0 then the number is positive b If high-order bit is 1 then the number is 2s complement (negative) b Comparisons b If both numbers positive: b If one positive, one negative: b If both numbers negative: CMPT 150 Arithmetic Operations Page 5 Sequential Circuits b A logic circuit is sequential if the current output values depend on past as well as current input values. b Assembled by combining combinational circuits with memory emory elements are called ip ops b Memory elements are called flip-flops b Initial attempts at building a flip-flop: x y x Problem: CMPT 150 Arithmetic Operations Page 6 SR Latch b If S=0 and R=0 b b If S=1 and R=0 b S x b b If S=0 and R=1 b b b If S=1 and R=1 b b b R Q S R Q(t+1) 0 0 0 1 1 0 1 1 Characteristic Table...
View Full Document

## This note was uploaded on 04/27/2011 for the course CMPT 150 taught by Professor Dr.anthonydixon during the Spring '08 term at Simon Fraser.

### Page1 / 2

lecture17 - Page 4 Signed Inequalities b Operands b If...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online