Avoiding underflow when identifying neighbours of a cell in a grid by using modulo
Using modular arithmetic here is equivalent to playing the game of life on a torus. Suppose you start with a $100\times 100$ grid with rows and columns numbered $0, \dots, 99$. The modular arithmetic says that $0-1\equiv 99$, which means that row&nbsp;$99$ is above row&nbsp;$0$ as well as below row&nbsp;$98$ and, similarly, column&nbsp;$99$ is to the left of column&nbsp;$0$ as well as to the right of column&nbsp;$98$.

This isn't equivalent to saying that there is nothing above row&nbsp;$0$ and nothing below row&nbsp;$99$.