Example

advertisement

Design Of Combinational Logic Circuits

ACOE161 Digital Circuit Design 1

Design of combinational digital circuits

• Steps to design a combinational digital circuit:

– From the problem statement derive the truth table

– From the truth table derive the unsimplified logic expression

– Simplify the logic expression

– From the simplified expression draw the logic circuit

Example: Design a 3-input (A,B,C) digital circuit that will give at its output (X) a logic 1 only if the binary number formed at the input has more ones than zeros.

6

7

4

5

0

1

2

3

1

1

1

1

0

0

Inputs

A B C

0 0 0

0

0

1

1 1

1

0

0

0

1

1

0

1

0

1

Output

X

0

0

0

1

1

1

0

1

X

= е

(3, 5, 6, 7)

A

BC

00

0

01 11 10

0 0 1 0

1 0 1 1 1

X

=

AC

+

AB

+

BC

A B C

X

ACOE161 Digital Circuit Design 2

Design of combinational digital circuits (Cont.)

• Example: Design a 4-input (A,B,C,D) digital circuit that will give at its output (X) a logic 1 only if the binary number formed at the input is between 2 and 9 (including).

12

13

14

15

8

9

10

11

6

7

4

5

2

3

0

1

0

1

0

1

0

1

0

1

0

1

0

1

D

0

1

0

1

0 1

0 1

0 1

1 0

1 0

1 0

1 0

1 1

Inputs

A B C

0 0 0

0 0

0 0

0 0

0 1

1

0

0

1

1 1

1 1

1 1

0

1

1

1

0

0

1

1

0

0

1

0

0

1

0

1

1

1

1

Output

X

0

1

1

0

1

0

0

0

ACOE161

X

= е

(2,3,4,5,6 ,7,8,9)

AB

CD

00

00

01 11 10

0 0 1 1

01

11

1

0

1

0

1

0

1

0

10 1 1 0 0

X

=

A C

+

A B

+

A B C

A

Digital Circuit Design

B C D

X

X

Same

3

Design of combinational digital circuits (Cont.)

• Example: Design a 4-input (A,B,C,D) digital circuit that will give at its output (X) a logic 1 only if the binary number formed by the inputs (AB) is greater or equal to the binary number formed by the inputs (CD).

8

9

10

11

12

13

14

15

6

7

4

5

2

3

0

1

0 1

0 1

0 1

1 0

1 0

1 0

1 0

1 1

1 1

1 1

1 1

Inputs

A B C

0 0 0

0 0

0 0

0 0

0 1

1

0

0

1

1

0

0

0

1

1

1

1

0

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

D

0

1

Output

ACOE161

AB

CD

00

00

01 11 10

01

11

10

A

Digital Circuit Design

B C D

X X

4

• Tutorial: Design a 4-input (A,B,C,D) digital circuit that will give at its output a binary number equal to the sum of the binary numbers formed by the inputs (AB) and (CD).

1

0

1

0

1

0

1

0

1

D

0

1

0

1

0

1

0

1 0

1 0

1 1

1 1

1 1

1 1

0 1

0 1

0 1

0 1

1 0

1 0

A B C

0 0 0

0 0

0 0

0 0

0

1

1

1

0

0

0

0

1

0

1

1

1

1

0

7

8

9

4

5

6

0

1

2

3

13

14

15

10

11

12

ACOE161

X =

AB

CD

00

00

01 11 10

01

11

10

W =

AB

CD

00

00

01 11 10

01

11

10

Digital Circuit Design

Y =

AB

CD

00

00

01 11 10

01

11

10

Z =

AB

CD

00

00

01 11 10

01

11

10

5

C

D

'0'

'1'

X =

W =

A

B

ACOE161

Y =

Z=

Digital Circuit Design 6

• Tutorial: Design a 4-input (A,B,C,D) digital circuit that will give at the output:

– X a logic 1 if the binary number formed by the inputs (AB) is greater than (CD).

