 When doing erase or program operations, the device can detect blocks that fail to program or erase and mark them bad.The data is then written to a different, good block, and the bad block map is updated.Hamming codes are the most commonly used ECC for SLC NAND flash.