lecture24 - b We also need b R b A + B with carry b R b A B...

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

View Full Document Right Arrow Icon
CMPT 150 The ALU Page 1 Confusing Notation b In boolean expressions: + means OR • means AND b In RTL micro-operations: + means ADD • means MULTIPLY means OR means AND b RTL guard micro operations use both E.g. CMPT 150 The ALU Page 2 Basic Set of Micro-operations Arithmetic micro-operations Addition Subtraction Increment Decrement One’s complement Two’s complement Logical micro-operations And Or Xor Complement CMPT 150 The ALU Page 3 Recall: Four Bit Adder/Subtractor b We built an adder/subtractor circuit before: b Remember that we lost the ability to add with carry b I.e. we cannot build an 8-bit adder/subtractor by composing two 4-bit adder/subtractors together FA FA FA FA S 3 S 2 S 1 S 0 C out CMPT 150 The ALU Page 4 Generalizing the Adder/Subtractor b The previous adder/subtractor circuit gave us: b R b A + B without carry b R b A – B without borrow
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b We also need b R b A + B with carry b R b A B with borrow b R b A + 1 b R b A 1 b Can we do this with one adder? b Each is like adding, but with different inputs b We can use a multiplexer! CMPT 150 The ALU Page 5 One-bit of General Adder/Subtractor S 1 S 0 1 2 3 4x1 ux S 1 S C in adder input bit output 1 FA R Mux 1 1 1 1 1 1 1 1 1 1 1 CMPT 150 The ALU Page 6 Four-bit Integer Unit S 1 S 0 1 2 3 4x1 Mux 0 1 S 1 S B S 1 S 0 1 2 3 4x1 Mux 0 1 S 1 S B 1 S 1 S 0 1 2 3 4x1 Mux 0 1 S 1 S B 2 S 1 S 0 1 2 3 4x1 Mux 0 1 S 1 S B 3 C in b We choose the function based on: b Is this a combinational or sequential circuit? FA R A FA R 1 A 1 FA R 2 A 2 FA R 3 A 3 C out...
View Full Document

Page1 / 2

lecture24 - b We also need b R b A + B with carry b R b A B...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online