The method of operation of the computer (the inverted complement the original code frameshift)

Unsigned

  • Represents the range: 0-65535

Have signed

  • Indicates a range: -32768 to 32767
  • Value: 0
  • Negative: 1

There are a number (decimal) Symbol

Decimal: +0.1011 represented:
01011 decimal position 0 . 1011
decimal: -0.1011 represents:
11,011 decimal point position 1 . 1011

With a number (integer) symbols

+1100 says:
01100 decimal point position 01100 .
Represents -1100:
11100 decimal point position 11100 .

0+0=0 0-0=0 0*0=0
0+1=1 1-1=0 0*1=0
1+1=0 1-0=1 1*0=0
1+1+1=1 0-1=1 1*1=1

True value

  • With the "+" "- number" symbol is referred to as the true value

Machine number

  • The number of symbols called the number of digitized machine

Original code

Yet the absolute value of the original code symbol is represented with

  • Integer value bits with sign bit ( comma ) separated
  • Decimal sign bit value with the ( decimal ) spaced
  • example:
  • x = + 1110, the original code [x] = the original 0,1110
  • When x = -1110, the original code [x] = the original 1,1110
  • When x = 0.1101, the original code [x] = the original 0.1111
  • When x = -0.1101, the original code [x] = the original 1.1101
  • There are realistic and original code values:
  • Original code [x] = 1.0011 original, to give x = -0.0011
  • Original code [x] = the original 1,1100, to give x = -1100
  • Original code [x] = the original 0.1101, x = .1101 obtain
    the original codes "zero" has two representations:
  • [Original] = 0.0000 + 0.0000
  • [Original] = 1.0000 -0.0000

Complement

As long as the mode is determined, can be found with a negative equivalent positive (negative corrections is the complement of), so that the subtraction can be used to realize the adder

  • Positive with respect to the complement of the "model" is positive in itself
  • +7 = +7 (mod 10)
  • A positive and a negative number to complement each other, they both absolute value and it is modulus
  • -3 = +7 (mod 10) so complement = | -3 | + | 7 | = 10
  • E.g:
  • x = + 1010 [x] = 0,1010 complement (complement of its own positive)
  • x [x] = -1101 = 1,0011 i.e. complement (negative: inverted +1)
  • x = 0.1001, [x] = 0.1001 complement (complement of its own positive)
  • x = -0.0110, [x] = 1.1010 complement (negative: inverted +1)

Complement of 0 is only an expression of: [+] 0 = [Complement - 0 = 0.0000] Complement

Realistic values known Complement:
(Note that the positive and negative first determination, inverted negative, positive number does not change)

  • [X] Complement = 1.0101 x = -0.1011 (removing the original code sign bit inversion, then +1)
  • [X] Complement = 1,1110 x = -0010 (removing the original code sign bit inversion, then +1)
  • [X] Complement = 0.1101 x = 0.1101 (positive number does not change)

Inverted

x is an integer:

  • x = + 1101, the anti-code = 0,1101 (positive or inverse code itself)
  • When x = -1101, = 1,0010 inverted (negative anti-code, in addition to sign bit inversion)

x is a decimal:

  • When x = + 0.0110, the inverted = 0.0110
  • x = -0.0110, the inversion code = 1.1101

0 in the inverted two expressions:

  • [Anti] = 0.0000 + 0.0000
  • [Anti] = 1.1111 -0.0000

Frameshift

Using binary, decimal number 21 and comparing the magnitude of -21
A : x
= 21, corresponding to the binary number is +10101 , [x] complement 0,10101 =
x = -21, corresponding to the number of binary -10101 , [x ] = 1,01011 complement
if compared according complement, the 101011> 010101, wrong answer
X = 10101 plus 5 101 012 a power = +100000 110101
X = -10101 plus 5 th -10101 +100000 2 = 001011
Therefore 110101> 001011
frameshift: [x] = n-th power shifter 2 + x

E.g:

  • x = 10100 x [at] shift = 2 * 5 + x = 100000 + 10100 = 1,10100
  • x = -10100 [x] is the shift = 2 * 5 + x = 100000-10100 = 0,01100
  • With a true value and the complement frameshift differ by only one symbol bit
  • x = [x] at -10.1 thousand complement [x] = 1,01100 0,01100 shift =
Published 58 original articles · won praise 20 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_40709110/article/details/101201482