This document describes how genetic algorithms work through an example. It shows three iterations of a genetic algorithm optimizing a function y=x1-x2, where x1 and x2 are integers between 0-7 and 0-3 respectively. In each iteration, the algorithm calculates the y value for different combinations of x1 and x2. The best solutions are used to generate the values for the next iteration, getting closer to the highest y value each time.