Preview

Alu Design

Better Essays
Open Document
Open Document
1534 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Alu Design
Arithmetic Circuits

Goal for Today

Arithmetic
COMP375 Computer Architecture and O d Organization i ti

• Create logic gates that perform arithmetic

Elementary School
17 +7 24 010001 +000111 011000

1 Bit Adder
• A one bit adder has three inputs, numbers A and B and Carry in. There are two outputs, the Sum and Carry out. t t th S dC t
A B

You add two numbers together. If the sum is greater than the number base, you add one to the next column. When you add two numbers, you may also have to add the carry from the column to the right.

Cout

one bit adder

Cin

Sum

COMP375

1

Arithmetic Circuits

Multiple Bit Adder

1 bit Adder Truth Table

A

B

A

B

A

B

Cout

one bit adder

one bit adder

one bit adder

Sum

Sum

Sum figure from textbook

Addition Sum
A’ B’ Cin’ Cin 0 1 A’ B 1 0 A B 0 1 A B’ 1 0 Cin’ Cin

Addition Carry Out
A’ B’ 0 0 A’ B 0 1 A B 1 1 A B’ 0 1

Sum = A’BC’ + AB’C’ + A’B’C + ABC

Cout = AB + BC + AC

COMP375

2

Arithmetic Circuits

One bit adder
01000 + 01001 10001
(8) (9)

Overflow
• If operands are too big, then sum cannot be represented as an n-bit 2’s complement number. carry into sign bit carry out of sign bit

(-15)

11000 + 10111 01111

(-8) (-9) (+15)

• We have overflow if:
– signs of both operands are the same and same, – sign of sum is different.

• Another test -- easy for hardware:
– carry into left most bit does not equal carry out

Detecting Overflow

Intel Status Register

• When the carry into the sign bit does not match the carry out, there is an overflow

COMP375

3

Arithmetic Circuits

Saving Status
Status flag Overflow Sign Zero Carry Detection XOR of carry into and out of the sign bit Copy of the sign bit NOR of all result bits Carry into the sign bit

Intel Status Register
• The status register records the results of executing the instruction. ti th i t ti • Performing arithmetic sets the status register. • The compare instruction does a subtraction, subtraction but doesn t store the results. doesn’t results It just

