# Performing Arithmetic Operations with Locally Homogeneous Spiking Neural P Systems
## 3 An Locally Homogeneous Spiking Neural P System for Addition
### An LHSNP System with 1 Input Neuron for \(n\)-addition
\"\(aux_{4}\)\" represents the number of spiking in the high-level monitoring neuron \(\sigma_{aux_{4}}\). \"\(aux_{5}\)\" represents the number of spiking in the spiking control neuron \(\sigma_{aux_{5}}\). \"\(sum_{i}\) (\(0\leq i\leq k-1\))\" represents the number of spiking in the summand auxiliary neuron \(\sigma_{sum_{i}}\) (\(0\leq i\leq k-1\)). \"\(addend\)\" represents the number of spiking in the addend neuron \(\sigma_{add}\). \"\(Add\)\" represents the number of spiking sent to the environment. \"\(OF\)\" represents the number of spiking in the overflow monitoring neuron \(\sigma_{OF}\). The input \(n\) addends and the output operation results are represented in bold font. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{\(t\)} & \multirow{2}{*}{\(in\)} & \multirow{2}{*}{\(aux_{3}\)} & \multirow{2}{*}{\(sum_{7}\)} & \multicolumn{2}{c}{\(sum_{6}\)} & \multirow{2}{*}{\(sum_{7}\)} & \multirow{2}{*}{\(sum_{9}\)} & \multirow{2}{*}{\(sum_{10}\)} & \multirow{2}{*}{\(sum_{11}\)} & \multirow{2}{*}{\(sum_{12}\)} & \multirow{2}{*}{\(sum_{12}\)} & \multirow{2}{*}{\(sum_{13}\)} & \multirow{2}{*}{\(sum_{14}\)} & \multirow{2}{*}{\(sum_{15}\)} & \multirow{2}{*}{\(sum_{16}\)} & \multirow{2}{*}{\(sum_{17}\)} & \multirow{2}{*}{\(sum_{19}\)} & \multirow{2}{*}{\(sum_{19}\)} & \multirow{2}{*}{\(sum_{18}\)} & \multirow{2}{  
The calculation process for the three binary numbers 0000110\({}_{2}\), 10000110\({}_{2}\), and 00000000\({}_{12}\) in \(\Pi_{Add3}\) is as follows:  
1. Input Auxiliary Module 1. \(t=0\), there is 1 spiking in \(\sigma_{aux_{1,0}}\) and \(\sigma_{aux_{1,1}}\). 2. \(t=1\) to 9, \(\sigma_{aux_{1,0}}\) and \(\sigma_{aux_{1,1}}\) send spiking to each other and maintain one spiking in. At the same time, \(\sigma_{aux_{1,1}}\) send 1 spiking to \(\sigma_{aux_{1,2}}\) at each time slice. These spikings are transmitted sequentially along \(\sigma_{aux_{1,2}}\), \(\sigma_{aux_{1,3}}\), \(\ldots\), \(\sigma_{aux_{1,9}}\), \(\sigma_{aux_{1,1}}\) will send 1 spiking to \(\sigma_{aux_{1}}\) at each time slice, these spikings are stacked in the \(\sigma_{aux_{5}}\). During this time slice, the input auxiliary module does not generate spiking output. 3. \(t=10\) to 17, all neurons in the input auxiliary module maintain 1 spiking. At the same time, \(\sigma_{aux_{2,1}}\) send 1 spiking to \(\sigma_{aux_{4}}\) at each time slice. And these spikings are stacked in \(\sigma_{aux_{5}}\). \(\sigma_{aux_{1,1}}\) send 1 spiking to \(\sigma_{aux_{5}}\) at each time slice. And these spikings are stacked in \(\sigma_{aux_{5}}\). At \(t=17\) time slice, there are 8 spikings stacked in \(\sigma_{aux_{4}}\) and 16 spikings stacked in \(\sigma_{aux_{5}}\). 4. \(t=18\) to 21, the neurons in the input auxiliary module stop sending spikings in the order of \((\sigma_{aux_{1,0}}\), \(\sigma_{aux_{1,1}})\), \(\sigma_{aux_{1,2}}\), \(\sigma_{aux_{1,3}}\), \(\ldots\), \(\sigma_{aux_{1,9}}\), \((\sigma_{aux_{2,0}}\), \(\sigma_{aux_{2,1}})\). At \(t=18\) time slice, \(\sigma_{aux_{1,0}}\) and \(\sigma_{aux_{1,1}}\) receives 1 spiking sent by \(\sigma_{aux_{3}}\) firing rule \(a^{16}\to a\). \(\sigma_{Add}\) received 4 spikings sent by \(\sigma_{aux_{4}}\) firing rule \(a^{8}\to a^{4}\). At \(t=20\) time slice, \(\sigma_{aux_{1,0}}\), \(\sigma_{aux_{1,1}}\), \(\sigma_{aux_{1,2}}\), \(\ldots\), \(\sigma_{aux_{1,9}}\) receives 4 spikings sent by \(\sigma_{OF}\) and cut off the transmission of the spiking in neurons. At \(t=21\) time slice, the spiking in \(\sigma_{aux_{2,0}}\), \(\sigma_{aux_{2,1}}\) are consumed and there are no rules to fire in the input auxiliary module. 2. The First Addend Input 1. \(t=1\) to 8, \(\sigma_{in}\) received spiking corresponding to bit of the first binary addend. 2. \(t=2\) to 18, the first addend is transmitted along \(\sigma_{aux_{5}}\), \(\sigma_{sum_{7}}\), \(\sigma_{sum_{6}}\), \(\ldots\), \(\sigma_{sum_{9}}\), \(\sigma_{Add}\) at each time slice. At \(t=2\) to 9 time slice, \(\sigma_{addend}\) received spiking sent by \(\sigma_{in}\).