## 2 Background of Mealy FSMs  
The logic circuit of Mealy FSM is represented by the following systems of Boolean functions [1]:  
\[\Phi=\Phi(T,X); \tag{2}\]  
\[Y=Y(T,X). \tag{3}\]  
In (2) and (3), there are the following sets: \(\Phi=\{D_{1},\ldots D_{R}\}\) is a set of input memory functions, \(T=\{T_{1},\ldots T_{R}\}\) is a set of state variables, \(X=\{x_{1},\ldots x_{L}\}\) is a set of input variables, \(Y=\{y_{1},\ldots y_{N}\}\) is a set of output functions.  
To find systems (2) and (3), it is necessary to specify a behaviour of FSM. In this article, we use a state transition table (STT) to represent a Mealy FSM. An STT contains information about the transitions between internal states \(a_{m}\in A\), where \(A=\{a_{1},\ldots a_{M}\}\) is a set of states [8]. There are the following columns in an STT: \(a_{m}\) is a current state; \(a_{s}\) is a state of transition; \(X_{h}\) is a conjunction of input variables (or their complements) determining the transition \(\langle a_{m},a_{s}\rangle\); \(Y_{h}\) is a collection of output functions (COF) generated during the transition \(\langle a_{m},a_{s}\rangle\); \(h\) is a number of transition (\(h\in\{1,\ldots,H\}\)). For example, consider some Mealy FSM \(S_{1}\) represented by STT (Table 1).  
The following sets and their parameters could be derived from Table 1: \(A=\{a_{1},\ldots,a_{12}\}\), \(M=12\), \(X=\{x_{1},\ldots,x_{7}\}\), \(L=7\), \(Y=\{y_{1},\ldots,y_{11}\}\), \(N=11\). There are \(H=20\) rows in Table 1. To find the sets \(\Phi\) and \(T\), it is necessary to encode the states \(a_{m}\in A\) by binary codes \(K(a_{m})\) with \(R\) bits. It is a step of state assignment [8]. Let us use minimum number of state variables when there is  
\[R=\lceil log_{2}M\rceil. \tag{4}\]In the discussed case, there is \(R=4\). It gives the sets \(T=\{T_{1},\ldots,T_{4}\}\) and \(\Phi=\{D_{1},\ldots,D_{4}\}\). As follows from the set \(\Phi\), we use \(D\) flip-flops to implement the register\((RG)\).  
To get functions (2) and (3), it is necessary to turn an STT into a direct structure table (DST) [1] of Mealy FSM. To do it, we should add three columns into an STT, namely: \(K(a_{m})\) is a code of current state; \(K(a_{s})\) is a code of state of transition; \(\Phi_{h}\) is a collection of input memory functions equal to \(1\) to replace \(K(a_{m})\) by \(K(a_{s})\).  
Each row of DST corresponds to a product term \(F_{h}\)\((h\in\{1,\ldots,H\})\). The term \(F_{h}\) is the following conjunction:  
\[F_{h}=\left(\bigwedge_{r=1}^{R}T_{r}^{l_{mr}}\right)\cdot X_{h}\quad(h\in\{1, \ldots,H\}). \tag{5}\]  
The first member of (5) is a conjunction \(A_{m}\) of state variables corresponding to the code \(K(a_{m})\) of the state \(a_{m}\in A\) from the h-th row of \(DST\). There are \(l_{mr}\in\{0,1\}\), \(T_{r}^{0}=\hat{T}_{r}\), \(T_{r}^{1}=T_{r}\)\((r\in\{1,\cdots,R\})\). The symbol \(l_{mr}\) stands for the value of the r-th bit of \(K(a_{m})\).  
The functions (2) and (3) depend on terms (5). The system (2) determines a block of input memory functions (BIMF), the system (3) the block of output functions (BOF). State codes are kept into \(RG\). It determines a Mealy FSM \(U_{1}\) (Figure 1). The pulse \(Start\) loads the code \(K(a_{1})\) of the initial state \(a_{1}\in A\) into \(RG\). The pulse \(Clock\) allows changing the content of RG.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \(a_{m}\) & \(a_{s}\) & \(X_{h}\) & \(Y_{h}\) & \(h\) \\