1 / 14

IKI10201 05b-Arithmetic Logic Unit (ALU)

IKI10201 05b-Arithmetic Logic Unit (ALU). Bobby Nazief Semester-I 2005 - 2006. The materials on these slides are adopted from: CS231’s Lecture Notes at UIUC, which is derived from Howard Huang’s work and developed by Jeff Carlyle;

cecile
Download Presentation

IKI10201 05b-Arithmetic Logic Unit (ALU)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IKI10201 05b-Arithmetic Logic Unit (ALU) Bobby Nazief Semester-I 2005 - 2006 • The materials on these slides are adopted from: • CS231’s Lecture Notes at UIUC, which is derived from Howard Huang’s work and developed by Jeff Carlyle; • Prof. Daniel Gajski’s transparency for Principles of Digital Design.

  2. Adders/Subractors: Arithmetic Unit • When Sub = 0, the XOR gates output B3 B2 B1 B0 and the carry in is 0. The adder output will be A + B + 0, or just A + B. • When Sub = 1, the XOR gates output B3’ B2’ B1’ B0’ and the carry in is 1. Thus, the adder output will be a two’s complement subtraction, A - B. • Arithmetic Unit that is capable to do addition & subtraction can be constructed using Full Adders.

  3. Logical Unit • In addtion to arithmetic operations, most computers also support logical operations like AND, OR and NOT, but extended to multi-bit words instead of just single bits. • To apply a logical operation to two words X and Y, apply the operation on each pair of bits Xi and Yi: 1011 AND 1110 1010 1011 OR 1110 1111 1011 XOR 1110 0101

  4. Defining a logic unit • Boolean functions of 2 variables have 2 inputs, 1 output, and 4 minterms • We can generate 16 Boolean functions using 4 (select) variables: the Truth Table: • Boolean Functions: • AND  f8  values of select variables S3S2S1S0 = 1000 • OR  f14  values of select variables S3S2S1S0 = 1110 • ...

  5. Logic unit implementation

  6. Arithmetic-Logic Units (ALUs) • An arithmetic-logic unit, or ALU, performs manydifferentarithmeticandlogicoperations. The ALU is the “heart” of a processor—you could say that everything else in the CPU is there to support the ALU.

  7. One of ALU structures • AE = Arithmetic Extender (Add, Sub, Inc, Dec) • LE = Logic Extender (AND, OR, PASS, NOT)

  8. Additional variables for AE & LE • M: select arithmetic or logic operations • M = 1  ALU will perform arithmetic operation • M = 0  ALU will perform logic operation • S1 & S0: once arithmetic or logic operations has been selected, these 2 variable will select specific operations to be performed by ALU • M = 1  S1 & S0 will select one of Add, Sub, Inc, Dec • M = 0  S1 & S0 will select one of AND, OR, PASS, NOT

  9. Arithmetic Extender • Functional Table: • Implementation: LE’s requirement

  10. Logic Extender • Functional Table: • Truth Table: Conforms with AE’s output satisfy AE

  11. Logic Extender (cont.) • Map & Implementation:

  12. The ALU • If M = 1, then • Xi = ai, Yi = A(bi), c0 = S1 • If M = 0, then • Xi = L(ai,bi), Yi = 0, c0 = 0

  13. ALU function table

  14. ALU’s summary • This ALU is a good example of hierarchical design. • With the 12 inputs, the truth table would have had 212 = 4096 lines. That’s an awful lot of paper. • Instead, we were able to re-use components that we’ve seen before to construct the entire circuit from a couple of easy-to-understand components. • As always, we encapsulate the complete circuit in a “black box” so we can reuse it in fancier circuits.

More Related