Parity is a
mathematical term that describes the property of an
integer's inclusion in one of two categories:
even or
odd. An integer is even if it is 'evenly
divisible' by two and odd if it is not even.
[1] For example, 6 is even because there is no
remainder when dividing it by 2. By contrast, 3, 5, 7, 21 leave a remainder of 1 when divided by 2. Examples of even numbers include −4, 0, 8, and 1734. In particular,
zero is an even number.
[2] Some examples of odd numbers are −5, 3, 9, and 73. Parity does not apply to non-integer numbers.
A formal definition of an even number is that it is an integer of the form
n = 2
k, where
k is an integer;
[3] it can then be shown that an odd number is an integer of the form
n = 2
k + 1. This classification applies only to integers, i.e., non-integers like 1/2 or 4.201 are neither even nor odd.
The
sets of even and odd numbers can be defined as following:
[4]
A number (i.e., integer) expressed in the
decimal numeral system is even or odd according to whether its last digit is even or odd. That is, if the last digit is 1, 3, 5, 7, or 9, then it is odd; otherwise it is even. The same idea will work using any even base. In particular, a number expressed in the
binary numeral system is odd if its last digit is 1 and even if its last digit is 0. In an odd base, the number is even according to the sum of its digits – it is even if and only if the sum of its digits is even.
[5]
Copypasta from Wikipedia is...