Abstract
Let be the ring of integers modulo q (not necessarily a prime power). and codes over that are capable of correcting up to two errors of type ±1 are proposed. The application of these codes to QAM is discussed. A comparison with convolutional codes of the same rate in simulated QAM communications shows better performance of the proposed codes.
MSC:
94B60; 94B12
1. Introduction
Let be the ring of integers modulo q (not necessarily a prime power). An integer code is said to be a subset of , defined by
where is an matrix with elements from and it is called a parity-check matrix.
If a codeword is sent through a noisy communication channel, the vector received at the other end can be presented in the form , where is called the error vector.
One of the earliest applications of integer codes is the one proposed by Varshamov and Tenengolz in [1,2]. They used integer codes for correcting single asymmetric errors. Vinck and Morita [3] applied such codes to magnetic recording and frame synchronization.
Reading and writing in flash memory can be considered as a communication channel with alphabet . Errors appearing during the processes of reading and writing in flash memory are symmetric limited-magnitude (e.g., ±1 or ±2) or asymmetric (e.g., (1,2,3)). Hence, the entries of the error vector have those values, and integer codes are potentially suitable for this application. A general method of construction of asymmetric limited-magnitude error-correcting codes is provided by Cassuto et al. [4]. Systematic codes that correct single limited-magnitude systematic asymmetric errors and achieve a higher rate than those given in [4] were proposed by T. Klove and B. Bose [5] and Klove et al. in [6].
Morita and the authors of this paper proposed in [7,8] how integer codes can be applied to coded modulation. The investigations presented in [9,10,11,12,13] are in the same area. Several specific uses of integer codes are described in [14,15,16,17,18,19,20].
All the cited works above propose codes that can correct a single error of a given type. In [21] a code capable of correcting up to two errors of type ±1 is given, and it is described how to apply this code to error control in 64-QAM. Khachatrian et al. [22] construct and codes capable of correcting two errors of type ±1 or ±2.
We shall say that a code is a double errors correctable if the decoding procedure can successively recover the error vector if it has up to two nonzero entries and their values are 1 or .
In this paper, we propose constructions of codes over that are double errors correctable and apply them to communication based on Quadrature Amplitude Modulation (QAM). The proposed codes have high rates, namely and . Such codes have parity-check matrix of the form
respectively, where hi, hij .
The next parts of the paper are organized as follows. Section 2 presents constructions of the proposed integer codes. In Section 3 applications of the proposed codes to QAM communications are described. Two examples of the codes are discussed in detail. Those codes are compared with convolutional codes having the same code rate. The results from comparisons are presented graphically.
Concluding remarks are presented and discussed in Section 4.
In the Appendix A, a list of double ±1 error-correctable integer codes with block length is given.
2. Construction of Integer Codes Correcting Double Errors of Type ±1
Let be an integer code with parity check matrix
where are columns of length m. For to be a double ±1 errors correctable code, all elements of the set of syndromes
must be pairwise distinct and different from zero. By counting the number of elements of we obtain the following lower bound for q
Lemma 1.
The cases and are the lower bounds given by Proposition 1 in [21].
Also we can observe the following useful property of the considered codes.
Lemma 2
([21]). Let be a double errors correctable code. Multiplication of a column of by is a transformation that preserves the property of to be a double error-correctable code.
Proof.
The multiplication of a column of by does not change the set S of syndromes but only permutes its elements, that is, only changes the 1-1 correspondence between errors and syndromes. Hence, the code does not lose its property to correct up to two errors. □
Corollary 1.
If is a double error-correctable code, we can assume that one row of consists of elements of less than or equal to .
Indeed, one of a or in is less than or equal to .
2.1. The Case
The codes with the shortest block length are codes and according to Lemma 1 . Such double errors correctable codes indeed exist. We have the following:
Proposition 1.
If where
then is a double errors correctable code over .
Proof.
The set of syndromes is where
In both cases thus the subsets and have no common element. Hence, all elements of S are different. □
Remark 1.
If we fix the Proposition 1 gives a lower bound for
Example 1.
Let Then and according to Proposition 1 the code with is a double error-correctable code with
Example 2.
Let Then , however, double error-correctable codes do not exist for and 20. The code with is a double errors correctable code for . Moreover, it is such a code considered as a code over with
The following matrices define double error-correctable codes for .
A construction of defining a double error-correctable code:
- 1.
- Set , where a satisfies the conditions of Proposition 1;
- 2.
- Set .
Theorem 1.
The construction described above gives a parity-check matrix of a double errors correctable code for
Proof.
We proceed by induction on n. Let , where a satisfies the conditions of Proposition 1, and Then, and the set corresponding to is
It is easy to check that has no common elements with at least if
Assume obtained by the Construction is a parity-check matrix of a double ±1 error-correctable code. Let
be the set of the sums and differences of any two elements of the matrix Obviously
Since the sets and do not overlap. The same holds for and . We have to prove that there are no common elements of and . It is easy to check that
Then,
and
Since the values and cannot be equal (the reminders are different). Therefore, all elements of are nonzero and pairwise distinct. Also, they are not greater than . Hence, for
Therefore, the code with parity-check matrix is a double ±1 error-correctable code. □
2.2. The Case
The codes require twice the block length n than codes to achieve the same code rate as the codes but can reduce the value of q. For some applications, a larger value of q is not a problem, but a constellation with signal points with such q is too large for practical use.
Lemma 3.
If is a double error-correctable code over , then
Proof.
The bound in the case q odd is given by Lemma 1. When q is even, we must exclude as potential syndromes
since in . Hence, □
A trivial construction of code can be obtained using an code. The entries of the columns of the new code are the entries of the code and zero. For example, H gives the following parity-check matrix of a double ±1 errors correctable code:
However this construction does not reduce the size q of the alphabet. The minimal q required by the above matrix is (the same as the value required by H), while, e.g.,
enables
The above construction leads us to the idea of constructing as a concatenation of submatrices of the form
The bound for the difference follows from the fact that submatrix
of (1-(ii)) defines a double error-correcting code, too.
Theorem 2.
If positive integers a and b satisfy the conditions
the matrix
defines a double correctable code over with
In the cases and the size of the alphabet
Proof.
When Lemma 3 requires but when in the case the error vectors and have the same syndrome since in . Hence, In case , there is no such problem.
One can write all 32 syndromes corresponding to all error vectors with weight two or one and entries 1 or −1 and check that they are different with the exception of the following cases:
Syndromes
must be different, thus
If and we have in
Hence, syndromes of error vectors and are equal, and the code cannot be double correctable. However, increasing q by one solves the problem. □
To obtain a code with odd length n we add one column to the parity-check matrix of a double correctable code of length and check whether the property is preserved. Very often a column of the form , is a successful choice.
In the Appendix A we give a list of double error-correctable codes with the minimum possible q.
3. Application of Proposed Codes to Communication Schemes Based on Quadrature Amplitude Modulation
Quadrature Amplitude Modulation (QAM) is a communication scheme for data transmission using signals that are sums of two orthogonal signals with prescribed amplitudes. The set of possible signals can be presented as a lattice of points that is usually called a constellation. The most used in practice type of QAM is the one whose constellation is a square. It is referred to here as SQAM.
Applications of the proposed codes consist of the following steps:
- 1.
- The input binary sequence is transformed into a sequence of pairs of elements of . Each pair represents horizontal and vertical coordinates of a signal point of the constellation of -SQAM with
- 2.
- The sequences of horizontal and vertical coordinates are independently encoded by the code over
- 3.
- The sequence of received signal points (with added AWGN) is transformed into two sequences (of horizontal and vertical coordinates) over .
- 4.
- After decoding each of those sequences, they are transformed into a binary sequence with the length of the input one.
Comparing the input and output sequences, we can compute the bit error rate (BER) for different values of signal-to-noise ratio (SNR). The obtained information enables us to compare the performance of the proposed codes with other methods of encoding, e.g., trellis decoding with convolutional codes
Remark 2.
If we apply the codes to -SQAM, the natural choice is ; however, a similar procedure can be performed with or We refer the reader to [23].
Example 3.
Consider communication based on 1024-SQAM. We demonstrate the proposed error-correcting scheme by the use of the integer code with (see Example 2). Let 10110011101000101001 be the input binary sequence. First, we transform it into a sequence of pairs of elements of : Compute the parity-check pair by
Let the sent three pairs be detected at the receiver as
We compute syndromes that correspond to the horizontal and vertical coordinates by
The error vectors corresponding to the computed syndromes are
The error vectors are determined by using a table whose rows are error vectors and the index of each row is its syndrome. (A row whose index is not a syndrome of an error vector of the considered type is the all-zeros vector.) Computing
we find the sent pairs: Removing the parity-check pair (the first pair), we reconstruct the sent sequence of elements of . The last step is to transform it into a binary sequence.
Example 4.
Consider communication based on 256-SQAM and code over defined by
Encoding and decoding procedures are similar to those described in Example 3. However, in this case two parity-check coordinate pairs are sent through the channel in addition to the six information coordinate pairs where
To evaluate the performance of proposed codes we develop a software that simulates a communication based on SQAM in presence of additive white Gaussan noise (AWGN) in two variants: with the use of the proposed codes and trellis encoding with convolution codes with the same coding rate, respectively. The input and the output are binary sequences with the same length, which enables BER versus SNR to be determined.
The first step is to develop software that simulates a communication based on SQAM in presence of AWGN to be written. The input consists of the SNR and a sequence of pairs representing the coordinates of sent signal points. The output is a sequence of the coordinate pairs of the signal points detected at the receiver.
The simulation of the AWGN channel is extended with encoding and decoding parts. The former transforms the input binary sequence into one of the coordinate pairs using an integer code or another code (in our investigations, a convolutional one). The latter part performs the inverse operation: it transforms the sequence of coordinate pairs into a binary sequence after correcting the detected errors.
Note that we use one and the same software for simulating an AWGN channel during the experiments with both types of codes. All the simulations have been done under the assumption that the half-distance d between signal points is . The energy of the noise is a function of SNR and the average energy of a signal point of the constellation. In the experiments with the convolutional code, we use Gray mapping.
Figure 1 presents results of simulation of 1024-SQAM using the code from Example 3 and a convolutional code with the same rate 2/3. This code has constraint length [5 4] and generator matrix [23 35 0; 0 5 13] (the rows of the matrix are given in octal; we refer the reader to [24,25] for details about the use of the convolutional code).
Figure 1.
BER vs. SNR per bit for codes considered in Example 3 (1024-SQAM).
Figure 2 presents results of simulation of 256-SQAM using the code from Example 4 and a punctured convolutional code with the same rate 3/4. This code is obtained by puncturing a code with constraint length 7 and generator matrix [133 171]. The puncturing pattern is [1; 1; 0; 1; 1; 0] (see [26]).
Figure 2.
BER vs. SNR per bit for codes considered in Example 4 (256-SQAM).
Both figures present the values of BER obtained by transmitting 109 bits per each value of SNR. For encoding and decoding for convolutional codes in experiments are used functions “convenc” and “vitdec” with option “hard” from communication toolbox of Matlab (R2026b).
4. Conclusions
The codes proposed in this paper have very high rates and simple encoding and decoding. Encoding is a computation of only linear expressions. Decoding can be done by using a syndrome error table. Both operations are very fast and simple for modern digital devices.
Simulations of their applications to QAM communications show that these codes can be considered as a competitive tool for error correction in QAM communications.
Author Contributions
Conceptualization, H.K. and N.M.; methodology, H.K. and N.M.; software, H.K. and N.M.; validation, H.K. and N.M.; formal analysis, N.M.; investigation, H.K. and N.M.; writing—original draft, H.K.; writing—review editing, N.M.; visualization, H.K. and N.M.; supervision, N.M. All authors have read and agreed to the published version of the manuscript.
Funding
This work was partially supported by the National Science Fund of Bulgaria under Grant KP-06-N82/5 and by the Centre of Excellence in Informatics and ICT under the Grant No BG16RFPR002-1.014-0018-C01, financed by the Research, Innovation and Digitalization for Smart Transformation Programme 2021–2027 and co-financed by the European Union.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Acknowledgments
The authors are grateful for the access provided to the e-infrastructures of the National Center for High Performance and Distributed Computing and the Centre of Excellence in Informatics and ICT.
Conflicts of Interest
The authors declare no conflicts of interest.
Appendix A. List of Integer Codes Correcting Double Errors of Type (±1) for n ≤ 12
The results were obtained by exhaustive search over all admissible matrices for n up to 7. For a larger n the computer search is based on constructions given in Section 2.2 and the minimality of q concerns only the construction.
Appendix A.1. The Case n = 4
In this case, minimum possible size of the alphabet is and
Appendix A.2. The Case n = 5
Lemma 1 gives ; however, a computer search shows that required codes do not exist for . Then the minimum possible and the exhaustive search gives
Appendix A.3. The Case n = 6
Then minimum possible and
Appendix A.4. The Case n = 7
Then minimum possible and
Appendix A.5. The Case n = 8
Then minimum possible and
Appendix A.6. The Case n = 9
Then minimum possible and
Appendix A.7. The Case n = 10
Then minimum possible and
Appendix A.8. The Case n = 11
Then minimum possible and
Appendix A.9. The Case n = 12
Then minimum possible and
References
- Varshamov, R.; Tenegolz, G. A code for correcting a single asymmetric error. Autom. Telemat. 1965, 26, 288–292. (In Russian) [Google Scholar]
- Varshamov, R. A class of codes for asymmetric channels and a problem from the additive theory of numbers. IEEE Trans. Inf. Theory 1973, 19, 92–95. [Google Scholar] [CrossRef] [Scilit]
- Han Vinck, A.J.; Morita, H. Codes over the ring of integers modulo m. IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 1998, E81-A, 2013–2018. [Google Scholar]
- Cassuto, Y.; Schwartz, M.; Bohossian, V.; Burck, J. Codes for asymmetric limited-magnitude errors with application to multi-level flash memories. IEEE Trans. Inf. Theory 2010, 56, 1582–1595. [Google Scholar] [CrossRef] [Scilit]
- Klove, T.; Bose, B. Systematic, single limited magnitude error correcting codes for flash memories. IEEE Trans. Inf. Theory 2011, 57, 4477–4487. [Google Scholar] [CrossRef] [Scilit][Green Version]
- Klove, T.; Lou, J.; Naydenova, I.; Yari, S. Some codes correcting asymmetric errors of limited magnitude. IEEE Trans. Inf. Theory 2011, 57, 7459–7472. [Google Scholar] [CrossRef] [Scilit]
- Kostadinov, H.; Morita, H.; Manev, N. Integer Codes Correcting Single Errors of Specific Types (±e1,±e2,…,±es). IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 2003, E86-A, 1843–1849. [Google Scholar]
- Kostadinov, H.; Morita, H.; Manev, N. Derivation on Bit Error Probability of Coded QAM using Integer Codes. IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 2004, E87-A, 3397–3403. [Google Scholar]
- Kostadinov, H.; Morita, H.; Iijima, N.; Han Vinck, A.J.; Manev, N. Soft Decoding of Integer Codes and Their Application to Coded Modulation. IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 2010, E39-A, 1363–1370. [Google Scholar] [CrossRef] [Scilit]
- Kostadinov, H.; Morita, H.; Manev, N.L. On (−1,+1) Error Correctable Integer Codes. IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 2010, E93-A, 2758–2761. [Google Scholar] [CrossRef] [Scilit]
- Morita, H. Nearest-Neighbor Error Correcting Codes on a Hexagonal Signal Constellation. In Proceedings of the 2015 IEEE International Symposium on Information Theory (ISIT), Hong Kong, China, 14–19 June 2015; pp. 2480–2484. [Google Scholar]
- Kostadinov, H.; Manev, N. New Integer Coded Hexagonal QAM Schemes and Their Performance in AWGN Channel. In Studies in Computational Intelligence; Georgiev, I., Kacprzyk, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2023; Volume 1076, pp. 100–110. [Google Scholar]
- Alexandrova, T.; Kostadinov, H.; Manev, N. General construction of integer codes correcting single error in t2-TQAM. Comput. Electr. Eng. 2025, 127, 110572. [Google Scholar] [CrossRef] [Scilit]
- Radonjic, A.; Vujicic, V. Integer codes correcting burst errors within a byte. IEEE Trans. Comput. 2013, 62, 411–415. [Google Scholar] [CrossRef] [Scilit]
- Radonjic, A.; Vujicic, V. Integer codes correcting single errors and burst asymmetric errors within a byte. Inf. Process. Lett. 2017, 121, 45–50. [Google Scholar] [CrossRef] [Scilit]
- Radonjic, A. (Perfect) integer codes correcting single errors. IEEE Commun. Lett. 2018, 22, 17–20. [Google Scholar] [CrossRef] [Scilit]
- Radonjic, A.; Vujicic, V. Integer codes correcting sparse byte errors. Cryptogr. Commun. 2019, 11, 1069–1077. [Google Scholar] [CrossRef] [Scilit]
- Radonjic, A. Integer Codes Correcting Double Errors and Triple-Adjacent Errors Within a Byte. IEEE Trans. Very Large Scale Integr. (VLSI) Syst. 2020, 28, 1901–1908. [Google Scholar] [CrossRef] [Scilit]
- Pokhrel, N.K.; Das, P.K. Low-density and high-density asymmetric CT-burst correcting integer codes. Adv. Math. Commun. 2024, 18, 842–856. [Google Scholar] [CrossRef] [Scilit]
- Mihaljević, M.J.; Radonjić, A.; Wang, L.; Xu, S. Security Enhanced Symmetric Key Encryption Employing an Integer Code for the Erasure Channel. Symmetry 2022, 14, 1709. [Google Scholar] [CrossRef] [Scilit]
- Kostadinov, H.; Manev, N.L.; Morita, H. Double ±1-error correctable codes and their applications to modulation schemes. In Proceedings of the Eleventh International Workshop on Algebraic and Combinatorial Coding Theory, Pamporovo, Bulgaria, 16–22 June 2008; Pamporovo, Bulgaria; pp. 155–160. [Google Scholar]
- Khachatrian, G.; Khachatryan, H. Construction of Linear Codes over Rings Zm Correcting Double ±1 or ±2 errors. Math. Probl. Comput. Sci. 2018, 49, 66–73. [Google Scholar] [CrossRef] [Scilit]
- Alexandrova, T. Construction of Integer Codes Correcting Bit Errors, Studies in Computational Intelligence (SCI, Volume 1295). In Proceedings of the 19th Annual Meeting of the Bulgarian Section of SIAM, Sofia, Bulgaria, 11–13 December 2024; Springer: Berlin/Heidelberg, Germany, 2024; Revised Selected Papers (to Appear February 2027); Available online: https://link.springer.com/book/9783032311368 (accessed on 2 November 2026).
- Matlab Documentation. Available online: https://se.mathworks.com/help/comm/error-detection-and-correction.html (accessed on 2 November 2026).
- Matlab Documentation. Available online: https://se.mathworks.com/help/comm/ug/convolutional-codes.html#fp7855 (accessed on 2 November 2026).
- Matlab Documentation. Available online: https://se.mathworks.com/help/comm/ug/convolutional-codes.html#fp7950 (accessed on 2 November 2026).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.

