design half ,full adder and subtractor

27
Gandhinagar Institute of Technology Topic : “Design half ,full Adder and Subtractor ”. Guided by: Prof. Jatin Chakravarti Digital Electronics() Active Learning Assignment Prepared by : Yash Balani (150120116003) Yogesh Balani (150120116004) Jaimin Darji (150120116013) Branch : IT Division : A(A1)

Upload: jaiminprtltd

Post on 16-Apr-2017

744 views

Category:

Engineering


11 download

TRANSCRIPT

Page 1: Design half ,full Adder and Subtractor

Gandhinagar Institute of Technology

Topic : “Design half ,full Adder and Subtractor ”.Guided by: Prof. Jatin Chakravarti

Digital Electronics()

Active Learning Assignment

Prepared by : Yash Balani (150120116003)Yogesh Balani (150120116004)Jaimin Darji (150120116013)

Branch : ITDivision : A(A1)

Page 2: Design half ,full Adder and Subtractor

Index Adder Half adder Full adder Subtractor Half Subtractor Full Subtractor

Page 3: Design half ,full Adder and Subtractor

Adder An adder is a digital logic circuit in electronics that implements addition of numbers.  In many computers and other kinds of processors, adders are used not only in

the arithmetic logic units, but also in other parts of the processor, where they are used to calculate addresses, increment and decrement operators, and similar operations.

Adders are classified into two types: 1)half adder.

2) full adder.

Page 4: Design half ,full Adder and Subtractor

Let us first take a look at the addition of single bits. 0+0 = 0 0+1 = 1 1+0 = 1 1+1 =10 (i.e. 1+1=0 with carry = 1)

Page 5: Design half ,full Adder and Subtractor

Half Adder The half adder adds two single binary digits A and B.  It has two outputs, sum (S) and carry (C). The carry signal represents an overflow into the next digit of a multi-digit addition.

Page 6: Design half ,full Adder and Subtractor

Truth Table

INPUTS                 OUTPUTS

A             B             SUM      CARRY

0              0              0              0

0              1              1              0

1              0              1              0

1              1              0              1

Page 7: Design half ,full Adder and Subtractor

Solving truth table using K-map

Page 8: Design half ,full Adder and Subtractor

Analysing results No of inputs = 2 No of outputs = 2 Inputs are A , B. Outputs are Sum , Carry. Sum can be obtained using XOR logic gate. Carry can be obtained using AND logic gate.

Page 9: Design half ,full Adder and Subtractor

Designing circuit

Page 10: Design half ,full Adder and Subtractor

Full Adder A full adder adds binary numbers and accounts for values carried in as well as out. The main difference between a half-adder and a full-adder is that the full-adder has three

inputs and two outputs.

A one-bit full adder adds three one-bit numbers, often written as A, B, and Cin.

It has two outputs, sum (S) and carry (Cout).

Page 11: Design half ,full Adder and Subtractor

Truth Table

INPUTS                 OUTPUTSA             B             CIN          COUT    Sum0              0              0              0              00              0              1              0              10              1              0              0              10              1              1              1              01              0              0              0              11              0              1              1              01              1              0              1              01              1              1              1              1

Page 12: Design half ,full Adder and Subtractor

Solving Truth Table using K-Map

Page 13: Design half ,full Adder and Subtractor

Analysing results No of inputs = 3 No of outputs = 2

Inputs are A , B, Cin.

Outputs are Sum , Cout.

Page 14: Design half ,full Adder and Subtractor

Designing circuit

Page 15: Design half ,full Adder and Subtractor

Subtractor

An Subtractor is a digital logic circuit in electronics that implements subtraction of numbers.

 In many computers and other kinds of processors, Subtractor are used not only in the arithmetic logic units, but also in other parts of the processor, where they are used to calculate addresses, increment and decrement operators, and similar operations.

Substractor are classified into two types: 1)half Subtractor.

2) full Subtractor.

Page 16: Design half ,full Adder and Subtractor

Let us first take a look at the subtraction of single bits. 0-0 = 0 0-1 = 11 (i.e. 0-1 = 1 with borrow = 1) 1-0 = 1 1-1 = 0

Page 17: Design half ,full Adder and Subtractor

Half Subtractor The half Subtractor subtracts two single binary digits A and B.  It has two outputs, Difference (D) and borrow (B). The borrow signal represents an overflow into the next digit of a multi-digit subtraction.

Page 18: Design half ,full Adder and Subtractor

Truth Table

INPUTS                 OUTPUTS

A             B           DIFF     BORROW

0              0              0              0

0              1              1              1

1              0              1              0

1              1              0              0

Page 19: Design half ,full Adder and Subtractor

Solving truth table using K-map

Borrow = Ā.B Difference = A ⊕B

Page 20: Design half ,full Adder and Subtractor

Analysing results No of inputs = 2 No of outputs = 2 Inputs are A , B. Outputs are Difference , Borrow. Difference can be obtained using XOR logic gate. Borrow can be obtained using NOT and AND logic gate.

Page 21: Design half ,full Adder and Subtractor

Designing circuit

Page 22: Design half ,full Adder and Subtractor

Full Subtractor A full Subtractor subtracts binary numbers and accounts for values borrowed in as well as

out. The main difference between a half- Subtractor and a full- Subtractor is that the full-

Subtractor has three inputs and two outputs.

A one-bit full Subtractor subtracts three one-bit numbers, often written as A, B, and Bin.

It has two outputs, Difference (D) and borrow (B).

Page 23: Design half ,full Adder and Subtractor

Truth Table

INPUTS                 OUTPUTSA             B             BIN          BOUT    Difference0              0              0              0              00              0              1              1              10              1              0              1              10              1              1              1              01              0              0              0              11              0              1              0              01              1              0              0              01              1              1              1              1

Page 24: Design half ,full Adder and Subtractor

Solving Truth Table using K-Map

Page 25: Design half ,full Adder and Subtractor

Analysing results No of inputs = 3 No of outputs = 2

Inputs are A , B, Bin.

Outputs are Difference , Bout.

Page 26: Design half ,full Adder and Subtractor

Designing circuit

Page 27: Design half ,full Adder and Subtractor

Thank you.