1. conceptual understanding (note that the anti-complement code and the original code is positive, negative is the inverted complement plus 1)
positive: the original code symbol = = trans complement
positive example (number 3): 11 (formerly code) = 11 (inverted) = 11 (complement)
negative: invert the original code = inverted; 1 = + inverted complement
negative example (the number -3): 111 (original code) -> 100 (anti-code ) -> 101 (complement) (Note that the first sign bit is 1, n is 0, 1 negative)
2. The code conversion and complement
to Example -3:
original code -> complement: 111 (formerly code) = 100 (inverted) = 101 (complement)
Law Analysis: In Case 5, the original code and the inverted variables a and b respectively in place
provided: original code = a = 101; the inverted = b = 010; + trans original code symbol = 111 = sum;
according to the original code - rule> complement, by a push on a:
a + B = SUM;
complement the original code = sum- + 1 = sum-a + 1 ;
the complement -> the original code rule, by a push on a:
complement = sum-a + 1;
positive: the original code symbol = = trans complement
positive example (number 3): 11 (formerly code) = 11 (inverted) = 11 (complement)
negative: invert the original code = inverted; 1 = + inverted complement
negative example (the number -3): 111 (original code) -> 100 (anti-code ) -> 101 (complement) (Note that the first sign bit is 1, n is 0, 1 negative)
2. The code conversion and complement
to Example -3:
original code -> complement: 111 (formerly code) = 100 (inverted) = 101 (complement)
Complement -> original code: 101 (complement) -> 110-> 111 (original code)
Law Analysis: In Case 5, the original code and the inverted variables a and b respectively in place
provided: original code = a = 101; the inverted = b = 010; + trans original code symbol = 111 = sum;
according to the original code - rule> complement, by a push on a:
a + B = SUM;
complement the original code = sum- + 1 = sum-a + 1 ;
the complement -> the original code rule, by a push on a:
complement = sum-a + 1;
Invert +1: sum- (sum-a + 1) + 1 = a-1 + 1 = a = original code
Summary: The original code -> conversion rules apply equally to complement complement -> original code, but also negated plus 1