跳到主要内容

京都大学 情報学研究科 知能情報学専攻 2017年2月実施 情報学基礎 F-2

Author

祭音Myyura (co-authored with GPT 5.6 SOL)

Description

Q.1

For the four-variable logic function

f(x1,x2,x3,x4)=(x1+(x2x3))x4+(x1x3)x2x4,f(x_1,x_2,x_3,x_4) =\bigl(x_1+(x_2x_3')'\bigr)x_4' +(x_1x_3)'x_2x_4,

where xix_i' denotes the logical negation of xix_i:

  1. Show a Karnaugh map of ff.
  2. Show all prime implicants of ff.
  3. Show all minimum sum-of-products expressions of ff.

Q.2

A Mealy-type sequential machine MM detects the patterns 0011 and 1011 in a binary input sequence. It produces 1 when the last symbol of either pattern arrives and 0 otherwise. For example, input 011011101101 produces output 000001000100.

  1. Give the state-transition table of MM using the minimum number of states.
  2. Design a synchronous sequential circuit realizing MM with the minimum number of D flip-flops. Let XX be the input, Qi,QiQ_i,Q_i' the two outputs of flip-flop ii, and DiD_i its excitation input. Give the state assignment, the excitation functions, and the output function ZZ in minimum sum-of-products form. All flip-flop outputs are reset to 0 before the input sequence starts.

题目描述

  1. 对逻辑函数

    f=(x1+(x2x3))x4+(x1x3)x2x4f=(x_1+(x_2x_3')')x_4'+(x_1x_3)'x_2x_4

    作 Karnaugh 图,列出全部主蕴含项,并给出全部最小与项之和式。

  2. 最小化可检测 00111011 的 Mealy 型时序机:

    1. 给出最少状态的状态转移表;
    2. 用最少的 D 触发器实现,明确写出状态编码,并将 DiD_i 与输出 ZZ 写成最小与项之和式。初始时所有触发器复位为 0

Kai

Q.1

Expanding the definition gives

f=Σm(0,2,5,6,7,8,10,12,13,14).f=\Sigma m(0,2,5,6,7,8,10,12,13,14).

1.1 Karnaugh map

Use Gray order 00,01,11,1000,01,11,10 on both axes.

x1x2\x3x4x_1x_2\backslash x_3x_40000010111111010
00001001
01010111
11111101
10101001

1.2 Prime implicants

The maximal groups give exactly the following seven prime implicants:

x3x4,x2x4,x2x3x4,x1x2x4,x1x2x3,x1x4,x1x2x3.\boxed{ x_3x_4',\quad x_2'x_4',\quad x_2x_3'x_4,\quad x_1'x_2x_4,\quad x_1'x_2x_3,\quad x_1x_4',\quad x_1x_2x_3' }.

Their covered minterms are respectively

{2,6,10,14}, {0,2,8,10}, {5,13}, {5,7}, {6,7}, {8,10,12,14}, {12,13}.\{2,6,10,14\},\ \{0,2,8,10\},\ \{5,13\},\ \{5,7\},\ \{6,7\},\ \{8,10,12,14\},\ \{12,13\}.

1.3 Minimum sum-of-products forms

Minterm 00 forces x2x4x_2'x_4'. Covering the remaining essential choices yields exactly two minimum covers, each with four products and ten literals:

f=x2x4+x3x4+x1x2x4+x1x2x3\boxed{ f=x_2'x_4'+x_3x_4'+x_1'x_2x_4+x_1x_2x_3' }

or

f=x2x4+x1x4+x2x3x4+x1x2x3.\boxed{ f=x_2'x_4'+x_1x_4'+x_2x_3'x_4+x_1'x_2x_3 }.

Q.2

The two target patterns are precisely the four-bit strings whose last three bits are 011; the first bit may be either 0 or 1. The initial state must nevertheless be distinguished so that the first three input bits cannot produce a detection.

Let the states be:

  • AA: no input has been read;
  • BB: at least one bit has been read, with no current suffix represented by CC or DD;
  • CC: at least two bits have been read and the current suffix is 0;
  • DD: at least three bits have been read and the current suffix is 01.

2.1 Minimum state table

Each entry is next state / output.

Present stateX=0X=0X=1X=1
AAB/0B/0B/0B/0
BBC/0C/0B/0B/0
CCC/0C/0D/0D/0
DDC/0C/0B/1B/1

These four states are pairwise distinguishable: DD is separated immediately by input 1; CC is separated from A,BA,B by continuation 11; and AA is separated from BB by continuation 011. Hence four states are necessary and sufficient.

2.2 Circuit equations

Four states require two D flip-flops. Use the reset-compatible assignment

A=00,B=01,C=10,D=11,A=00,\qquad B=01,\qquad C=10,\qquad D=11,

where the bits are (Q1,Q2)(Q_1,Q_2). The encoded transition table is

Q1Q2Q_1Q_2MeaningX=0X=0: D1D2/ZD_1D_2/ZX=1X=1: D1D2/ZD_1D_2/Z
0000AA01/001/001/001/0
0101BB10/010/001/001/0
1010CC10/010/011/011/0
1111DD10/010/001/101/1

Karnaugh-map minimization gives

D1=Q2X+Q1Q2,D2=X+Q1Q2,Z=Q1Q2X.\boxed{ \begin{aligned} D_1&=Q_2X'+Q_1Q_2',\\ D_2&=X+Q_1'Q_2',\\ Z&=Q_1Q_2X. \end{aligned}}

Starting from Q1Q2=00Q_1Q_2=00, these equations reproduce the required output and allow overlaps between consecutive occurrences.