# Binomial Number System
## 2 Theory of BNS  
**Definition 1**. : _A binary \(k\)--BNS is a system that includes a numeric function:_  
\[F=x_{r-1}C_{n-1}^{k-q_{r-1}}+\ldots x_{i}C_{n-r+i}^{k-q_{i}}+\ldots+x_{1}C_{n-r+ 1}^{k-q_{1}}+x_{0}C_{n-r}^{k-q_{0}}, \tag{1}\]  
_set of binomial numbers \(F=x_{r-1}\ldots x_{i}+\ldots+x_{1}x_{0}\), binary alphabet \(x_{i}=0,1\), and systems of conditions, generating binomial code [21]:_  
\[q\leq r\leq n-1 \tag{2}\]  
\[x_{0}=1,\ q=k \tag{3}\]  
_and_  
\[n-k=r-q \tag{4}\]  
\[x_{0}=0,\ 0\leq q\leq k-1, \tag{5}\]  
_where \(r\) denotes the number of binary digits in binomial numbers (code length); \(r\in 1,2,\ldots,r\) is a position index i = 0, 1, \(\ldots,\ r-1\); \(q\) is a number of 1's in a binomial code; \(n\), \(k\) is an integer parameter of the BNS--1,2, \(\ldots\) ; \(q_{i}\) is a sum of 1's bits of the \(x_{i}\) from (\(r-1\))-th to the (\(i+1\))-th bits,_\[q_{i}=\sum_{j=i+1}^{r}x_{j}; \tag{6}\]  
\(i=0\), \(1\),..., \(r-1\); \(x_{r}=0\). **Definition 2**. : _Any finite sequence of binary digits \(x_{r-1}\),..., \(x_{1}\), \(x_{0}\), with conditions (2) and (3) or (4) and (5) is the binary binomial number._  
Thus, the codewords shown in Table 1 below are binary binomial numbers with the above conditions. Based on the binomial numbers, binomial codes have two essential features that distinguish them from ordinary numbers in natural number systems. The first feature of binomial codes is that their code lengths \(r\) are different, and in total, they form a prefix code, that is, a code in which no combination can be the beginning of another. It follows from the systems of equalities (2) and (3), (4), and (5), where \(r\) is a variable depending on the number of \(q\) ones in codes and their parameters \(n\) and \(k\). Such codes are called non-uniform, in contrast to binomial codes in natural number systems, such as the binary system, which have the same code length. Therefore, such codes are called uniform. The second feature of binomial codes is the presence of the dependence of the values of the weights of their digits not only on their position in the number, as is the case in natural number systems, but also on the importance of the preceding most significant bits (MSB), which equation described (6). Due to this property, the lengths of the binomial codes are different. These properties significantly complicate the binomial codes, give them the property of error detection, and enable them to form various combinatorial configurations, e.g., combinations, combinations with repetitions, compositions, etc. As a weighting coefficient of the \(i\)-th digit of a numerical function, the binomial coefficient is determined \(C_{n-r+i}^{k-q_{i}}\). The binomial coefficient depends on the position index \(i=0\), \(1\),..., \(r-1\) and the amount, \(q_{i}\) preceding this index of bits \(x_{i}\). There can be as many binary BNS for code length \(n\) as there can be for \(n\) values of the parameter \(k\). Therefore, for the BNS, it is necessary to indicate the parameters \(n\) and \(k\), or at least the parameter \(k\), since it does not exceed the value of \(n\). For example, Table 1 shows the binomial codewords with parameters \(n=6\) and \(k=4\) and quantitative equivalents. The binomial codewords with different code lengths \(r\) are shown in Table 1, which for numbers corresponding to the system of equalities (2) and (3) varies from \(q=k=4\) (3) to \(n-1=6-1=5\) (2). Moreover, all these codewords have \(1\) in the least significant bit