Software designer _ computer system basis (1.1)

Basic knowledge of computer systems 1.1

1.1.1 The basic components of computer hardware

1.1.2 a central processing unit

1.1.3 Data representation

Number of machines: binary data computer

True value: number of machines corresponding to the actual

Unsigned number of machines is a positive number; if the agreed position of the decimal point next to the lowest bit of the machine, it is pure integer; if agreed decimal point position before the highest bit machine, it is pure decimal.

A signed machine, the machine indicates the highest bit of the sign bit indicates the remaining value; Similarly the above conventions.

Textbooks are as follows:

 

 

 1) the original code: the most significant bit is the sign bit, 0 represents a positive number, the negative number represents 1 , n-1 remaining bits of the absolute value of the value; (n represents the number of long machines, machines with n binary data representing)

      +1 original code: 00000001 (0 th power of 2); -1 original code: 10000001

      +45 original code: 0 010 1101 (2, 5 th + 3 th + 2 th + 0 th); original code -45: . 1 010 1101

      +0.5 original code: 0 .100 0000 (0.5 = 1/2, i.e. 2 -1 power) after the decimal point of -12, -2, -3 ... power;

      -0.5 original code: . 1 . 1,000,000 (the materials used . 1 1,000,000, ◇ indicates the position of the decimal point)

    A value of 0 represents the original code two kinds: +0 original code: 0 000 0000; -0 primitive: . 1 000 0000  

Textbooks are as follows:

 

 2) Anti-code: the most significant bit is the sign bit, 0 represents a positive number, the negative number represents 1 ; the same positive anti-code = original code, code the absolute value of the negative inverse bitwise inverse ;

    +1: inverted (i.e., the original code): 0 000 0001; trans -1 Code: . 1 111 1110 (i.e. all bits inverted + 1 , since the most significant bit represents the sign be reversed)

   +0.5 anti-code: 0 100 0000;  -0.5 inverted: . 1 001 1111 (the textbook by indicating the position of the decimal point ◇)

     A value of 0 represents the original code two kinds: Anti +0 Code: 00000000; -0 inversion code: 11111111 

Textbooks are as follows:

  3) complement: the most significant bit is the sign bit indicates a positive number of 0, 1 represents a negative sign; complement positive number = = trans original code symbol; negative end of the inverted complement = +1;

    +1 Complement: 00000001   ; -1 Complement: 11111111   (trans code: 11111110 + 1)

    +45 Complement: 00101101; -45 Complement: 11010011

    0.5 Complement: 0 100 0000; -0.5 complement : . 1 100 0000 (anti-code: . 1 001 1111 + 1'd need to carry the front, the textbook by decimal point position ◇)

        0 has a unique numerical code: +0 Complement: 00000000; -0 Complement: 0000000 

Textbooks are as follows:

   4) shift: in fact only need to complement the sign bit inversion to give the corresponding shift 

    +1 frameshift: 1 000 0001 (+1 original code 0 000 0001 2 requires offset 7 th, to direct it pure number, plus one in the first place directly );

     -1 frameshift: 01111111 ([7] th power of 2 -1 + 128 -> 127, to the need for adding a negative offset, converted to binary )

    Shift +45 Code: 10101101; -45 shift: 0 101 0011 (-45 complement:  . 1 101 0011)

    +0.5 frameshift: 1  100 0000; (Complement:  0   100 0000, converted into 1 + 0.5 = 1.5, for a positive decimal fraction is the most significant bit is replaced by a frameshift 1 ),

        -0.5 shift: 0   100 0000; (Complement: 1   100 0000, converted into a [+ -] = 0.5 0.5),

    +0 frameshift: 1000 0000; -0 shift: 1000 0000

 2) fixed-point and floating-point

  teaching material:

 

 

  //. . . . . Unfinished

 

 

 

 

 

1.1.4 check code

 Ensure the accuracy of data during transmission, is thought to encode data into legitimate and error coding, coding error becomes legitimate if the error code, which can detect whether the data is wrong.

Three common: parity codes, Hamming codes, cyclic redundancy check code.

 

 

 

Guess you like

Origin www.cnblogs.com/coloz/p/11254335.html
Recommended