1 / 14

CSSE 132 Arithmetic Logic Unit

CSSE 132 Arithmetic Logic Unit. Monday, September 16, 2019. Adapted from CMU 15-213/18-213/15-513. Questions. ALU is an "all-in-one" circuit that perform multiple operations. It can do AND, OR, ADD and more  How to select an operation? Multiplex How to build an arithmetic logic unit?

cindys
Télécharger la présentation

CSSE 132 Arithmetic Logic Unit

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. CSSE 132Arithmetic Logic Unit Monday, September 16, 2019 Adapted from CMU 15-213/18-213/15-513

  2. Questions • ALU is an "all-in-one" circuit that perform multiple operations. • It can do AND, OR, ADD and more  • How to select an operation? • Multiplex • How to build an arithmetic logic unit? • AND,OR, ADD, SUB, SLT and etc. • How to extend to multi-bit?

  3. Introduce ALU (Arithmetic Logic Unit) • The “brawn” of the computer

  4. Mutiplexer • Given inputs A and B, we also need a “selector” to choose what we want to perform

  5. Multiplexer

  6. Build a bit Multiplexer (cont.) • Given input A, B, and S

  7. ALU (Arithmetic Logic Unit) • Introduce the “opcode” – the selector

  8. ALU (adding Addition) • Basic one-bit ALU with addition

  9. ALU (adding Subtraction ) • + 1 • Add “binvert” • Set CarryIn to 1 for the least significant bit

  10. Multibit ALU Op(2) • A 32-bit ALU

  11. Multibit ALU (adding Set Less Than) • Set when is less than. (slt) • ”Less” as input and “set” as output • The sign bit of MSB • Connect the MSB to LSB of less: e.g, 0..001

  12. 1-bit ALU with SLT

  13. 32-bit ALU w SLT

  14. Multibit ALU (Overflow detection) • Only matters in MSB ALU

More Related