Docsity

Combinational Logic-Programming and Computer Logic Design-Lecture Slides, Slides of Digital Logic Design and Programming

Partial preview of the text

Download Combinational Logic-Programming and Computer Logic Design-Lecture Slides and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Combinational Circuits ย„^ consists of logic gates with outputs that are determinedentirely by the present value of the inputs (no memory)^

^

Combinatorial circuits might be 2-level logic (SOP,POS) or multi-level

ย„^ Two important procedure^

Analysis

  • Given circuit schematic, explain its behavior

^ Design

  • Given the specifications, build it

docsity.com

Analysis Procedure1.^ Label all logic gate outputs and primary inputs2.^ Starting from primary inputs, represent outputs in termsof their input variables3.^ Repeat 2, till you reach output4.^ Represent primary output(s) in terms of primary inputsF^ = AB +AC +BC^2 T^ = A +B +C^1 T^ = ABC^2 T^ = F^3

โ€™T^21

F^ = T^1

+T 2

Simplify the F

docsity.com

Design Procedure - Example ย„ Given input bits in BCD, design a circuit to convertinputs to Excess-3 code outputs

Output Excess-3 Code

Input BCD

z y x w D C B A

docsity.com

Example โ€“ K maps

z^ = Dโ€™y^ = CD +Cโ€™Dโ€™= CD + (C +D)โ€™x^ = Bโ€™C +Bโ€™D +BCโ€™Dโ€™= Bโ€™(C +D) +B(C +D)โ€™w^ = A +BC +BD= A +B(C+D)

docsity.com

Binary Adder ย„ Adder is an important component in many logiccircuits ย„ Half Adder(CS)

= x plus y 2

S = xโ€™y +xyโ€™ = x

โŠ•y

C = xy

S
C

y x

x^

y

C^

HA S

docsity.com

Full Adder

C^00010111
S

z y x

(CS)

= x plus y plus z 2

docsity.com

Implementation with 2 Half Adders

x y z^ FA SC

yx HA c 2

z

C

s^1^ HA

c^1

docsity.com

Half Subtractor ย„ Produces x -y^ ย„^

D โ€“ difference ย„ B โ€“ Borrow

D
B

y x

x^

y

B^

HS D

D^ = xโ€™y +xyโ€™ = S of half adderB = xโ€™y

docsity.com

Parallel Adder ย„ Often, we must add 2 n bit numbers and carry ย„ Classical approach^

^

(2n + 1) inputs and (n+1) outputs

Design a (n+1) output, 2-level (e.g. SOP) design

ย„^

Problems

^ Too many gates ^ Fan-in is too large ^ Not practical for n>

ย„^

Use iterative circuit, reduced complexity

docsity.com

Parallel Adder โ€“ 4 Bit Adder ย„ For n = 4^

^

Inputs

^ Outputs

^ Power, Gnd

ย„^

A 4 bit adder is accommodated in 16 pin package (MSI)

b^ a 00

b^1

b^2

b^ n-^

a^1

a^2

a^ n-

s^0

s^1

s^2

sn-

c^1

c^2

c^3

cn-

cn^

FA^

FA^

FA^

FA^

c^0

docsity.com

Carry Lookahead Logic ย„ Define:^

^

Carry Propagate P= a^ i^ i^

โŠ•^ b^ for I = 0, ---- n-1i^

^ Carry Generate^ G

= a^ bi i^

i

^ Now^ s

= a^ โŠ• i i^

b^ โŠ•^ ci^

i

= P โŠ• i^

ci

c= ai+^

b^ + ai^ i^

c^ + bi^ i^

ci^ i

= a^ bi^

+ a^ i^ i^

b^ ยดc^ + aii^

ยดb^ cii^ i

= G^ + ci^

Pi i

docsity.com

Carry Lookahead Logic ย„ Observation^

^

All carries can be generated simultaneously c= G^2

+ P 1 1

c^1

c= G^3

+ P 2 2

c= G^2

+ P 2 2

G+ P^1

Pc 211

c= G^4

+ P 3 3

c= G^3

+ P 3 3

G+ P^2

PG 32

+P 1 3

PPc^21

1

ย„^

Delay

^ P, G

ร†

2 gate delay

^ c

ร†^ 2 gate delay (2-level circuit)

^ S

ร†^ XOR (2-level circuit)

ย„^

6 gate delays; independent of n

^ Practically, n is limited by # of connections and gate loading

docsity.com

4 Bit Adder Subtractor ย„ Desirable to use same hardware for both operations^

^

2โ€™s complement addition for subtraction

ย„^

Overflow

^ Addition/subtraction of 2 n bit numbers may produce n+1 bit output ^ Problem if fixed # of bits (n) are allocated for input and output ^ Must detect its occurrence

docsity.com

BCD Adder

S2^0011001100001100
S1^0101010101010101

k 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Binary Sum

BCD Sum

S
S
C
Z
Z
Z
Z

0 1 2 3 docsity.com