15
Hanbat Hanbat National National University University 4-Bit Adder-Subtractor 4-Bit Adder-Subtractor Gookyi Dennis A. N. Gookyi Dennis A. N. SoC Design Lab. SoC Design Lab. June.19.2014

4 bit add sub

Embed Size (px)

Citation preview

Page 1: 4 bit add sub

HanbatHanbat

NationalNational

UniversityUniversityHanbatHanbat

NationalNational

UniversityUniversity

4-Bit Adder-Subtractor4-Bit Adder-Subtractor4-Bit Adder-Subtractor4-Bit Adder-Subtractor

Gookyi Dennis A. N.Gookyi Dennis A. N.

SoC Design Lab.SoC Design Lab.

June.19.2014

Page 2: 4 bit add sub

ContentsContents Implementation of Half-Adder Implementation of Full-Adder Implementation of 4-Bit Adder-Subtractor

2

Page 3: 4 bit add sub

Implementation of Half AdderImplementation of Half Adder Truth table

Circuit diagram

3

input1 input2 sum Carry

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

Page 4: 4 bit add sub

Implementation of Half AdderImplementation of Half Adder Half-Adder module

4

Page 5: 4 bit add sub

Implementation of Half AdderImplementation of Half Adder Half-Adder RTL schematic

5

Page 6: 4 bit add sub

Implementation of Full AdderImplementation of Full Adder Truth table

6

input1 input2 Carry_in

sum Carry_out

0 0 0 0 0

0 0 1 1 0

0 1 0 1 0

0 1 1 0 1

1 0 0 1 0

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

Page 7: 4 bit add sub

Implementation of Full AdderImplementation of Full Adder Circuit diagram

7

Page 8: 4 bit add sub

Implementation of Full AdderImplementation of Full Adder Full-Adder module

8

Page 9: 4 bit add sub

Implementation of Full AdderImplementation of Full Adder Full-Adder RTL schematic

9

Page 10: 4 bit add sub

Implementation of 4-Bit Implementation of 4-Bit Adder-SubAdder-Sub Block diagram

10

Page 11: 4 bit add sub

Implementation of 4-Bit Implementation of 4-Bit Adder-SubAdder-Sub Flow chart

11

START

PERFORMSUBTRACTIO

N

PERFORM ADDITION

CARRY_IN == 1?

YESNO

Page 12: 4 bit add sub

Implementation of 4-Bit Implementation of 4-Bit Adder-SubAdder-Sub 4-Bit Adder-Sub module

12

Page 13: 4 bit add sub

Implementation of 4-Bit Implementation of 4-Bit Adder-SubAdder-Sub 4-Bit Adder-Sub testbench

13

Page 14: 4 bit add sub

Implementation of 4-Bit Implementation of 4-Bit Adder-SubAdder-Sub 4-Bit Adder-Sub waveform

14

Page 15: 4 bit add sub

Implementation of 4-Bit Implementation of 4-Bit Adder-SubAdder-Sub 4-Bit Adder-Sub RTL schematic

15