# Online Encyclopedia

# Finite field arithmetic

**Arithmetic in a finite field** is different from standard arithmetic. By definition, all operations must always yield results that remain within the field.

## Notation

Although elements of a finite field can be expressed in numerical form (i.e., hexadecimal, binary, etc.), it is often found convenient to express them as polynomials, with each term in the polynomials representing the bits in the elements' binary expressions. For example, the following are equivalent representations of the same value:

- Hexadecimal: {53}
- Binary: {01010011}
- Polynomial:
*x*^{6}+*x*^{4}+*x*+ 1

The exponents in the polynomial notation serve as "tags", making it possible to keep track of each bit's value throughout arithmetical manipulation, without the need for zero-value placeholders or alignment of digits into columns. If hexadecimal or binary notation is used, braces ( "{" and "}" ) or similar devices are commonly used to indicate that the value is an element of a field.

## Addition and subtraction

In a finite field with characteristic 2, addition and subtraction are identical, and are accomplished using the XOR operator. Thus,

- Hexadecimal: {53} + {CA} = {99}
- Binary: {01010011} + {11001010} = {10011001}
- Polynomial: (
*x*^{6}+*x*^{4}+*x*+ 1) + (*x*^{7}+*x*^{6}+*x*^{3}+*x*) =*x*^{7}+*x*^{4}+*x*^{3}+ 1

## Multiplication

Multiplication in a finite field is multiplication modulo the irreducible polynomial used to define the finite field. (I.e., it is multiplication followed by division using the irreducible polynomial as the divisor—the remainder is the product.) The symbol "•" may be used to denote multiplication in a finite field.

For example, if the irreducible polynomial used is *f*(*x*) = *x*^{8} + *x*^{4} + *x*^{3} + *x* + 1, then {53} • {CA} = {01} because

(*x*^{6} + *x*^{4} + *x* + 1)(*x*^{7} + *x*^{6} + *x*^{3} + *x*) =

*x*^{13} + *x*^{12} + *x*^{9} + + *x*^{7}*x*^{11} + *x*^{10} + + *x*^{7}*x*^{5} + *x*^{8} + + *x*^{7}*x*^{4} + *x*^{2} + + *x*^{7}*x*^{6} + *x*^{3} + *x* =

*x*^{13} + *x*^{12} + *x*^{9} + *x*^{11} + *x*^{10} + *x*^{5} + *x*^{8} + *x*^{4} + *x*^{2} + *x*^{6} + *x*^{3} + *x*

and

*x*^{13} + *x*^{12} + *x*^{9} + *x*^{11} + *x*^{10} + *x*^{5} + *x*^{8} + *x*^{4} + *x*^{2} + *x*^{6} + *x*^{3} + *x* modulo *x*^{8} + *x*^{4} + *x*^{3} + *x* + 1 (= 11111101111110 mod 100011011) = 1, which can be demonstrated through long division (shown using binary notation, since it lends itself well to the task):

111101100011011)11111101111110100011011111000001111010001101111011010111010001101110101110110100011011010001101000000000010001101010001101100000001

(The elements {53} and {CA} happen to be multiplicative inverses of one another since their product is 1.)