Personality value: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
m
→‎Shininess: bitwise means bit not byte
m (→‎Shininess: bitwise means bit not byte)
Line 162: Line 162:
Variables ''E'' and ''F'' are declared to hold the values that result.
Variables ''E'' and ''F'' are declared to hold the values that result.


A bitwise {{wp|exclusive or}} (''xor'') operation (such as ''a'' xor ''b'' = ''c'') is equivalent to saying "If each byte of ''a'' ≠ ''b'', ''c'' is true." In other words, 11010111 xor 01101010 = 10111101. Each xor in the operation is a bitwise xor.
A bitwise {{wp|exclusive or}} (''xor'') operation (such as ''a'' xor ''b'' = ''c'') is equivalent to saying "If each bit of ''a'' ≠ ''b'', ''c'' is true." In other words, 11010111 xor 01101010 = 10111101. Each xor in the operation is a bitwise xor.


''E'' = ''ID<sub>Trainer</sub>'' xor ''ID<sub>Secret</sub>''
''E'' = ''ID<sub>Trainer</sub>'' xor ''ID<sub>Secret</sub>''
2,837

edits

Navigation menu