# Binomial Number System
## 4 Generation of Constant-Weight (CW) Binomial Code
### CW Binomial Code  
The main property of binomial numbers, both uniform and non-uniform, is forming various combinatorial configurations. In this paper, we consider CW binomial codes contained in each of their code combinations the same number of zeros and ones. Such codes widely used in practice for a long time, such as error-control codes. However, binomial numbers give them new properties. For example, they can effectively compress information [21]. The algorithm for generating CW binomial codes based on binomial numbers differs in its practical implementation in its simplicity. This is implemented by assigning ones to the binomial code if it contains \((n-k)\) zeros, or if it contains \(k\) ones, zeros until its length equals \(n\) bits. The algorithm for obtaining CW codes consists of two steps--acquiring binomial numbers from natural number systems and constructing CW code combinations on their basis. The first step, which requires the conversion of binary numbers into binomial numbers for its implementation, is described, for example, in [21]. The second step, which transforms binomial numbers into CW binomial code combinations, is considered above. Based on binomial numbers, using the formation of CW binomial code combinations according to the above algorithm, it is also easy to organize their enumeration. It can convert binary codes into CW binomial codes and build the corresponding encoders [21]. Using the considered algorithm, Table 3 shows an example of transitions from binomial codewords to CW binomial codewords, for \(n=6,k=4\). The advantage of this algorithm, in addition to simplicity, is that on its basis, especially when using specialized devices, it is possible to quickly obtain combinations of CW binomial codes of considerable code length. CW binomial codes are indivisible error-detecting codes since they do not have an information and control part. As is the case with ordinary block codes, e.g., Hamming or low-density parity-check (LDPC) forward error correction (FEC) codes. These codes are asymmetric and adapt to the nature of the interference, which is one of their advantages over cycling block codes. With 100% asymmetry of the communication channel, these codes can detect all errors. The second advantage of these codes is the ease of detecting errors in their code combinations. It is enough to count the number of units in the code combination to find an error. If the number of ones is equal to \(k\), then it is considered that there is no error in the code combinations, and if it is not identical, then its presence is assumed. This property is beneficial for hardware implementation based on CW binomial codes of encoding devices. The disadvantage of these codes is their inseparability, making it necessary to develop special algorithms for converting binary codes into CW binomial codes and vice versa with a considerable length of code combinations [21]. CW binomial codes, especially with a considerable code length, can also compress information, including digital images. It is enough to count the number in the compressible binary array of data to convert it into the CW binomial code combination. After that, we apply the standard procedure for moving from equilibrium codewords which consists of deleting the ones to the right to the first zero or zeros to the first unit (please see Table 3). The binomial number is obtained and converted to the corresponding binary numbers using a numeric function. In this case, that information compresses, and the degree of information compression depends on the number of ones and the code length of the original binary code combination. Without the digit \(k\), the number is not easy to recover, protecting information from unauthorized access. In this case, the parameter \(k\) is the key. If necessary, two keys can be entered, \(k\) and \(n\). However, in this case, transmission reliability decreases since the natural redundancy removes from the messages. However, applying FEC codes with artificial redundancy, the reliability of the systems is increased.