Neural associative memory storing gray-coded gray-scale images