Smart bit-based system to store states in a grid