37
Combinational 7 segment, comparator and Adder circuit Digital Logic Design

Combinational circuit (7-Segment display)

  • Upload
    ali9753

  • View
    125

  • Download
    5

Embed Size (px)

DESCRIPTION

An easy approach for designing combinational circuit including 7- Segment display and Adders.

Citation preview

Page 1: Combinational circuit (7-Segment display)

Combinational 7 segment, comparator and Adder circuit

Digital Logic Design

Page 2: Combinational circuit (7-Segment display)

7-Segment Display

a

b

c

d

e

f

g

Page 3: Combinational circuit (7-Segment display)

Inputs Output

A B C D a

0 0 0 0 1

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 1

0 1 1 0 1

0 1 1 1 1

Inputs Output

A B C D a

1 0 0 0 1

1 0 0 1 1

1 0 1 0 X

1 0 1 1 X

1 1 0 0 X

1 1 0 1 X

1 1 1 0 X

1 1 1 1 X

Function Table for Segment ‘a’

Page 4: Combinational circuit (7-Segment display)

Inputs Output

A B C D b

0 0 0 0 1

0 0 0 1 1

0 0 1 0 1

0 0 1 1 1

0 1 0 0 1

0 1 0 1 0

0 1 1 0 0

0 1 1 1 1

Inputs Output

A B C D b

1 0 0 0 1

1 0 0 1 1

1 0 1 0 X

1 0 1 1 X

1 1 0 0 X

1 1 0 1 X

1 1 1 0 X

1 1 1 1 X

Function Table for Segment ‘b’

Page 5: Combinational circuit (7-Segment display)

Inputs Output

A B C D c

0 0 0 0 1

0 0 0 1 1

0 0 1 0 0

0 0 1 1 1

0 1 0 0 1

0 1 0 1 1

0 1 1 0 1

0 1 1 1 1

Inputs Output

A B C D c

1 0 0 0 1

1 0 0 1 1

1 0 1 0 X

1 0 1 1 X

1 1 0 0 X

1 1 0 1 X

1 1 1 0 X

1 1 1 1 X

Function Table for Segment ‘c’

Page 6: Combinational circuit (7-Segment display)

Inputs Output

A B C D d

0 0 0 0 1

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 1

0 1 1 0 1

0 1 1 1 0

Inputs Output

A B C D d

1 0 0 0 1

1 0 0 1 1

1 0 1 0 X

1 0 1 1 X

1 1 0 0 X

1 1 0 1 X

1 1 1 0 X

1 1 1 1 X

Function Table for Segment ‘d’

Page 7: Combinational circuit (7-Segment display)

Inputs Output

A B C D e

0 0 0 0 1

0 0 0 1 0

0 0 1 0 1

0 0 1 1 0

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 0

Inputs Output

A B C D e

1 0 0 0 1

1 0 0 1 0

1 0 1 0 X

1 0 1 1 X

1 1 0 0 X

1 1 0 1 X

1 1 1 0 X

1 1 1 1 X

Function Table for Segment ‘e’

Page 8: Combinational circuit (7-Segment display)

Inputs Output

A B C D f

0 0 0 0 1

0 0 0 1 0

0 0 1 0 0

0 0 1 1 0

0 1 0 0 1

0 1 0 1 1

0 1 1 0 1

0 1 1 1 0

Inputs Output

A B C D f

1 0 0 0 1

1 0 0 1 1

1 0 1 0 X

1 0 1 1 X

1 1 0 0 X

1 1 0 1 X

1 1 1 0 X

1 1 1 1 X

Function Table for Segment ‘f’

Page 9: Combinational circuit (7-Segment display)

Inputs Output

A B C D g

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 1

0 1 0 1 1

0 1 1 0 1

0 1 1 1 0

Inputs Output

A B C D g

1 0 0 0 1

1 0 0 1 1

1 0 1 0 X

1 0 1 1 X

1 1 0 0 X

1 1 0 1 X

1 1 1 0 X

1 1 1 1 X

Function Table for Segment ‘g’

Page 10: Combinational circuit (7-Segment display)

Karnaugh Map for Segment ‘a’

AB\CD 00 01 11 10

00 1 0 1 1

01 0 1 1 1

11 x x x x

10 1 1 x x

DBBDCA

Page 11: Combinational circuit (7-Segment display)

Karnaugh Map for Segment ‘b’

AB\CD 00 01 11 10

00 1 1 1 1

01 1 0 1 0

11 x x x x

10 1 1 x x

CDDCB

Page 12: Combinational circuit (7-Segment display)

Karnaugh Map for Segment ‘c’

AB\CD 00 01 11 10

00 1 1 1 0

01 1 1 1 1

11 x x x x

10 1 1 x x

BDC

Page 13: Combinational circuit (7-Segment display)

Karnaugh Map for Segment ‘d’

AB\CD 00 01 11 10

00 1 0 1 1

01 0 1 0 1

11 x x x x

10 1 1 x x

DCBDCCBDBA

Page 14: Combinational circuit (7-Segment display)

Karnaugh Map for Segment ‘e’

AB\CD 00 01 11 10

00 1 0 0 1

01 0 0 0 1

11 x x x x

10 1 0 x x

DCDB

Page 15: Combinational circuit (7-Segment display)

Karnaugh Map for Segment ‘f’

