Top Banner
Switching Theory and Logic Design Combinational Logic Design
41

Switching Theory and Logic Design

May 15, 2017

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Switching Theory and Logic Design

Switching Theory and Logic Design

Combinational Logic Design

Page 2: Switching Theory and Logic Design

Overview

• Introduction• Design using conventional logic gates– Adder– Subtractor– Multiplier– Magnitude Comparator

• Encoder• Decoder• Multiplexer• De-Multiplexer

Page 3: Switching Theory and Logic Design

Introduction

Page 4: Switching Theory and Logic Design

Combination Logic Example

Page 5: Switching Theory and Logic Design

Design using conventional logic gatesAdders-Half Adder

0 + 0 = 00 + 1 = 11 + 0 = 11 + 1 = 10

Page 6: Switching Theory and Logic Design

Design using conventional logic gatesAdders-Full Adder

Page 7: Switching Theory and Logic Design

Design using conventional logic gatesFull Adder-Using 2 Half Adders

Page 8: Switching Theory and Logic Design

4-bit Binary Adder or Ripple Carry Adder

• Addition of n-bit numbers requires a chain of n full adders or a chain of one-half adder and n-1 full adders

• If we use Classical method, then 29 = 512 entries for 9-inputs in truth table as seen in half and full adders

Page 9: Switching Theory and Logic Design

Adders-Carry Propagation• In ripple carry adder the propagation delay in each stage will add up to the final stage.• Pi (Carry Propagate)and Gi (carry generate) settle to steady-state after propagating

through respective gates.• Form input Ci to output Ci + 1carry propagates through AND and OR.• In n-bit adder, 2n gates for carry between input and output• To reduce carry propagation Carry Lookahead logic is widely used

Page 10: Switching Theory and Logic Design

4-bit Carry stage

Page 11: Switching Theory and Logic Design

4-bit Carry Lookahead Adder

Page 12: Switching Theory and Logic Design

Design using conventional logic gatesSubtractor-Half subtractor

0 + 0 = 00 + 1 = 1 with barrow 11 + 0 = 11 + 1 = 0

Page 13: Switching Theory and Logic Design

Design using conventional logic gatesSubtractor-Full subtractor

Page 14: Switching Theory and Logic Design

4-bit Adder-Subtractor

If M=0 and Co=0, then above circuit acts as 4-bit adder If M=1 and Co=1, then above circuit acts as 4-bit subtractor

Page 15: Switching Theory and Logic Design

Binary Multiplier-(2-bit by 2-bit)

Page 16: Switching Theory and Logic Design

Binary Multiplier-(4-bit by 3-bit)

Page 17: Switching Theory and Logic Design

Magnitude Comparator• It is a combination circuit which compares two numbers A and B.• A = B, A > B, A < B

Page 18: Switching Theory and Logic Design

4-bit Magnitude Comparator

Page 19: Switching Theory and Logic Design

Encoders• An Encoder has 2^n (or fewer) input and n outputs• An example of octal to binary encoder is discussed below• encode discussed below has limitation that only one input must be active• Ambiguity between all input 0’s and Do

Page 20: Switching Theory and Logic Design

Priority Encoder

Page 21: Switching Theory and Logic Design

Four Input Priority Encoder

Page 22: Switching Theory and Logic Design

Decoders

Page 23: Switching Theory and Logic Design

Decoder (2 to 4)- Active Low• Decoder given here has

• Active low Enable (E) input• Active low outputs (D0, D1,D2, D3)• Active high inputs (A and B)

Page 24: Switching Theory and Logic Design

Decoder (3 to 8)

Page 25: Switching Theory and Logic Design

Decoder (4 to 16)

Page 26: Switching Theory and Logic Design

Combination Logic Design

Page 27: Switching Theory and Logic Design

Multiplexer

• 2^n inputs• n selection lines• 1 output

Page 28: Switching Theory and Logic Design

Multiplexer (2 to 1)

Page 29: Switching Theory and Logic Design

Multiplexer (4 to 1)

Page 30: Switching Theory and Logic Design

Multiplexer (Quadruple 2 to 1)

Page 31: Switching Theory and Logic Design

Combinational Logic Design (Eg.1)

Page 32: Switching Theory and Logic Design

Combinational Logic Design (Eg.2)

Page 33: Switching Theory and Logic Design
Page 34: Switching Theory and Logic Design

Design using conventional logic gatesAdders-Half Adder

Page 35: Switching Theory and Logic Design

Design using conventional logic gatesAdders-Full Adder

Page 36: Switching Theory and Logic Design

Design using conventional logic gatesFull Adder-Using 2 Half Adders

Page 37: Switching Theory and Logic Design

Design using conventional logic gatesSubtractor-Half Subtractor

Page 38: Switching Theory and Logic Design

Design using conventional logic gatesSubtractor-Full Subtractor

D=A XOR B XOR CBOR_out = A’ B + (A XOR B)’ B_in

Page 39: Switching Theory and Logic Design

4 to 2 Encoder

Page 40: Switching Theory and Logic Design

2 to 4 Decoder

Page 41: Switching Theory and Logic Design

Decoder