# Research on Key Technologies of Data Processing Mechanisms in Ternary Optical Computer
## 3 Computation-Data Files
### Computation-Data File Format  
Constructed according to the principles as mentioned above, the computation-data file's header contains information primarily to provide the necessary parameters to reconfigure the optical processor. In contrast, the data section includes the operands, including operand b and operand a. As depicted in Figure 2, following the numbering provided in Figure 2, the construction of the computation-data file is detailed as follows:  
1. **Version Number:** The version number allows the computation-data file parsing software to know the nature of the current version of the computation-data file and to be compatible with later versions. This field is 16 bits and specifies that the first byte represents the master version number and the second byte represents the revision number to the master version. 2. **File (Structure) Name:** This field records the name of the computation-data file. Users may submit multiple computation-data files to the TOC, and each file may be renamed, split or merged according to the TOC's computational rules during transmission and use. Therefore, to ensure that the computation result files returned by the TOC correctly correspond to the submitted files, this field has been established. 3. **IP address:** This field records the IP address of the user, facilitating the return of the computation results file. Currently, this field is 48 bits to record an IPV4 address. In subsequent versions, if an IPV6 address is adopted, this field must be expanded to 128 bits. This field records the IP address of the user. 4. **Priority:** Indicates the priority of the computation-data file. Support fields are reserved for users to prioritize tasks. 5. **Reserved 1:** This bit is reserved to facilitate the addition of priority bits or data type bits in future versions. It is set to 1 bit to make the fields (3), (4), (5), and (6) form two bytes, which are the lowest two bytes in 32 bits or 64 bits. 6. **Data type:** Indicates the type of data contained in the computation-data file. There are currently two types: structured data type and simple data type. Therefore, this field is currently 2 bits, with 00 representing simple data type, 01 representing structured data type, and 10 and 11 reserved for future use. 7. **Computation indicator count:** The number of valid computation indicators contained in this computation-data file. This field enables the TOC's task management software to correctly interpret all computation identifiers. This latest version of the computation-data file has 1280 computation identifiers. Hence, the field is set to 11 bits. 8. **Computation indicator (Item) 1 Name:** This field facilitates the referencing of the original data and computation results corresponding to this computation indicator through instructions. 9. **Computation indicator (Item) 1 Character:** Stores the values of the three English characters used in the ternary logic operation of computation identifier (item) 1. As a result, this field is 24 bits. 10. **Computation indicators 1-1280:** This field provides the operational rules of each calculator to be reconstructed by the TOC and the characteristics of the corresponding original data. Each computation identifier is set to 128 bits. 11. **Reserved:** Prepares for future expansion of calculation indicator information. 12. **Operation rule:** This field records the computation rules specified by the user for the data contained in the calculation indicator i. It provides the basis for the lower computer to reconstruct the optical calculator. This field is set to 24 bits, with the highest 6 bits indicating the type of operation. Therefore, the operation-data file can represent up to 64 types of operations. The remaining 18 bits are used to represent the specific computation rules within each operation type. For example, when the highest 6 bits are 000000, it indicates that this operation type is a ternary (including binary) logic operation.