AB\CD 00 01 11 10

00 1 0 0 0

01 1 1 0 1

11 x x x x

10 1 1 x x

DBCBDCB

Page 16: Combinational circuit (7-Segment display)

Karnaugh Map for Segment ‘g’

AB\CD 00 01 11 10

00 0 0 1 1

01 1 1 0 1

11 x x x x

10 1 1 x x

CBDCCBA

Page 17: Combinational circuit (7-Segment display)

7-Segment Circuit

ab

cd

e

f gLogicCircuit

4-bitBCDinput

7-segmentoutput

Page 18: Combinational circuit (7-Segment display)

Comparator Circuit

• Inputs two 2-bit binary numbers A and B• Has three outputs• A>B • A=B• A<B

Page 19: Combinational circuit (7-Segment display)

Inputs Output

A1 A0 B1 B0 A>B

0 0 0 0 0

0 0 0 1 0

0 0 1 0 0

0 0 1 1 0

0 1 0 0 1

0 1 0 1 0

0 1 1 0 0

0 1 1 1 0

Inputs Output

A1 A0 B1 B0 A>B

1 0 0 0 1

1 0 0 1 1

1 0 1 0 0

1 0 1 1 0

1 1 0 0 1

1 1 0 1 1

1 1 1 0 1

1 1 1 1 0

Function Table for A>B

Page 20: Combinational circuit (7-Segment display)

Inputs Output

A1 A0 B1 B0 A=B

0 0 0 0 1

0 0 0 1 0

0 0 1 0 0

0 0 1 1 0

0 1 0 0 0

0 1 0 1 1

0 1 1 0 0

0 1 1 1 0

Inputs Output

A1 A0 B1 B0 A=B

1 0 0 0 0

1 0 0 1 0

1 0 1 0 1

1 0 1 1 0

1 1 0 0 0

1 1 0 1 0

1 1 1 0 0

1 1 1 1 1

Function Table for A=B

Page 21: Combinational circuit (7-Segment display)

Inputs Output

A1 A0 B1 B0 A<B

0 0 0 0 0

0 0 0 1 1

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

Inputs Output

A1 A0 B1 B0 A<B

1 0 0 0 0

1 0 0 1 0

1 0 1 0 0

1 0 1 1 1

1 1 0 0 0

1 1 0 1 0

1 1 1 0 0

1 1 1 1 0

Function Table for A<B

Page 22: Combinational circuit (7-Segment display)

Karnaugh Map for A>B

A1A0/B1B0

00 01 11 10

00 0 0 0 0

01 1 0 0 0

11 1 1 0 1

10 1 1 0 0

00101011 BAABBABA

Page 23: Combinational circuit (7-Segment display)

Karnaugh Map for A=B

A1A0/B1B0

00 01 11 10

00 1 0 0 0

01 0 1 0 0

11 0 0 1 0

10 0 0 0 1

0101010101010101 BBAABBAABBAABBAA

Page 24: Combinational circuit (7-Segment display)

Karnaugh Map for A<B

A1A0/B1B0

00 01 11 10

00 0 1 1 1

01 0 0 1 1

11 0 0 0 0

10 0 0 1 0

01000111 BBABAABA

Page 25: Combinational circuit (7-Segment display)

Half & Full Adders

A

B

Cout

Inpu

t Bits

Out

put B

its

Half-Adder

A

B

Cin

CoutIn

put B

its

Out

put B

its

Full-Adder

Page 26: Combinational circuit (7-Segment display)

Half-Adder

• Function Table• Expression• Logic Circuit

Page 27: Combinational circuit (7-Segment display)

Half-Adder Function Table

Input Output

A B Sum Carry Out

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

Page 28: Combinational circuit (7-Segment display)

Half-Adder Circuit

A

B

Cout

BABABASum ABCarryOut

Page 29: Combinational circuit (7-Segment display)

Full-Adder

• Function Table• Expression• Logic Circuit

Page 30: Combinational circuit (7-Segment display)

Full-Adder Function Table

Input Output

A B Carry In (C)

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 31: Combinational circuit (7-Segment display)

Sum Expression

ABCCBACBACBASum

)()( BCCBACBCBASum

)()( CBACBASum

CBASum

Page 32: Combinational circuit (7-Segment display)

Carry Out Expression

ABCCABCBABCACarryOut

)()( CCABBABACCarryOut

ABBACCarryOut )(

Page 33: Combinational circuit (7-Segment display)

Full-Adder Circuit

A

B

Cout

C

CBASum ABBACCarryOut )(

Page 34: Combinational circuit (7-Segment display)

Full-Adder

• Full-Adder = Half-Adder + Half-Adder

Page 35: Combinational circuit (7-Segment display)

Full-Adder based on Two Half-Adders

A

B

Cout

Half-Adder

A

B

Cout

Half-Adder

Cin

A

B

Cout

Page 36: Combinational circuit (7-Segment display)

Parallel Binary Adder

• Multiple Single bit Full-Adder connected in Parallel

Page 37: Combinational circuit (7-Segment display)

4-bit Parallel Adder

ABC

in

Cou

t

ABC

in

Cou

t

ABC

in

Cou

t

ABC

in

Cou

t

A0B0A1B1A2B2A3B3

S0S1S2S3Cout

0