Abstract:
Some of the embodiments of the present disclosure provide a method including receiving data to be stored in a memory, the data including (i) data bits and (ii) a tag indicating that one or more of the data bits are corrupted; generating eight error correction code (ECC) bits corresponding to the data bits of the data; in response to the data including the tag indicating that one or more of the data bits are corrupted, modifying seven bits of the eight ECC bits to generate modified ECC bits, wherein the seven bits of the eight ECC bits are modified to indicate that one or more of the corresponding data bits are corrupted; and writing the data bits, along with the modified ECC bits, to the memory. Other embodiments are also described and claimed.