20,175,216 2019-2020-1 "information security systems design basis" the second week of learning summary

20,175,216 2019-2020-1 "information security systems design basis" the second week of learning summary

Learning content summary

  • It indicates a byte object arrangement has two general rules: (in front of the most significant byte) little-endian (least significant byte first) and big endian
    difference between the two:

  • 0 or 1 logic operation only two results, and bit-level operation is performed by the bit processing.
  • Expression x >> k will k x arithmetic shift right (left fill the k significant bit) position, whereas >>> k x k will be logic (left complement of k 0) to the right.
  • To convert a complement to a larger number of data types, perform a sign extension.
  • long: 32 bit machines: 4 bytes; 64-bit machine: 8 bytes
  • Negative range larger than the range of the integer 1
  • Unsigned coded:
    B2U (X ->) = X * (X ^ 2) the sum of
  • Complement encoding (the number of computers are the most common notation mode):
    the B2T = MSB + x highest bit weight and the sum of the weights of other bits
  • To convert a complement to a larger number of data types, perform a sign extension.
  • When cast between the unsigned and signed integers of the same length there is, most of the C language to follow the underlying principle of constant bit pattern.
  • Due to the limited accuracy of the representation of floating-point operations are not bound (for example the book P20).
  • Floating-point multiplication and division by the left or right shift can be calculated.
  • Floating-point calculation: according to the table:

  • C language allows between various data types do casts. Note, however, will be converted to an unsigned negative number may get zero results and force type conversion of bit values ​​remain the same, just change the way interpret these bits.
  • C language support for all integer data types signed and unsigned operation, most of the figures are to be signed by default, so you want to create an unsigned constant must be in love with the suffix character "U" or 'u', such as 123U.
  • Zero extension and sign-extended: unsigned integer zero extension is applied, the sign extension is applied to signed integers.

  • Truncated unsigned: x '= xmod (2 ^ k) k bits truncated
  • Truncated numerical values ​​are: x '= U2 (T_k) (xmod2 ^ k)
  • Conversion between the sequence and the host network byte order byte:

Last week, the wrong question summary

Other (perception, thinking, etc., optional)
virtual machine must remember to back up, otherwise it will be lost after the collapse of the virtual machine, very troublesome.
Learning progress bar

The number of lines of code (add / accumulate) Blog amount (add / accumulate) Learning time (add / accumulate) Important growth
aims 5000 rows 30 400 hours
the first week 0/0 0/0 7/7
the second week 106/106 1/1 9/16

Guess you like

Origin www.cnblogs.com/besti20175216/p/11609546.html