– Y a logic 1 if the binary number formed by the inputs (AB) is less than (CD).

– Z a logic 1 if the binary number formed by the inputs (AB) is equal to (CD).

1

0

1

0

1

0

1

0

1

D

0

1

0

1

0

1

0

1 0

1 0

1 1

1 1

1 1

1 1

0 1

0 1

0 1

0 1

1 0

1 0

A B C

0 0 0

0 0

0 0

0 0

0

1

1

1

0

0

0

0

1

0

1

1

1

1

0

7

8

9

4

5

6

0

1

2

3

13

14

15

10

11

12

X =

W =

AB

CD

00

00

01 11 10

01

11

10

AB

CD

00

00

01 11 10

01

11

10

Y =

Z =

AB

CD

00

00

01 11 10

01

11

10

AB

CD

00

00

01 11 10

01

11

10

ACOE161 Digital Circuit Design 7

C

D

'0'

'1'

X =

W =

A

B

ACOE161

Y =

Z=

Digital Circuit Design 8

• Homework: Design a 4-input (A,B,C,D) digital circuit that will give at the output:

– X a logic 1 if in the binary number formed at the inputs there are more zeros than ones.

– Y a logic 1 if in the binary number formed at the inputs there are less zeros than ones.

– Z a logic 1 if in the binary number formed at the inputs there equal zeros and ones.

1

0

1

0

1

0

1

0

1

D

0

1

0

1

0

1

0

1 0

1 0

1 1

1 1

1 1

1 1

0 1

0 1

0 1

0 1

1 0

1 0

A B C

0 0 0

0 0

0 0

0 0

0

1

1

1

0

0

0

0

1

0

1

1

1

1

0

7

8

9

4

5

6

0

1

2

3

13

14

15

10

11

12

X =

W =

AB

CD

00

00

01 11 10

01

11

10

AB

CD

00

00

01 11 10

01

11

10

Y =

Z =

AB

CD

00

00

01 11 10

01

11

10

AB

CD

00

00

01 11 10

01

11

10

ACOE161 Digital Circuit Design 9

C

D

'0'

'1'

X =

W =

A

B

ACOE161

Y =

Z=

Digital Circuit Design 10

• Homework: Design a 4-input (A,B,C,D) digital circuit that will give at its output a binary number equal to the product of the binary numbers formed by the inputs (AB) and (CD).

1

0

1

0

1

0

1

0

1

D

0

1

0

1

0

1

0

1 0

1 0

1 1

1 1

1 1

1 1

0 1

0 1

0 1

0 1

1 0

1 0

A B C

0 0 0

0 0

0 0

0 0

0

1

1

1

0

0

0

0

1

0

1

1

1

1

0

7

8

9

4

5

6

0

1

2

3

13

14

15

10

11

12

ACOE161

X =

AB

CD

00

00

01 11 10

01

11

10

W =

AB

CD

00

00

01 11 10

01

11

10

Digital Circuit Design

Y =

Z =

AB

CD

00

00

01 11 10

01

11

10

AB

CD

00

00

01 11 10

01

11

10

11

C

D

'0'

'1'

X =

W =

A

B

ACOE161

Y =

Z=

Digital Circuit Design 12

Don’t Care Conditions

• In many application it is known in advance that some of the input combinations will never occur. These combinations are marked as “Don’t Care Conditions” and are used as either zero’s or one’s so that the application is implemented with the most simplified circuit.

• Example: Simplify the logic expression X(A,B,C,D) with the don’t care conditions d(A,B,C,D).

X = (6,7,12,13,14) d = (3,4,8,11,15)

AB

CD

00

00

01 11 10

0 0 X 0

01 X 0 1 1

11 1 1 X 1

10 X 0 X 0

X = BC + AB

ACOE161 Digital Circuit Design 13

AB

CD

00

00

01 11 10

01

11

10

ACOE161

AB

CD

00

00

01 11 10

01

11

10

Don’t Care Conditions: Examples

AB

CD

00

00

