The following barcodes all have the same content (and are equally valid) but each bit is masked
using a number of formula depending on the bit row and column position.
The final symbols are then scanned
for unwanted "artefacts" and rated accordingly. The symbol with the least number of deprecated features is
selected as the final symbol and the MASK INDEX used (in this case 5) is recorded in the appropriate part
of the symbol. This process is computationally expensive and many vendors simply skip this stage and select a mask index
at random. In a "noisy" reader enviroment this may make recognition difficult.

Mask Index | formula | symbol |

000 | (i + j) mod 2 = 0 | |

001 | i mod 2 = 0 | |

010 | j mod 3 = 0 | |

011 | (i + j) mod 3 = 0 | |

100 | ((i div 2) + (j div 3)) mod 2 = 0 | |

101 | (i j) mod 2 + (i j) mod 3 = 0 | |

110 | ((i j) mod 2 + (i j) mod 3) mod 2 = 0 | |

111 | ((i+j) mod 2 + (i j) mod 3) mod 2 = 0 |