IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 3, MARCH 2010 979 Optimal, Systematic, -Ary Codes Correcting All Asymmetric and Symmetric Errors of Limited Magnitude Noha Elarief and Bella Bose, Fellow, IEEE Abstract—Systematic -ary ( ) codes capable of correcting all asymmetric errors of maximum magnitude , where , are given. These codes are shown to be optimal. Further, simple encoding/decoding algorithms are described. The proposed code can be modified to design codes correcting all symmetric errors of maximum magnitude , where . Index Terms— -ary codes, asymmetric channels, error control, error correcting codes, limited magnitude error. I. INTRODUCTION C LASSICAL error control codes have been designed under the assumption of binary symmetric errors, i.e., both and errors can occur during transmission. Nevertheless, errors in some VLSI and optical systems are asymmetric in nature [5], [9]. For example, in VLSI circuits and memories, charges may leak with time but new charges will not be added. Thus, a suitable channel model for such systems is the binary asymmetric channel ( -channel) where errors are of one dominant type known a priori, say errors. In [10], Varshamov introduced the -ary asymmetric channel where the channel’s input/output symbols are over the alphabet . Moreover, such channel has the property that, when a symbol is transmitted, the corresponding received symbol is in the set , assuming a decreasing error. Similar to the asymmetric channel is the unidirectional channel; the difference is that the type of error is not known a priori. Detailed studies of asymmetric/unidirec- tional error control codes can be found in [3] and [8]. Not until recently has the notion of limited magnitude asym- metric errors been introduced [2]; we say that a vector over suffers an asymmetric error of maximum magnitude/level if and only if the corresponding channel output is such Manuscript received August 23, 2008; revised September 09, 2009. Current version published March 10, 2010. This work is supported by the NSF by Grants CCF-0701452 and CCF-0728810. N. Elarief is with the School of Electrical Engineering and Computer Science, Oregon State University, Corvallis, OR 97331 USA (e-mail: elarief@eecs.orst. edu). B. Bose is with the School of Electrical Engineering and Computer Science, Oregon State University, Corvallis, OR 97331 USA, and also with King Saud University, Riyadh 11451, Saudi Arabia (e-mail: bose@eecs.orst.edu). Communicated by G. Seroussi, Associate Editor for Coding Theory. Digital Object Identifier 10.1109/TIT.2009.2039065 that , with . Fig. 1 illus- trates the difference between the traditional -ary asymmetric channel and the -ary asymmetric channel with . In [4], an interesting application for this special case of -ary asymmetric channel was pointed out: multilevel flash memories. Unlike traditional single-level flash memories where each cell stores only one bit, multilevel flash memories achieve higher storage capacities and thus lower manufacturing costs by program- ming the cells into one of threshold voltage thereby storing bits per cell. Nevertheless, increasing the number of threshold levels imposes an important challenge [6]: the voltage difference between states is narrowed since – techni- cally – the voltage window is limited. A natural consequence is that reliability issues such as low data retention and read/write disturbs become more significant [4]; errors in such cases are typically in one dominant direction and of limited magnitude. In [1], the authors introduced codes capable of correcting all asymmetric errors of limited magnitude (or -AEC codes for short). However, the proposed codes are nonsystematic. A systematic code, where the information symbols are separated from the check symbols, is advantageous over a nonsystematic code because, in a systematic code, the data processing and en- coding/decoding can be done in parallel. In this paper, we first give a bound on the number of check digits of a systematic -AEC code. Then, we present a code that uses the minimum possible number of check symbols and is thus optimal. Further- more, properties of the -ary symmetric channel with level are explored. We show that the code construction ideas used for -AEC codes can be applied to design codes correcting all sym- metric errors of maximum level ( -SEC codes). The rest of the paper is organized as follows. In Section II, we present a background necessary to tackle the problem. In Section III, we give a lower bound on the number of check symbols needed to encode an -AEC code. A code achieving this bound is proposed in Section IV. We extend the results for -SEC codes in Section V. Finally, concluding remarks are given in Section VI. II. PRELIMINARIES It turns out that the knowledge of the maximum error level gives nice properties that can be used in the design of error cor- recting codes. We start by introducing a well-known distance metric capturing these properties as mentioned in [1] 0018-9448/$26.00 © 2010 IEEE