Modulo 2 is a binary algorithm, the core ofCRC calibration technology, so before we analyze the CRC algorithm, we must grasp the rules of modulo 2 operation. In the same way as arithmetic, modulo 2 also includes modulo 2 plus, modulo 2 minus, modulo
1. What is modulo 2 operation?
First of all, what is modulo 2? Modulo: The remainder, then, modulo 2, is divided by 2 to obtain the remainder.
Again, what is arithmetic? is subtraction.
That is, the modulo 2 operation, can be opened up in this way:
Key words: CRC algorithm principle; CRC verification; modulo 2 (mod 2); mod 2The CRC verification algorithm adopts a binary algorithm called "modulo 2 operation. The modulo 2 operation is the core part of the CRC operation. Therefore, before
Modulo 2 is a binary algorithm, the core of CRC calibration technology, so before we analyze the CRC algorithm, we must grasp the rules of modulo 2 operation. In the same way as arithmetic, modulo 2 also includes modulo 2 plus, modulo 2 minus,
Note: This is just my personal understanding. It may be incorrect.
For integers A and N, the modulo n operation is to calculate the remainder of a divided by N.
If a = 10, n = 3, the quotient of a divided by N is 3, and the remainder is 1.
C
Detailed explanation of the algorithm for implementing the Fast Power modulo in Java and detailed explanation of the java Algorithm
The introduction of the Fast Power modulo algorithm is presented by the limitations of the Simple Algorithm for
Ideas:Is difficult// C (M + N, M) * C (Q + M-P, Q)-C (N + M-P, N) * C (M + Q, M );Code:# Include "cstdlib" # include "cstdio" # include "cstring" # include "cmath" # include "stack" # include "algorithm" # include "iostream" using namespace std; #
I. Problem description:
Calculate (a ^ power) % m, where power is a non-negative big integer, A, M is an integer greater than 1.
Ii. Problem Analysis:
Obviously, power is a big integer, so the overflow of Power computing must be considered. How can
[Problem]Calculate the value of a ** B % C."**" Indicates the power (which is expressed in Python); "%" indicates the modulo operation.
[Analysis]First, the following formula is obtained based on the nature of the modulo operation:(A * B) % C =
Beijing 2008Time limit:1000/1000 MS (java/others) Memory limit:32768/65535 K (java/others)Total submission (s): 741 Accepted Submission (s): 291Problem Descriptionas We all know, the next Olympic games would be held in Beijing in 2008. So the year
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.