It has always been a wonder why Pac-Man crashes on level 256, ever since Billy Mitchell beat Pac-Man back in '99.
The reason for this is because the NES, which runs on 6502 Assembly, was built with an 8 bit processor - the MOS 6502. It had 2 bytes of addressing; 8 bits (1 byte) for the opcode (instruction), and 8 bits for the operand (the value for the instruction). This means that each address could only carry a maximum value of 255 (FF in Hexadecimal) for the instruction. FF is the maximum value a single byte can hold. The processor can only hold a 1 byte value for each instruction per each address.
Therefore, the game will glitch or crash at level 256, because it wasn't programmed to have an ending and to just continue on. The game crashes, because the code isn't telling it to stop, and the memory has been filled.
There, you just learned something new.
By the way, I wrote this in my own words.
The reason for this is because the NES, which runs on 6502 Assembly, was built with an 8 bit processor - the MOS 6502. It had 2 bytes of addressing; 8 bits (1 byte) for the opcode (instruction), and 8 bits for the operand (the value for the instruction). This means that each address could only carry a maximum value of 255 (FF in Hexadecimal) for the instruction. FF is the maximum value a single byte can hold. The processor can only hold a 1 byte value for each instruction per each address.
Therefore, the game will glitch or crash at level 256, because it wasn't programmed to have an ending and to just continue on. The game crashes, because the code isn't telling it to stop, and the memory has been filled.
There, you just learned something new.
By the way, I wrote this in my own words.