Suppose we want to sent five 4-bit numbers
: 7, 11, 12, 0, 6
Add all numbers and place the sum as the last number
: 7, 11, 12, 0, 6, 36
The receiver checks for errors by adding all numbers and comparing with the last number
: 7 + 11 + 12 + 0 + 6 = 36 -> no error
We can also do this by adding minus sign to the sum
: 7, 11, 12, 0, 6, -36
The receiver simply adds all numbers and see if it is zero
: 7 + 11 + 12 + 0 + (-36) = 0 -> no error
We calculate a wrapped sum
36 = 100100
keep the lower 4 bits, and add the number to the higher 2 bits
0100
+ `10
----
0110
The wrapped sum of 36 is 6
63 = 111111
1111
+ 11
----
10010
여전히 4-bit가 아니다!
한번 더 돌린다
0010
+ ``1
----
0011
The wrapped sum of 63 is 3