Pokédex flags

Pokédex flags are memory addresses in the Pokémon games that mark whether a Pokémon is categorized as 'seen' or 'own' in the Pokédex. Pokédex flags can therefore be categorized into two types - 'encounter' and 'capture' flags. Encounter flags are written to whenever the player has seen a certain Pokédex number, while capture flags are written to whenever the player has captured a Pokémon with a certain Pokédex number. If a capture flag is on, capturing a Pokémon with the relevant Pokédex number will not bring up the Pokédex.

Glitch Pokédex flags in Generation I
Glitch Pokédex flags are most known in the Generation I games for the effects that they can have on the player's item pack. The glitch Pokémon MissingNo. along with 'M (00), g g, and $ are notorious for increasing the sixth Bag slot by 128 unless the number of items in the slot is greater than or equal to 128. This is due to their Pokédex number of #000, which is considered by the game as #256. Encounter flags are normally stored in 19 bytes [D30A-D31C] (the bytes are offset by -1 in Yellow), each which can hold 8 bits (2^0+2^1+...2^7). These addresses account for seeing Pokémon #001-#152 (the last bit is unused, but it appears in the Pokédex as, MissingNo., or ). When the game attempts to account for seeing Pokémon with Pokédex numbers greater than 152, the game writes to bytes beginning from D31D (D31C in Yellow) which mark addresses in the player's Bag. Due to this effect, when the player encounters a #000 (#256), the game sets the upper bit (2^7) on to address D329 (D328 in Yellow) - adding 128 items to the sixth position in the player's bag.

Encounter flags
Below is a table indexing the effects of seeing glitch Pokémon with invalid Pokédex numbers. Invalid encounter flags, with the exception of family #152 will affect the player's bag in some way. These effects range from the changing the number of items in the bag (though the only glitch Pokémon in English versions that is known to affect this byte; 4(h4? freezes the game when it appears on the opponent's side), up to changing the quantity of item 6.

Capture flags
Below is a table indexing the effects of capturing glitch Pokémon with invalid Pokédex numbers. With the exception of family #152, the capture flags of non-hybrid glitch Pokémon correspond to seeing a valid Pokémon. For example, the capture flag for MissingNo. and other #000 Pokémon corresponds to seeing. In this case, if the player has already encountered and captures a #000 Pokémon, the player can prevent its Pokédex entry from loading and avoid the Rhydon glitch.