# Research on Key Technologies of Data Processing Mechanisms in Ternary Optical Computer
## 4 Efficacy Experiment of Data Processing in TOC
### Experimental Results and Analysis  
The data processing method of the TOC constructed in this paper differs significantly from traditional electronic computers in that users no longer need to arrange the sequence of operations and data transfer and transmission timing for each part of the processor with individual instructions. Instead, users only need to specify computational requirements and processor bit requirements and hand over a large number of raw data to the TOC management system, which controls and allocates processor bit resources. The number of computations under different processors is shown in Figure 7, where Figure 7a shows the number of computations processed by an electronic computer. In an electronic computer, a computational instruction includes multiple specific calculation instructions, each controlling its operator once. Thus, a total of 8000 operations are required to complete the computation of 8000 pairs of scalar data. Figure 7b shows the number of computations when only one matching processor is reconstructed in an optical computer, requiring only 2000 repetitions of the computation instruction to complete all 2000 pairs of structured data, i.e., all 8000 pairs of scalar data. Figure 7c shows the case of reconstructing two optical processors, where the ternary optical computer reallocates another 186 bits to construct a second composite processor containing four operators, and only 1000 repetitions of the computation instructions are needed to complete the computation of these 8000 pairs of scalar data. Generally speaking, a ternary optical computer has several thousand bits and can reconstruct dozens of simple structured quantity processors, requiring only dozens of repetitions of the computation instruction to complete the task. For example, in the SD11 system of the TOC for application research, one basic module of the optical processor has 1024 bits, which can construct five such structured quantity processors. Therefore, SD11 only needs to execute 400 computation instructions to complete the computation task. The fewer the repetitions of the computation instruction, the less time and hardware are required for the computation process. \begin{table}
\begin{tabular}{c c} \hline \hline _fun_**3** (_Logic AND_) & _fun_**4** (_Logic OR_) \\ \hline
148–166 & 167–186 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Processor bit allocation for logic operators. Figure 7: The comparison of calculation processes between PC and TOC. Based on the above analysis, the comparison of computational performance between electronic computers and TOC under different processor bit conditions is depicted in Table 4.  
The theoretical result values of the experimental cases are depicted in Table 5, the theoretical output diagram is depicted in Figure 8, and the result diagram output by the ternary optical processor is depicted in Figure 9. Figure 8a represents the theoretical output graph of the first set of results in Table 5, while Figure 9a shows a screenshot of the corresponding optical processor LCD output. Similarly, Figures 8b and 9b correspond to the second set of results in Table 5, Figures 8c and 9c correspond to the third set of results, and Figures 8d and 9d correspond to the fourth set of results in Table 5.  
To illustrate how to interpret the corresponding results from the figures, we will use the actual result shown in Figure 9a as an example: In the figure, the brightest point represents vertically polarized light (V state, denoted by 1), the next brightest point represents horizontally polarized light (H state, denoted by 2), and other points represent the no-light state (denoted by 0). We interpret the data row-wise, starting from the bottom to the top and from right to left, based on the liquid crystal array diagram, starting from index 0. Every three adjacent pixels constitute one bit. We can read a sequence of data: 0201201111020010200, which is expressed in MSD format.