13
CSE 140 Homework 5 Solutions I. 1. The state table is as follows: PS X=0 X=1 00 00, 1 10, 1 01 10, 1 01, 1 10 01, 0 10, 0 11 11, 1 01, 1 Q 1 (t)Q 0 (t) Q 1 (t+1)Q 0 (t+1), Y Let the state assignment be as follows: S 0 =00, S 1 =01, S 2 =10, S 3 =11 The state table will then look like: PS X=0 X=1 S 0 S 0 , 1 S 2 , 1 S 1 S 2 , 1 S 1 , 1 S 2 S 1 , 0 S 2 , 0 S 3 S 3 , 1 S 1 , 1 2. Design the system with T flip flops The excitation table is as follows: Q 1 (t) Q 0 (t) X Q 1 (t+1) Q 0 (t+1) T 1 T 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 0 The excitation table for a T flip flop looks like: NS PS 0 1 0 0 1 1 1 0

CSE 140 Homework 5 Solutions - University of California

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CSE 140 Homework 5 Solutions - University of California

CSE 140 Homework 5 Solutions

I.

1. The state table is as follows:

PS X=0 X=1

00 00, 1 10, 1

01 10, 1 01, 1

10 01, 0 10, 0

11 11, 1 01, 1 Q1(t)Q0(t) Q1(t+1)Q0(t+1), Y

Let the state assignment be as follows:

S0=00, S1=01, S2=10, S3=11

The state table will then look like:

PS X=0 X=1

S0 S0, 1 S2, 1

S1 S2, 1 S1, 1

S2 S1, 0 S2, 0

S3 S3, 1 S1, 1

2. Design the system with T flip flops

The excitation table is as follows:

Q1(t) Q0(t) X Q1(t+1) Q0(t+1) T1 T0

0 0 0 0 0 0 0

0 0 1 1 0 1 0

0 1 0 1 0 1 1

0 1 1 0 1 0 0

1 0 0 0 1 1 1

1 0 1 1 0 0 0

1 1 0 1 1 0 0

1 1 1 0 1 1 0

The excitation table for a T flip flop looks like:

NS PS 0 1

0 0 1

1 1 0

Page 2: CSE 140 Homework 5 Solutions - University of California

Q1Q0 X

00 01 11 10

0 0 1 0 1

1 0 0 0 0

T0 = X’Q1’Q0 + X’Q1Q0’

Q1Q0 X

00 01 11 10

0 0 1 0 1

1 1 0 1 0

T1 = XQ1’Q0’ + X’Q1’Q0 + XQ1Q0 + X’Q1Q0’

The schematic diagram for the same is shown below.

3. Design the system using JK flip flops

The excitation table for a JK flip flop looks like:

JK

NS PS 0 1

0 0- 1-

1 -1 -0

Page 3: CSE 140 Homework 5 Solutions - University of California

Q1(t) Q0(t) X Q1(t+1) Q0(t+1) J0 K0 J1 K1

0 0 0 0 0 0 - 0 -

0 0 1 1 0 0 - 1 -

0 1 0 1 0 - 1 1 -

0 1 1 0 1 - 0 0 -

1 0 0 0 1 1 - - 1

1 0 1 1 0 0 - - 0

1 1 0 1 1 - 0 - 0

1 1 1 0 1 - 0 - 1

Q1Q0 X

00 01 11 10

0 0 - - 1

1 0 - - 0

J0 = X’Q1

Q1Q0 X 00 01 11 10

0 - 1 0 -

1 - 0 0 -

K0=X’Q1’

Q1Q0 X 00 01 11 10

0 0 1 - -

1 1 0 - -

J1=XQ0’+X’Q0

Q1Q0 X 00 01 11 10

0 - - 0 1

1 - - 1 0

J1=XQ0+X’Q0’

The following figure shows the schematic diagram for the same

Page 4: CSE 140 Homework 5 Solutions - University of California

II.

1. Implementation using a 4:16 decoder:

Page 5: CSE 140 Homework 5 Solutions - University of California

2. Implementation using 3:8 decoders

Page 6: CSE 140 Homework 5 Solutions - University of California

3. Implementation using 2:4 decoders

Page 7: CSE 140 Homework 5 Solutions - University of California

III.

The truth table for the given function looks like:

a b c f

0 0 0 1

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 -

Page 8: CSE 140 Homework 5 Solutions - University of California

1 1 1 1 1. Implementation using a 8:1 mux is given below:

2. Implementation of a 4:1 mux is given below:

ab c=0 c=1

00 1 0 I0=c’

01 0 1 I1=c

10 0 1 I2=c

11 - 1 I1=1

3. Implementation using a 2:1 mux is given below:

Bc

Page 9: CSE 140 Homework 5 Solutions - University of California

a 00 01 10 11

0 1 0 0 1 I0

1 0 1 - 1 I1

c b 0 1

0 1 0

1 0 1

I0 = b’c’ + bc

c b

0 1

0 0 1

1 - 1

I1 = c

Implementation of I0 = b’c’+bc

b c=0 c=1

0 1 0 I0=c’

1 0 1 I1=c

Page 10: CSE 140 Homework 5 Solutions - University of California

IV.

The truth table for the given function looks like the following:

a b c f

0 0 0 1

0 0 1 -

0 1 0 1

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 1

1 1 1 1

1. Implementation using 2:4 decoder is given below.

Page 11: CSE 140 Homework 5 Solutions - University of California

Alternative Solution.

f(a,b,c)=ab+c’ (using Kmap)

The implementation will therefore be

2. Implementation using 4:1 Mux

ab c=0 c=1

00 1 - I0=1

01 1 0 I1=c’

10 1 0 I2=c’

11 1 1 I3=1

Page 12: CSE 140 Homework 5 Solutions - University of California

3. Implementation using 2:1 Mux

Bc

a 00 01 10 11

0 1 - 1 0 I0

1 1 0 1 1 I1

c b

0 1

0 1 -

1 1 0

I0 = c’

c b

0 1

0 1 0

1 1 1

I1 = b+c’

Implementation of I1 = b+c’

B c=0 c=1

0 1 0 I0=c’

1 1 1 I1=1

Page 13: CSE 140 Homework 5 Solutions - University of California