To minimize times of write in a non-volatile memory in a binary counter to be realized by reading a data word stored in the non-volatile memory, decrementing/incrementing it and rewriting it in the non-volatile memory.
The data word is stored in a form of at least two memory words in the non-volatile memory 1, memory words of the data word are read from the non-volatile memory 1, k permutation bits of the data word and stored in a working memory 2 while performing an inverse reordering, an inverse bijective mapping function (permutation) is applied to the k permutation bits of the data word, the data word is decremented/incremented, the bijective mapping function (permutation) is applied to the k permutation bits of the data word, a reordering of the k permutation bits is performed and only a memory word deviated from the memory word stored in the non-volatile memory 1 is stored in the non-volatile memory 1 again.