ALU - CoE - ECE 0142 Computer Organization Lecture 4...

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

View Full Document Right Arrow Icon
1 CoE - ECE 0142 Computer Organization Lecture 4 Arithmetic-Logic Unit
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Arithmetic - Logic Unit ALU ± Handles integers ± Does the calculations
Background image of page 2
3 Arithmetic-Logic Unit ALU ± Performs arithmetic add, subtract ± Performs logic and, or, invert, complement ± Shifts right, left, arithmetic, logical ± Provides result and status
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Review Binary Addition Binary Decimal C a r r y 11110 00 11011 27 10110 22 110001 049
Background image of page 4
5 Example Numbers ± 8 bit 2’s complement +127 = 01111111 = 2 7 -1 -128 = 10000000 = -2 7 ± 16 bit 2’s complement +32767 = 011111111 11111111 = 2 15 -1 -32768 = 100000000 00000000 = -2 15
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Sign Extension ± Positive number pack with leading zeros +18 = 00010010 +18 = 00000000 00010010 ± Negative number pack with leading ones -18 = 11101110 -18 = 11111111 11101110 ± i.e. pack with MSB (sign bit)
Background image of page 6
7 Addition and Subtraction ± Normal binary addition circuitry ± Take two’s complement of subtrahend and add to minuend i.e. a - b = a + (-b) ± Need only addition and complement circuits
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Consider Binary Addition Binary C a r r y 1100 0 011 00 110 01 1001 Assume 5 bits 2’s complement arithmetic Carry out 12 - 7 = 12 + (-7) = 5
Background image of page 8
9 Consider Binary Addition Binary C a r r y 00000 01100 10011 011111 Assume 5 bits 2’s complement arithmetic Carry out 12 - 13 = 12 + (-13) = -1
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 ALU Inputs and Outputs
Background image of page 10
11 ALU - Addition C C = A + B Introduce this notation A B Adder 4 4 4 a0 a3 b3 b0 c3 c0 c0 = f(a3,a2,a1,a0,b3,b2,b1,b0) c1 = f(a3,a2,a1,a0,b3,b2,b1,b0) ..... c3=f(a3,a2,a1,a0,b3,b2,b1,b0) Could try this as an 8 input, 4 output combinational logic problem
Background image of page 11

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

View Full DocumentRight Arrow Icon
12 Instead - Consider Stages Depends on 1’s or 2’s comp arithmetic FA - Full Adder
Background image of page 12
13 Full Adder AB C in SC 00000 00110 01010 01101 10010 10101 11001 11111 Truth Table S = A’B’C in + A’BC in ’+ AB’C in ’ + ABC in = A B C in C = A’BC in + AB’C in + ABC in ’ + ABC in = AB + AC in + BC in
Background image of page 13

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

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/01/2009 for the course COE 0142 taught by Professor Staff during the Summer '08 term at Pittsburgh.

Page1 / 35

ALU - CoE - ECE 0142 Computer Organization Lecture 4...

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

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