# Spiking Neural P Systems for Basic Arithmetic Operations
## 3 Arithmetic Operation in Spiking Neural P Systems
### Binary Division in SNP Systems
The dividend is stored in the dividend neuron group (\(div_{1}\), \(div_{2}\), \(div_{3}\)), while the divisor is stored in the divisor neuron group (\(div_{1}\), \(div_{2}\), \(div_{3}\)), and the control neuron after the input is completed The group immediately sends the divisor to the dividend neuron group for continuous subtraction operations and sends one spike to the result neuron group each time until the highest bit of the dividend neuron group sends a borrow message to the control neuron group, and the final result is stored in the result group of neurons. In Table 4, likewise, column 1 represents the system moment and columns 2 to 1 represent each neuron in the system. Each row of Table 4 represents the number of spikes in each neuron in the system at the corresponding moment. It is not difficult to see that when t = 18 the resulting neuron group (the last three columns) in Table 4 has calculated the result (011) of dividing the last column of natural numbers 6 and 2. $B$1 The pattern C\({}_{2k+3}\) of \(\mathbf{\Pi_{BDSNP}}\) at t = 2k + 3.  
the number of neurons used by the four basic operations (addition, subtraction, multiplication, and division), the number of time slices required to complete the operation, and the number of rule types (NRT). In operand input, when one input neuron is used it takes a long time to input two operands sequentially, but fewer neurons are used. When two input neurons are used, the input time consumed by parallel input of two operands is short, while the number of neurons is increased. There are two commonly used operand encodings: spike time interval-based encoding and spike sequence-based encoding. Spike time interval-based encoding is the conversion of a numerical value into time slices in the interval between two spikes, while spike sequence-based encoding is the conversion of numeric values into a specific sequence of characters, such as a binary sequence. When the system is input, the operand (value) is encoded into a corresponding spike sequence or spike interval. The calculation process is to process the spike. When the system outputs, the spike sequences or spike interval is decoded into a value. The number of rule types used refers to the number of rules using different representations, e.g., the rule \(a\)\(\rightarrow\)\(a\) is only considered as 1 rule type even if it occurs in multiple neurons. The statistical results in bold in Table 5 are taken from the literature, while the rest are taken from the present study. In Table 5, for example, the SNPS designed in [29] has multiple input neurons and the digital encoding method is spike sequences. The additive SNP system uses three neurons, the time required for the addition of two natural numbers with a length of k bits is k + 1, and the number of rules is three. Note that while the number of neurons required for multiplication in [29] is thirteen and the time required is k + 7, this multiplication SNPS can only fix one of the multipliers, which is fixed at 26. Due to the lack of an SNPS for implementing division operations in [29], the number of neurons, computation time, and number of rule types required for the division operation are marked with '-'. In [28], the authors used the time interval encoding method, and the input number was represented by the time interval between two spike signals received by the input neuron. This is because the required time is related to the value of the input number, not its binary length, meaning that it cannot obtain the number of time slices required for the calculation. Similarly, [35] used the time-free encoding method to remove the precise execution time of the rules, making the solution of the problem independent of the execution time of the rules; thus, the time required for calculation cannot be obtained. Refs.