A method for mapping a signed computational weight into a group of memory cells of a memory array of an in-memory computation (IMC) device configured to perform an in-memory computation operation, wherein the group of memory cells is configured to provide an overall current contribution during the execution of the in-memory computation operation which is a function of the signed computational weight, and wherein the group of memory cells comprises a first set of memory cells configured to provide a first current contribution during the execution of the in-memory computation operation that is a function of the programming of the first set of memory cells, and a second set of memory cells configured to provide a second current contribution during the execution of the in-memory computation operation that is a function of the programming of the second set of memory cells, the overall current contribution being a function of a difference between the first current contribution and the second current contribution, the method comprising:
- programming at least one memory cell of the first set of memory cells at a first programming state based on the computational weight;
- detecting a programming error of the at least one memory cell of the first set of memory cells, the programming error being indicative of an error between a target programming state of the at least one memory cell of the first set of memory cells and an actual programmed state of the at least one memory cell of the first set of memory cells;
- and
- programming at least one memory cell of the second set of memory cells at a second programming state including a corrective value based on the programming error.