Punch-Out! and Metroid are the two first games I played that used a password system to go back to where you left when my parents made me stop playing. I was always wondering how they worked and as I got older and eventually studied computer sciences, I understood that they are only a simple mean of saving specific information together and then obfuscating it so the player could not easily decipher it.
Allan Blomquist wrote an amazing piece on the Punch-Out! password system detailing what information is saved and how it’s being encrypted so that it only becomes a series of 10 numbers. With examples and computer nerd stuff, it’s not for everyone, but you should nonetheless read it through, even if you don’t understand all the bit shifting. Early Nintendo ingenuity at its best!