You May Also Find These Documents Helpful

  • Powerful Essays

    Fnma 2002-046 Cmo Case

    • 9300 Words
    • 38 Pages

    CA(1) ÏÏÏÏÏÏÏÏ CB(1) ÏÏÏÏÏÏÏÏ IC(1) ÏÏÏÏÏÏÏÏ A ÏÏÏÏÏÏÏÏÏÏÏ AB ÏÏÏÏÏÏÏÏÏÏÏ D ÏÏÏÏÏÏÏÏÏÏÏ AC ÏÏÏÏÏÏÏÏÏÏÏ B ÏÏÏÏÏÏÏÏÏÏÏ R ÏÏÏÏÏÏÏÏÏÏÏ…

    • 9300 Words
    • 38 Pages
    Powerful Essays
  • Good Essays

    Management Accounting

    • 660 Words
    • 3 Pages

    B D B A 87 65 4 1 ) %# "   ¨ ¡ £¡…

    • 660 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    ECT114 Week3 Homework

    • 1022 Words
    • 15 Pages

    Z is the output of a NAND gate. The Boolean operator for the NAND gate is , there should be an inversion bar over the entire expression, and the inputs are (A + B) and (C D). Refer to Chapter 3…

    • 1022 Words
    • 15 Pages
    Satisfactory Essays
  • Powerful Essays

    The primary advantage of XS-3 coding over BCD coding is that a decimal number can be nines ' complemented (for subtraction) as easily as a binary number can be ones ' complemented ; just invert all bits. In addition, when the sum of two XS-3 digits is greater than 9, the carry bit of a four bit adder will be set high. This works because, when adding two numbers that are greater or equal to zero, an "excess" value of six results in the sum. Since a four bit integer can only hold values 0 to 15, an excess of six means that any sum over nine will overflow. A code converter is a circuit that makes the two systems compatible even though each uses a different binary code. Our project is to convert a user entered BCD number into Excess-3 using 4:1 MUX. We chose to use multiplexer so as to simplify the circuit and reduce the use of more number of IC’s.…

    • 1915 Words
    • 8 Pages
    Powerful Essays
  • Satisfactory Essays

    U 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0…

    • 803 Words
    • 4 Pages
    Satisfactory Essays
  • Powerful Essays

    Signalling Relays

    • 1636 Words
    • 7 Pages

    ABCEF ABDEF ABCEF ABDEF ABDEF ABCDE ABCDF ABCDE ABCDF ABCDF ACFJX ABCFX ACFJX ABHJX ADFHK…

    • 1636 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    E Business Web 2.0

    • 8526 Words
    • 35 Pages

    dEC E m B E r 2 0 1 0 | vo l . 5 3 | N o. 1 2 | C o m m u n i C aT i o nS o f T hE aCm…

    • 8526 Words
    • 35 Pages
    Good Essays
  • Powerful Essays

    T E C H N O L O G I C A L C H A N G E A N D O P P O R T U N I T I E S E C E MD E V E 2 0 0 1M E N T A S A M OV I N G TA R G E T…

    • 14223 Words
    • 57 Pages
    Powerful Essays
  • Good Essays

    Nautical Science

    • 538 Words
    • 3 Pages

    F#C#G# F#C#G#D# F#C#G# D#A# A#E#B# D#A#E# B bEbA b B bEbA bD b D bGb bEbA bD bGbC b GbC bFb B…

    • 538 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Ca Bbjb Jknkmn Kkmk

    • 5014 Words
    • 21 Pages

    1 4 6 T H E C H A RT E R E D AC C O U N TA N T decem ber 2 0 1 2…

    • 5014 Words
    • 21 Pages
    Powerful Essays
  • Good Essays

    Pandey

    • 1345 Words
    • 6 Pages

    IL R 1 P A 01 2 AY 1 M 1 20 E N 1 JU 01 2 LY 1 JU 01 2 G U 1 A 1 20 T EP 11 S 0 2…

    • 1345 Words
    • 6 Pages
    Good Essays
  • Powerful Essays

    Bhagavad-Gita-in-Tamil

    • 47718 Words
    • 191 Pages

    # ''I HG0&F % % U 5 6 T A V 6 T E4 E4 V X 6 7 A U 5 6 T A 5 6 Y R T 2 B6 B B2 C D 4 4 4 U 56 T A 56 Y R BY 7 V 2QV 6 R B f D 4 4 U 5 6 T A 7 B B6 S A e d 4 U 56 T A 56 Y R T 2 B c ` D 4 U 5 6 T A 5 6 Y R W 92 B X A 2 B X A 4 D 4 4 U 5 6 T A B 54 Y D U 5 6 T A E C 24 B Y b R C R 4 D U 56 T A B a R D D U 5 6 T A T @ ` 96 2 6 T B R 96 2 4 4D U 5 6 T A 7 @ 2 Y4 2 X P 4 U 56 T A E6 W 9 R E6 W 9 4 D 4 U 56 T A E6 T B 4 U 5 6 T A V 6 T E4 E4 V U 5 6 T A V 6 T E4 E4 V 7 24 5 E 6 W 9 4 U 5 6 T A 7 24 5 U 5 6 T A T 54 3 6 V 4 U 5 6 T A B6 S R E Q 924 P D…

    • 47718 Words
    • 191 Pages
    Powerful Essays
  • Powerful Essays

    ceo center

    • 9957 Words
    • 40 Pages

    U n i v e r s i t y o f S o u t h e r n C a l i f o r n i a - L o s A n g e l e s, C A 9 0 0 8 9 – 0 8 0 6…

    • 9957 Words
    • 40 Pages
    Powerful Essays
  • Satisfactory Essays

    Chess Sicilian Defence

    • 2820 Words
    • 12 Pages

    Be2 0-0 f4 Be3 a4 a6 Be7 0-0 Nc6 Qc7 w________w árdbds4kd] àdp1sgp0p]…

    • 2820 Words
    • 12 Pages
    Satisfactory Essays
  • Satisfactory Essays

    LDICA Questions

    • 85 Words
    • 2 Pages

    P V K K Institute of Technology Sanapa Road, Rudrampeta, Anantapuramu Andhra Pradesh, India. Pincode-515001 DEPARTMENT OF ECE Name of the Laboratory: LDIC Applications Lab Name of the Examination: Internal Date: 29/10/2014 S.NO EXPERIMENT NAME EXPERIMENT NUMBER 1 Active Filter Applications – LPF (first order). 5 2 Active Filter Applications – HPF (first order). 6 3 Simulate all Logic Gates 4 4 Half Adder, Half Subtractor 8 5 Full Adder, Full Subtractor 1 6 3-8 Decoder -74138 9 7 8-3 Encoder- 74X148 3 8 8 x 1 Multiplexer -74X151 2 9 2x4 Demultiplexer-74X155 7 10 4 bit Comparator-74X85 10 11 D Flip-Flop 74X74 12 12 JK Flip-Flop 74X109.…

    • 85 Words
    • 2 Pages
    Satisfactory Essays