联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2024-06-06 12:10

Midterm 1 Practice Problem 1               CSE140

!A!B

!AB

AB

A!B

!C!D

x

!CD

1

x

CD

1

1

x

x

C!D

1

x

x

utput = 1 if input is a prime number   !A!BC!D = 2; !A!BCD = 3; !AB!CD = 5; !ABCD = 7

utput = don’t care if output > 9

How many prime implicants?    !A!BC + !ABD + !ACD          BD + !BC

How many distinguished 1-cells?

How many essential prime implicants?

How many minimal sums?

!A!B

!AB

AB

A!B

!C!D

x

!CD

1 *

x

CD

1

1

x

x

C!D

1 *

x

x

utput = 1 if input is a prime number   !A!BC!D = 2; !A!BCD = 3; !AB!CD = 5; !ABCD = 7

utput = don’t care if output > 9

How many prime implicants? 3  dark blue center square, lighter blue split square, blue highlight line

How many distinguished 1-cells? 2  (denoted as usual with *; x are never distinguished)

How many essential prime implicants? 2 dark and light blue squares; blue highlight line is not essential

How many minimal sums? just one: BD + CB’  (don’t need CD – this has a consensus flavor to it)

MIdterm 1 Practice Problem 2

utput = 1 if number is not a prime

How many prime Implicants ?

How many distinguished 1 cells?

How many essential prime impilcants?

How many minimal sums?

utput = 1 if number is not a prime

How many prime Implicants?   4            Includes A=1 half-plane and CD=00 top row

How many distinguished 1 cells? 2 (*, as always)

How many essential prime impilcants? 2

How many minimal sums? 1     B’C’ + BD’   (interesting: + A buys us nothing)

CD  \  AB

00

01

11

10

00

1

1

x

1

01

1 *

x

1

11

x

x

10

1 *

x

x

Problem 3: finding minimal product of sums

1. Fill out Kmap for Y=0

2. Find minimal sum for Y=0

3. Apply DeMorgan twice

Y’ = B’C’ + BD’

group Y=0 terms: Y’ = B’C’ + BD’

invert both sides: Y = (B’C’ + BD’)’

apply Demorgan to the OR: Y = (B’C’)’(BD’)’

apply Demorgan to each AND: Y = (B+C)(B’+D)

Y’ = B’C’ + BD’

D \ BC

00

01

11

10

0

0

0

0

1

0

Y = (B+C)(B’+D)

D \ BC

00

01

11

10

0

1

1

1

1

1



版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp