In this article, we determine the number of yes/no questions required to figure out a birthday (a number between 0 and 31) when up to r incorrect answers to these questions are allowed. In the language of error-correcting codes, we construct optimal (shortest possible length) codes of size 32 and minimal distance d for each positive integer d .