# Research on Key Technologies of Data Processing Mechanisms in Ternary Optical Computer
## 1 Introduction
### Relevant Issues in Data Processing  
With the increasing richness in theory, structure, and experimental systems of the ternary optical computer (TOC), its computational advantages are attributed to three main characteristics [8]: numerous processor bits, allocatable processor bits, and the runtime reconfigurability of each processor bit's computational function. In contrast, electronic computers have a fixed number of data bits, non-allocatable data bits among different users, and immutable computational functions of processors. Common data processing methods designed entirely based on the characteristics of electronic processors cannot exploit the advantages of TOC [9]. Therefore, new data processing mechanisms tailored to the TOC's features of numerous data bits, allocatable data bits, and reconfigurable computational functions of data bits need to be explored [10]. The ternary optical computer contains an upper and lower computer; the upper computer is a traditional PC, and the lower computer uses a ternary optical processor (TOP) [11]. A key issue that must be addressed at this stage is how to conveniently transfer data requiring TOC processing to the lower machine, fully leverage the computational advantages of the TOC, and allow people to have two types of computers that work collaboratively rather than in opposition.  
The biggest difference between a TOC processor and a traditional processor in terms of application is that it allows the user to reconfigure the computational functions of each processor bit at any time, and a huge number of processor bits can be used independently in any group. In addition, the memory of the TOC has a data bus width on the processor-facing side that varies with the total number of processor bits, but this characteristic is not apparent at the application program level [12; 13; 14]. However, various traditional data processing mechanisms established around electronic CPUs, GPUs, or MICs, which lack these three application characteristics, are not suitable for the TOC's data processing methods.  
This paper proposes a data processing method for the TOC, including the computation-data file, the generation of the computation-data file, and the transmission of the computation-data file. The computation-data file organizes the user-submitted computational rules and raw data into a specialized file designed according to the computational characteristics of the TOC. The computation-data file generation software runs on an auxiliary PC to assist users in generating the file. The transmission of the computation-data file involves extending a high-level language with a set of instructions to send the file to the TOC [12; 15; 16]. By parsing the information carried in the computation-data file, the optical processor is reconfigured, and the reconfigured calculator is used to process the data [17]. This data processing mechanism can fully exploit the computational advantages of the TOC, is fully compatible with traditional applications, shields users from the complex processing at the TOC processor end, facilitates the use of this new type of computer, and is expected to provide new ideas for data processing as other new types of computers enter the application stage.