mehmet can vuran instructor university of nebraska lincoln n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CSCE 230, Fall 2013 Constructing a Basic Arithmetic and Logic Unit (ALU) PowerPoint Presentation
Download Presentation
CSCE 230, Fall 2013 Constructing a Basic Arithmetic and Logic Unit (ALU)

Loading in 2 Seconds...

play fullscreen
1 / 14

CSCE 230, Fall 2013 Constructing a Basic Arithmetic and Logic Unit (ALU) - PowerPoint PPT Presentation


  • 101 Views
  • Uploaded on

Mehmet Can Vuran , Instructor University of Nebraska-Lincoln. CSCE 230, Fall 2013 Constructing a Basic Arithmetic and Logic Unit (ALU). Acknowledgement : Schematics adapted from those provided by the authors Hennessey and Patterson. Basic ALU. Common functions AND OR NAND NOR

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CSCE 230, Fall 2013 Constructing a Basic Arithmetic and Logic Unit (ALU)' - moana-marshall


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
mehmet can vuran instructor university of nebraska lincoln
Mehmet Can Vuran, Instructor

University of Nebraska-Lincoln

CSCE 230, Fall 2013Constructing a Basic Arithmetic and Logic Unit (ALU)

Acknowledgement: Schematics adapted from those provided by the authors

Hennessey and Patterson.

basic alu
Basic ALU
  • Common functions
    • AND
    • OR
    • NAND
    • NOR
    • Add
    • Sub
basic alu1
Basic ALU
  • Common functions
    • AND
    • OR
    • NAND
    • NOR
    • Add
    • Sub
logical operations bitwise
Logical Operations (Bitwise)

A0

R0

B0

Symbol:

A1

R1

B1

A

R

B

A2

R2

B2

A

R

A3

B

R3

B3

binary addition s a b
Binary Addition S=A+B

A: 1 0 0 1

B: 0 1 0 1

C: 0 0 0 1 0

1 1 1 0

Basic Building Block:

Ai

Bi

C3

C2

C1

C4

S2

S0

S1

S3

Full

Adder

Ci+1

Ci

Truth Table:

A: A3 A2 A1 A0

B: B3 B2 B1 B0

C:

Si

C0

adder ripple carry
Adder (Ripple-Carry)

A0

A3

A2

A1

B0

B3

B1

B2

C3

C2

C4

C1

S2

S0

S1

S3

Full

Adder

Full

Adder

Full

Adder

Full

Adder

C2

C3

C1

C4

C0=0

S2

S3

S1

S0

A-B ?

A: A3 A2 A1 A0

B: B3 B2 B1 B0

C:

C0

subtractor a b in 2 s comp
Subtractor (A-B) in 2’s Comp.

A0

A3

A1

A2

B’0

B’3

B’1

B’2

Full

Adder

Full

Adder

Full

Adder

Full

Adder

C3

C2

C4

C1

C0=1

S2

S0

S1

S3

adder a b subtractor a b
Adder (A+B)/ Subtractor (A-B)

Add/Sub

B0

B1

B2

B3

A1

A3

A2

A0

Full

Adder

Full

Adder

Full

Adder

Full

Adder

C4

C3

C1

C2

S3

S2

S1

S0

A

B

Any other way?

B-A ?

Basic

ALU

Function

Select F:

0: Add

1: Sub

Symbol:

Carry C

S

alu with more functions
ALU with More Functions

G

F,G

A

AND

00

B

A

ALU

R

OR

B

01

R

F

C

MUX

A

ADD/

SUB

Basic

ALU

10

A

B

B

C

alu with more functions1
ALU with More Functions

G

F,G

A

AND

00

B

A

ALU

R

OR

B

01

R

F

C

MUX

A

ADD/

SUB

Basic

ALU

10

A

B

B

C

flags
Flags
  • Carry (C): Already seen in the design of Adder/Subtractor
  • Overflow (V): Next slide
  • Sign (N): Just the sign bit
  • Zero (Z): Zero result

Exercise: Add logic to the ALU design to

generate V, N and Z flags.

overflow detection in add subtract

carry-in

carry-out

!=

Overflow

Overflow Detection in Add/Subtract
  • Use the rule:
    • Carry-in to Sign-bit != Carry-out of Sign-bit

What is the truth table?

Exercise: Find the logic to implement overflow by other

rules discussed earlier.

doing logical nor and nand
Doing Logical Nor and Nand
  • Both A and B can be inverted before arithmetic and logical operations.
  • If Ainvert = Binvert = 1 and Operation = 00, we do:
    • A’ and B’ = A nor B
  • Similarly, Nand with Operation = 01.
  • Doing both A-B and B-A will require connecting Carryinvia a mux.

Fig. B.5.9

upcoming
Upcoming…
  • Quiz 3 – Chapter 3
    • Friday, Oct. 11th (15 min)
  • Midterm – Chapter 1, 2, 3
    • Wednesday, Oct. 23rd (50 min)
  • Quiz 4 – Chapter A
    • Monday, Oct. 28th (15 min)
  • Test 2 – Chapters A & 5
    • Monday, Nov. 4th (50 min)