A non-transitory machine-readable storage medium storing machine-readable instructions which, when executed by a computing device according to claim 4, cause the computing device to: for each of a plurality of stored sectors of a stored program to be updated to a target program until each of the plurality of stored sectors has been processed: obtain stored bits (302-m, 402-m, 502-m) stored on a flash memory, each of the stored bits (302-m, 402-m, 502-m) in a set state or an unset state wherein the stored bits (302-m, 402-m, 502-m) form a stored sector (304-n, 400, 500) of the stored program, and the stored sector is a subset of the stored bits which form the program; obtain target bits (312-m, 412-m, 512-m) wherein the target bits (312-m, 412-m, 512-m) form a target sector (314-n, 410, 510) of the target program, each of the target bits (312-m, 412-m, 512-m) in the set state or the unset state, wherein each target bit (312-m, 412-m, 512-m) corresponds to a stored bit (302-m, 402-m, 502-m) to update the stored bit (302-m, 402-m, 502-m); iteratively determine for each of the stored bits if a stored bit matches the corresponding target bit and if so, determine whether any sectors remain in the program to process to update the program; wherein, if any stored bit does not match the corresponding target bit, further determine whether, for one stored bit (302-m, 402-m, 502-m) in the set state, the corresponding target bit (312-m, 412-m, 512-m) is in the unset state; and when the further determination is positive: set the stored bits (302-m, 402-m, 502-m) to the unset state; and after setting the stored bits (302-m, 402-m, 502-m) to the unset state, update the stored bits (302-m, 402-m, 502-m) to match the corresponding target bits (312-m, 412-m, 512-m); when the further determination is negative: update the stored bits (302-m, 402-m, 502-m) to match the corresponding target bits (312-m, 412-m, 512-m), and after updating the stored bits (302-m, 402-m, 502-m) to match the corresponding target bits, determine whether any sectors remain in the program to process to update the program. obtain stored bits (302-m, 402-m, 502-m) stored on a flash memory, each of the stored bits (302-m, 402-m, 502-m) in a set state or an unset state wherein the stored bits (302-m, 402-m, 502-m) form a stored sector (304-n, 400, 500) of the stored program, and the stored sector is a subset of the stored bits which form the program; obtain target bits (312-m, 412-m, 512-m) wherein the target bits (312-m, 412-m, 512-m) form a target sector (314-n, 410, 510) of the target program, each of the target bits (312-m, 412-m, 512-m) in the set state or the unset state, wherein each target bit (312-m, 412-m, 512-m) corresponds to a stored bit (302-m, 402-m, 502-m) to update the stored bit (302-m, 402-m, 502-m); iteratively determine for each of the stored bits if a stored bit matches the corresponding target bit and if so, determine whether any sectors remain in the program to process to update the program; wherein, if any stored bit does not match the corresponding target bit, further determine whether, for one stored bit (302-m, 402-m, 502-m) in the set state, the corresponding target bit (312-m, 412-m, 512-m) is in the unset state; and when the further determination is positive: set the stored bits (302-m, 402-m, 502-m) to the unset state; and after setting the stored bits (302-m, 402-m, 502-m) to the unset state, update the stored bits (302-m, 402-m, 502-m) to match the corresponding target bits (312-m, 412-m, 512-m); set the stored bits (302-m, 402-m, 502-m) to the unset state; and after setting the stored bits (302-m, 402-m, 502-m) to the unset state, update the stored bits (302-m, 402-m, 502-m) to match the corresponding target bits (312-m, 412-m, 512-m); when the further determination is negative: update the stored bits (302-m, 402-m, 502-m) to match the corresponding target bits (312-m, 412-m, 512-m), and after updating the stored bits (302-m, 402-m, 502-m) to match the corresponding target bits, determine whether any sectors remain in the program to process to update the program.