01 11 10

01

11

10

AB

CD

00

00

01 11 10

01

11

10

Digital Circuit Design

AB

CD

00

00

01 11 10

01

11

10

AB

CD

00

00

01 11 10

01

11

10

14

• Homework: Design a digital circuit that has as input a 1-digit Binary Coded Decimal

(BCD) number. The circuit must give at its output a binary number equal to the absolute value of (2M – 5), where M is the number formed at the input.

1

0

1

0

1

0

1

0

1

D

0

1

0

1

0

1

0

1 0

1 0

1 1

1 1

1 1

1 1

0 1

0 1

0 1

0 1

1 0

1 0

A B C

0 0 0

0 0

0 0

0 0

0

1

1

1

0

0

0

0

1

0

1

1

1

1

0

7

8

9

4

5

6

0

1

2

3

13

14

15

10

11

12

ACOE161

X =

AB

CD

00

00

01 11 10

01

11

10

W =

AB

CD

00

00

01 11 10

01

11

10

Digital Circuit Design

Y =

Z =

AB

CD

00

00

01 11 10

01

11

10

AB

CD

00

00

01 11 10

01

11

10

15

C

D

'0'

'1'

X =

W =

A

B

ACOE161

Y =

Z=

Digital Circuit Design 16

1

0

1

0

1

0

1

0

1

D

0

1

0

1

0

1

0

1 0

1 0

1 1

1 1

1 1

1 1

0 1

0 1

0 1

0 1

1 0

1 0

A B C

0 0 0

0 0

0 0

0 0

0

1

1

1

0

0

0

0

1

0

1

1

1

1

0

7

8

9

4

5

6

0

1

2

3

13

14

15

10

11

12

ACOE161

X =

AB

CD

00

00

01 11 10

01

11

10

W =

AB

CD

00

00

01 11 10

01

11

10

Digital Circuit Design

Y =

AB

CD

00

00

01 11 10

01

11

10

Z =

AB

CD

00

00

01 11 10

01

11

10

17

C

D

'0'

'1'

X =

W =

A

B

ACOE161

Y =

Z=

Digital Circuit Design 18

Mapping to NAND gates

• Assumptions:

– Gate loading and delay are ignored

– Cell library contains an inverter and n -input NAND gates, n

= 2, 3, …

– An AND, OR, inverter schematic for the circuit is available

• The mapping is accomplished by:

– Replacing AND and OR symbols,

– Pushing inverters through circuit fan-out points, and

– Canceling inverter pairs

ACOE161 Digital Circuit Design 19

NAND Mapping Algorithm

1.

Replace ANDs and ORs:

.

.

.

.

.

.

.

.

.

.

.

.

2.

Repeat the following pair of actions until there is at most one inverter between : a.

A circuit input or driving NAND gate output, and b.

The attached NAND gate inputs.

.

.

.

.

.

.

ACOE161 Digital Circuit Design 20

NAND Mapping Example

ACOE161 Digital Circuit Design 21

Mapping to NOR gates

• Assumptions:

– Gate loading and delay are ignored

– Cell library contains an inverter and n -input NOR gates, n =

2, 3, …

– An AND, OR, inverter schematic for the circuit is available

• The mapping is accomplished by:

– Replacing AND and OR symbols,

– Pushing inverters through circuit fan-out points, and

– Canceling inverter pairs

ACOE161 Digital Circuit Design 22

NOR Mapping Algorithm

1.

Replace ANDs and ORs:

.

.

.

.

.

.

.

.

.

.

.

.

2.

Repeat the following pair of actions until there is at most one inverter between : a.

A circuit input or driving NAND gate output, and b.

The attached NAND gate inputs.

.

.

.

.

.

.

ACOE161 Digital Circuit Design 23

A

B

C

D

E

ACOE161

(a)

NOR Mapping Example

A

B

F

1

X

3

2

C

D

E

C

D

E

A

B

(b)

F

(c)

Digital Circuit Design 24

F

Download