SlideServe
Menu
Préférences
© SlideServe · v2026

Computer Science 210 Computer Organization

chiku avatar
14 diapositives · 343 Views · Aug 15, 2014

Computer Science 210 Computer Organization. The Arithmetic Logic Unit. ALU - General. Goal is to design simple ALU Actually there are relatively few basic arithmetic logic operations needed Many instructions can be implemented in terms of the basic ones. AND Gate. Multiplexor. NOT Gate.

Computer Science 210 Computer Organization - slide 1
01 / 14Computer Science 210 Computer Organization
1 / 17

Télécharger la présentation

Computer Science 210 Computer Organization
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Computer Science 210Computer Organization The Arithmetic Logic Unit

  2. ALU - General • Goal is to design simple ALU • Actually there are relatively few basic arithmetic logic operations needed • Many instructions can be implemented in terms of the basic ones

  3. AND Gate Multiplexor NOT Gate ALU Building Blocks OR Gate

  4. operation a result b An ALU (arithmetic logic unit) • Let's build an ALU to support the andi and ori instructions • we'll just build a 1 bit ALU, and use 32 of them

  5. Review: The Multiplexer • Selects one of the inputs to be the output, based on a control input • We’ll use a MUX for our ALU S 01 A C B

  6. 1-Bit Logical Unit Operation Result 01 0 - AndOperation 1 - Or

  7. 1-Bit ALU with Addition O p e r a t i o n C a r r y I n a 0 1 R e s u l t 2 b C a r r y O u t

  8. 32 bit ALU

  9. What about subtraction (a – b) ? • Two's complement approach: just negate b and add one. • How do we negate?

  10. 32 bit ALU binvert binvert O p e r a t i o n C a r r y I n a 0 1 R e s u l t + 0 b 2 1 C a r r y O u t binvert = 1, carryin = 1, operation = 2, gives a + ~b + 1 = a - b

  11. Overflow Detection Note: This can be determined by what happens in the high order bit.

  12. Overflow Detection Note: If we used the output of the binvert MUX, the rows for subtraction would be the same as for addition.

  13. Overflow Detection Note: The other rows of a truth table for Overflow would be 0. So, we could build an overflow detector with _ _ _ AMR + AMR

  14. High Order 1-Bit ALU(with overflow hardware) B i n v e r t O p e r a t i o n C a r r y I n a 0 1 R e s u l t 0 b 2 1 Overflow C a r r y O u t