First, the numbers are aligned:
In the vertical calculation of carry-free addition, it is necessary to align the numbers involved in the calculation according to the number of digits, so that the numbers with the same number of digits are in the same column. This can make the calculation clearer and facilitate the bit-by-bit addition.
Second, from right to left, add bit by bit:
On the basis of alignment, add it bit by bit from right to left. Add from the lowest bits, and then calculate bit by bit to the left until the highest bit (or the highest bit of the longest number). This can ensure the correct order of calculation and avoid mistakes.
Third, carry processing:
In non-carry addition, if the result of addition exceeds the numerical range of a certain bit, the result cannot be simply written on that bit, but needs to be carried. When the result of a bit exceeds the maximum value that the bit can represent, it is necessary to carry it to the left and add the carried value to the calculation of higher bits.
Fourth, pay attention to the adjustment of value:
When adding without carry, you may encounter some special situations, such as the result of a certain bit is 10, 20, 30, etc. In this case, it is necessary to adjust the result of this bit to one digit and add the carry value to the calculation of higher digits.
Verb (short for verb) Check the calculation result:
After the carry-free addition is completed, it is necessary to check the calculation results to ensure the correctness of the calculation. You can view the result of bitwise addition and compare it with other methods, such as carry addition in vertical calculation.
Sixth, expand knowledge:
1, carry addition and carry addition
Carry addition is a common addition operation in our daily life. When the result of a bit exceeds 9, we need to carry it to the left. Carry-free addition is to add without considering carry, and only add each digit.
2, the application of carry-free addition:
Carry-free addition has some special application scenarios, such as calculating checksum, digital check code, coding check and so on. Because carry-free addition can reduce the complexity of calculation, it is suitable for some scenes that require high calculation speed.