Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Muxes and Encoders - Digital System Design - Lecture Slides, Slides of Digital Systems Design

The digital system design, is very helpful series of lecture slides, which made programming an easy task. The major points in these laboratory assignment are:Muxes and Encoders, Shannon’s Expansion, Tri-State Buffers, Equivalent Circuits, Types of Tri-State Buffers, Crossbar Switch, Using Muxes for Synthesis, Combinational Devices, Boolean Function, Selector Control Input

Typology: Slides

2012/2013

Uploaded on 04/24/2013

baijayanthi
baijayanthi 🇮🇳

4.5

(13)

171 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Shannon’s Expansion
Muxes and Encoders
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Muxes and Encoders - Digital System Design - Lecture Slides and more Slides Digital Systems Design in PDF only on Docsity!

Shannon’s Expansion

Muxes and Encoders

 Tri-State Buffers

 A tri-state buffer has one input x, one output f and

one control line e

 Z means high impedance, i.e. no output at all

x f
e
x f
e = 0
e = 1
x f

Equivalent circuits normal tri-state buffer symbol e x f 0 0 z 0 1 z 1 0 0 1 1 1

 2x1 MUX Using Tri-State Buffers

 Tri-state buffers can be used in place of SOP form

 Note – this is the one case where the output lines can just

be “tied together”

 The control line s selects which buffer will pass its input

f w 0 w 1 s

 Crossbar Switch

 A crossbar switch connects any input to any output

 A 2x2 crossbar connects 2 inputs to 2 outputs

 You can route each input straight thru, or cross them

 When s = 0, y1 = x1 and y2 = x2 (no switching)

 When s = 1, y1 = x2 and y2 = x1 (switched)

x 1 x 2 y 1 y 2 s

 Using MUXes for Synthesis

 MUXes are very significant combinational devices

 MUXes are a key component of FPGAs (field

programmable gate arrays) – to be discussed soon

 MUXes can be used to synthesize any combinational

logic function

 Makes use to Shannon's expansion

 Shannon's Expansion

 Any Boolean function f(w

,w

,…,w

n

) can be written in

the form

f(w

,w

,…,w

n

) = w

' f(0,w

,…,w

n

) + w

f(1,w

,…,w

n

 w

acts as the selector control input and it selects between

f(0,w

,…,w

n

) and f(1,w

,…,w

n

 f(0,w

,…,w

n

) is called the cofactor of f with respect to w

 f(1,w

,…,w

n

) is called the cofactor of f with respect to w

 Example: f(w

,w

,w

) = w

w

+ w

w

+ w

w

 w 1 ' f(0,w 2 ,w 3 ) + w 1 f(1,w 2 ,w 3 ) = w 1 ' (w 2 w 3 ) + w 1 (w 2 + w 3 )

 More Shannon's Expansion Examples

 f(w

,w

,w

) = w

'w

' + w

w

+ w

w

 Expand on w

 f(w 1 ,w 2 ,w 3 ) = w 1 ' f(0, w 2 ,w 3 ) + w 1 f(1,w 2 ,w 3 ) =

w 1 ' (w 3 ') + w 1 (w 2 + w 3 )

 Use a 2x1 MUX

0 1

 Same Example ….

 f(w

,w

,w

) = w

'w

' + w

w

+ w

w

 Expand on both w

and w

 f(w 1 ,w 2 ,w 3 ) = w 1 'w 2 'f(0,0,w 3 ) + w 1 'w 2 f(0,1,w 3 ) +

w 1 w 2 'f(1,0,w 3 ) + w 1 w 2 f(1,1,w 3 ) =

w 1 'w 2 '(w 3 ') + w 1 'w 2 (w 3 ') + w 1 w 2 '(w 3 ) + w 1 w 2 (1)

 Use a 4x1 MUX

 Example Continued …

 f(w

,w

,w

) = w

'(g) + w

(h)

 where g = w 2 w 3

 where h = w 2 +w 3 +w 2 w 3

 Expanding g on w 2 gives

g = w

'(0) + w

(w

 Expanding h on w

gives

h = w

'(w

) + w

w 2 0 w 3 1 f w 1

 Last Example: Use Only a 4x1 MUX

 Try this one: f(w

,w

,w

) =  m (3,5,6,7)

 f = w

'w

w

+ w

w

'w

+ w

w

w

' + w

w

w

 Use a 4x1 MUX by expanding on both w

and w

 f = w 1 'w 2 '(0) + w 1 'w 2 (w 3 ) + w 1 w 2 '(w 3 ) + w 1 w 2 (1)

f w 1 0 w 2 1 w 3

 4 to 2 Encoder

 A 4 to 2 encoder encodes a 4 bit one-hot input into a

2 bit binary encoded output

w 3 w 2 w 1 w 0 y 1 y 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 y^ y 0 1 w 1 w 0 w 2 w 3

 Building Encoders

 Notice that since the input is guaranteed to be one-

hot, the design of an encoder is simple

 y 1 = w 3 + w 2

 y 0 = w 3 + w 1

 Each output signal y is just the sum of the input

signals that are asserted for the “on set” of y

 These encoder types are called binary encoders

w 3 w 2 w 1 w 0 y 1 y 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1

 4 to 2 Priority Encoder

 4 input lines (w

:w

 w

has highest priority; w

has lowest priority

 2 output lines (y

:y

 1 “valid” (z) output to determine if any line is active at

all

w 3 w 2 w 1 w 0 y 1 y 0 z 0 0 0 0 x x 0 0 0 0 1 0 0 1 0 0 1 x 0 1 1 0 1 x x 1 0 1 1 x x x 1 1 1

 Logic for Priority Encoders

 Let i

= w

'w

'w

'w

i 1 = w 3 'w 2 'w 1

i

= w

'w

i

= w

 Then y

= i

+ i

y

= i

+ i

 z = i

+ i

+ i

+ i

same structure as one-hot encoder: sum of terms in the on set w 3 w 2 w 1 w 0 y 1 y 0 z 0 0 0 0 x x 0 0 0 0 1 0 0 1 0 0 1 x 0 1 1 0 1 x x 1 0 1 1 x x x 1 1 1