# Transforming Group Codes in Mealy Finite State Machines with Composite State Codes
## 5 Example of Synthesis of Mealy FSM \(U_{3}\)
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \(a_{m}\) & \(a_{S}\) & \(X_{h}\) & \(Y_{h}\) & \(h\) \\ \hline \multirow{4}{*}{\(a_{1}\)} & \(a_{4}\) & \(x_{1}\) & \(y_{1}y_{2}\) & 1 \\  & \(a_{3}\) & \(\bar{x_{1}}x_{6}\) & \(y_{3}\) & 2 \\  & \(a_{2}\) & \(\bar{x_{1}}\bar{x_{6}}\) & \(y_{2}y_{5}\) & 3 \\ \hline \multirow{2}{*}{\(a_{2}\)} & \(a_{2}\) & \(x_{6}\) & \(y_{3}y_{4}\) & 4 \\  & \(a_{5}\) & \(\bar{x_{6}}\) & \(y_{6}y_{7}\) & 5 \\ \hline \multirow{4}{*}{\(a_{3}\)} & \(a_{4}\) & \(x_{1}\) & \(y_{7}\) & 6 \\  & \(a_{2}\) & \(\bar{x_{1}}x_{7}\) & \(y_{3}\) & 7 \\  & \(a_{6}\) & \(\bar{x_{1}}\bar{x_{7}}\) & \(y_{1}y_{2}\) & 8 \\ \hline \multirow{4}{*}{\(a_{4}\)} & \(a_{1}\) & \(x_{3}\) & \(y_{6}\) & 9 \\  & \(a_{3}\) & \(\bar{x_{3}}\) & \(y_{2}y_{3}\) & 10 \\ \hline \multirow{2}{*}{\(a_{5}\)} & \(a_{6}\) & \(x_{6}\) & \(y_{3}\) & 11 \\  & \(a_{9}\) & \(\bar{x_{6}}x_{7}\) & \(y_{6}y_{7}\) & 12 \\ \hline \multirow{2}{*}{\(a_{6}\)} & \(a_{4}\) & 1 & \(y_{3}y_{5}\) & 13 \\ \hline \multirow{2}{*}{\(a_{7}\)} & \(a_{8}\) & \(x_{3}\) & \(y_{1}y_{7}\) & 14 \\  & \(a_{5}\) & \(\bar{x_{3}}x_{2}\) & \(y_{2}\) & 15 \\  & \(a_{11}\) & \(\bar{x_{3}}x_{2}\) & \(y_{3}\) & 16 \\ \hline \multirow{2}{*}{\(a_{8}\)} & \(a_{9}\) & 1 & \(y_{2}y_{4}\) & 17 \\ \hline \multirow{2}{*}{\(a_{9}\)} & \(a_{8}\) & \(x_{7}\) & \(y_{3}\) & 18 \\  & \(a_{7}\) & \(\bar{x_{7}}x_{7}\) & \(y_{1}y_{2}\) & 19 \\ \hline \multirow{2}{*}{\(a_{10}\)} & \(a_{11}\) & \(x_{3}\) & \(y_{2}\) & 20 \\  & \(a_{5}\) & \(\bar{x_{3}}x_{4}\) & \(y_{5}y_{7}\) & 21 \\  & \(a_{12}\) & \(\bar{x_{3}}\bar{x_{4}}\) & \(y_{1}y_{5}\) & 22 \\ \hline \multirow{2}{*}{\(a_{11}\)} & \(a_{5}\) & \(x_{4}\) & \(y_{2}y_{6}\) & 23 \\  & \(a_{10}\) & \(\bar{x_{4}}\) & \(y_{3}\) & 24 \\ \hline \multirow{2}{*}{\(a_{12}\)} & \(a_{5}\) & \(x_{4}\) & \(y_{3}\) & 25 \\  & \(a_{1}\) & \(\bar{x_{4}}\) & – & 26 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: State transition table for FSM \(A1\). **Step 4. ** Obviously, three bits is enough to create the one-hot group codes. This determines the set \(\tau_{0}=\{g_{1},g_{2},g_{3}\}\). Let us encode the groups in the following way: \(OCG(G^{1})=100\), \(OCG(G^{2})=010\) and \(OCG(G^{2})=001\). **Step 5. ** In complex FSMs, it makes sense to encode states using the algorithm JEDI for optimal state encoding. This can lead to the optimization of the partial SOPs for output functions. But in this very simple example, we encode states in the basic way. The method is the following: the smaller the subscript of a state, the more zeros its partial code includes. Using this approach, we can assign the following partial codes (Figure 5). **Step 6. ** In the Karnaugh map (Figure 5), we show these partial codes together with the maximum binary group codes. So, this map shows the composite state codes. So, steps 1-6 are executed. Using the obtained codes, we can create tables representing the blocks LUTer1-LUTer3. **Step 7. ** In the discussed case, LUTer1 is represented by Table 2, LUTer2 by Table 3, and LUTer3 by Table 4. These tables have the columns \(a_{m}\), \(CS(a_{m})\), \(a_{S}\), \(CC(a_{S})\), \(X_{h}\), \(Y_{h}\), \(D_{h}\) and \(h\). For each state, the columns \(a_{m}\), \(a_{S}\), \(X_{h}\) and \(Y_{h}\) are the same as they were in the initial STT (Table 1). The column \(D_{h}\) is created using the composite state codes from Figure 5.  
**Step 8. ** The outcome of the previous step provides information which can be used for creating the SOPs of partial IMFs (13) and partial microoperations (14). This is performed  
Figure 4: State transition graph of Mealy FSM \(A1\). Figure 5: Outcome of composite state assignment for FSM A1. using the partial state codes, inputs \(x_{l}\in X\) and one-hot group variables. There are two stages in creating PBFs. The first stage is deriving the partial Boolean functions (11) and (12) from the tables of blocks LUTer1-LUTerKC. The second stage is multiplying each term of SOPs (11) and (12) by the corresponding one-hot group variables.