In this work, we study a new model of defect memory cells, called partially stuck-at memory cells, which is motivated by the behavior of multi-level cells in non-volatile memories such as flash memories and phase change memories. If a cell can store the q levels 0, 1, \dots, q-1, we say that it is partially stuck-at level s, where 1 \leq s \leq q-1, if it can only store values which are at least s. We follow the common setup where the encoder knows the positions and levels of the partially stuck-at cells whereas the decoder does not.

Our main contribution in the paper is the study of codes for masking partially stuck-at cells. We first derive lower bounds on the redundancy of such codes and upper bounds by two trivial constructions. We then present three code constructions, by first considering the case where the cells are partially stuck-at level s=1. The first construction works for u<q and is asymptotically optimal if u+1 divides q. The second construction uses the Reduced Row Echelon form of matrices to generate codes for the case u=q, and the third construction solves the case of arbitrary u by using codes which mask binary stuck-at cells. We then show how to generalize all constructions for arbitrary levels. Furthermore, we study the dual defect model in which cells cannot reach higher levels, and show that codes for partially stuck-at cells can be used to mask this type of defects as well. Lastly, we analyze the capacity of the partially stuck-at memory channel and study how far our constructions are from the capacity.