# 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 2 Numbers Addition
Starting from \(t=1\) time slice, two binary addends are in order received by \(\sigma_{in}\) from low to high. When the binary bit is \(1\), \(\sigma_{in}\) received \(1\) spiking, otherwise \(\sigma_{in}\) received \(0\) spiking. The corresponding binary bit of the summand are sequentially passed to \(\sigma_{Add}\) along \(\sigma_{aux_{3}}\), \(\sigma_{sum_{i}}\) (\(0\leq i\leq k-1\)) in summand cache module. The addend are sequentially passed to \(\sigma_{Add}\) through \(\sigma_{addend}\). The calculation process of \(\Pi_{Add2}\) is as follows:  
1. Input Auxiliary Module The function of the input auxiliary module is to distinguish the summand from the addend. \(t=1\) to \(k+1\), the input auxiliary module does not generate spiking output. During this period, the spiking from \(\sigma_{in}\) (each bit of summand) is sent to the summand cache module through \(\sigma_{aux_{3}}\), \(\sigma_{addend}\) consumed these spiking using rule \(a\rightarrow\)\(\lambda\). At \(t=k+2\) time slice, \(\sigma_{aux_{2,0}}\) and \(\sigma_{aux_{2,1}}\), respectively, send \(1\) spiking to \(\sigma_{aux_{3}}\). Maintain at least \(2\) spikings in \(\sigma_{aux_{3}}\). This prevents the addition input by \(\sigma_{in}\) from entering the neurons of the summand cache module. At the same time, \(\sigma_{addend}\) received two spikings from \(\sigma_{aux_{2,0}}\) and \(\sigma_{aux_{2,1}}\), at least two spikings in \(\sigma_{addend}\). Thereby enabling the addend bit to enter \(\sigma_{Add}\) to perform addition operations. The operation process of the input auxiliary module is as follows: (1) At \(t=0\) time slice, there is \(1\) spiking in \(\sigma_{aux_{1,0}}\) and \(\sigma_{aux_{1,1}}\). (2) \(t=1\) to \(k+1\), \(\sigma_{aux_{1,0}}\) and \(\sigma_{aux_{1,1}}\) send \(1\) spiking to each other and maintain \(1\) spiking. At the same time, \(\sigma_{aux_{1,1}}\) send \(1\) spiking to \(\sigma_{aux_{1,2}}\), which will follow the neurons \(\sigma_{aux_{1,3}}\), \(\sigma_{aux_{1,4}},\ldots,\sigma_{aux_{1,k+1}}\) sequential transmission. The input auxiliary module has no spiking output. At \(t=k+1\) time slice, there is \(1\) spiking in homogeneous neurons in the input auxiliary module. (3) \(t=k+2\) to \(2k+3\), the input auxiliary module continues to generate spiking output. \(\sigma_{aux_{2,0}}\) send \(1\) spiking to \(\sigma_{aux_{1,0}}\) and \(\sigma_{aux_{1,1}}\) at each time slice to prevent \(\sigma_{aux_{1,0}}\) and \(\sigma_{aux_{1,1}}\) from continuously generating spiking. At \(t=k+3\) to \(2k+2\) time slice, the spikings in \(\sigma_{aux_{1,2}}\), \(\sigma_{aux_{1,3}}\), \(\ldots\), \(\sigma_{aux_{1,k+1}}\) are sequentially cleared. At \(t=2k+3\) time slice, the spikings in \(\sigma_{aux_{2,0}}\) and \(\sigma_{aux_{2,1}}\) are cleared. And there are no rules that can be fired in all neurons in the input auxiliary module. 2 Summand Input The summand bits sent by \(\sigma_{in}\) transferred to \(\sigma_{Add}\) along \(\sigma_{aux_{2}}\), \(\sigma_{sum_{i}}\) (\(0\leq i\leq k-1\)). At \(t=1\) to \(k+2\) time slice, the summand cache module does not generate spiking output. At \(t=k+3\) to \(2k+2\) time slice, \(\sigma_{sum_{0}}\) sends the corresponding spiking of each summand to \(\sigma_{Add}\) at each time slice. The transmission process of the summand is as follows: (1) \(t=1\) to \(k\), the spiking corresponding to each summand bit is received by \(\sigma_{in}\) in order from low to high. At \(t=k\) time slice, the input of the summand is completed. These spikings follow \(\sigma_{aux_{2}}\), \(\sigma_{sum_{k-1}}\), \(\sigma_{sum_{k-2}}\), \(\ldots\), \(\sigma_{sum_{0}}\) sequential transmission to \(\sigma_{Add}\). (2) \(t=k+1\) to \(k+2\), the summand cache module does not generate spiking output. At \(t=k+2\) time slice, the bits of the summand are stored in \(\sigma_{sum_{0}}\), \(\sigma_{sum_{1}}\), \(\ldots\), \(\sigma_{sum_{k-1}}\) in order from low to high. At the same time, \(\sigma_{aux_{2}}\) starts continuous reception spikings from \(\sigma_{aux_{2}}\), \(\sigma_{aux_{2},t}\) and \(\sigma_{in}\).