The state transformation function of an MWC generator is one step of Montgomery reduction modulo "p". The state is a large integer with most significant word "c""n"−1 and least significant word "x""n"−"r". Each step, "x""n"−"r"·("abr"−1) is added to this integer. This is done in two parts: −1·"x""n"−"r" is added to "x""n"−"r", resulting in a least significant word of zero. And second, "a"·"x""n"−"r" is added to the carry. This makes the integer one word longer, producing two new most significant words "xn" and "cn".