Have ideal, have ambition, know self-discipline, believe in the near future you will be successful!

Open wechat and search for “After kids go to school” to follow this different programmer.

  • First, the foundation of microcomputer
  • 1.1 Representation of information in computers
  • ?1.2 Basic composition of microcomputer
  • 1.3 Number system in computer
    • 1.3.1 Common counting system

First, the foundation of microcomputer

1.1 Representation of information in computers

Information is an important carrier in computer, which is divided into numerical data and non-numerical data.

Numerical data are the numbers we see in our lives, such as the air conditioning temperature in a room; Non-numerical data refers to literal symbols and so on. In order to make the electronic computer can process the information, it must be processed in advance. For numerical data, we commonly use decimal value in life, but in the computer, we use binary data. There are two kinds of numerical data, one is signed data, the other is unsigned data. There are source codes, inverse codes, and complement codes in signed data, and I will explain the operation and analysis of source codes, inverse codes, and complement codes in the following sections.

Non-numerical data is the common words or symbols in our life, etc., in the electronic computer is also to be encoded, can be processed in the computer. And then I’m going to talk about one of the more common ones: ASCLL.

?
B6bC4A.png

1.2 Basic composition of microcomputer

The basic composition of microcomputer includes hardware system and software system. The main hardware structure of modern computer is von Neumann structure. The software system structure is composed of system software and application software. The hardware structure of modern computer is designed and implemented by bus structure. Bus structure includes CPU, bus, memory, IO interface, IO device.

?
B6bXPs.png

1.3 Number system in computer

1.3.1 Common counting system

The number system is used to solve the representation of the number. The same number can be expressed in a variety of different bases, such as binary, decimal, octal, hexadecimal, etc.

Decimal number: 0~9, base 10, the high weight is 10 times the low weight, the algorithm is every ten into one, borrow one when ten. The suffix d is used for programming.

Binary numbers: The storage, operations, and input/output of internal information in a computer are represented by binary numbers with the suffix B.

  • Features:

    Each code is either 0 or 1, and the high weight is twice the low weight.

    (1 1 0 1 1 1)

    (2^3^ 2^2^ 1^ 2^0^. 2^-1^ 2^-2^)

    The addition and subtraction algorithm: every two, enter one, borrow one as two

    Binary numbers are represented by the suffix B.

    Hex number:

    • People most commonly used is decimal, but in computers for the convenience of physical implementation, the use of binary
    • For the convenience of writing and reading, hexadecimal numbers are often used to represent binary
    • Four binary digits are represented by one hexadecimal number
    • The hexadecimal suffix is H
    ?
    B6qDij.png

    Familiarity with base-to-base conversions can lay the foundation for future programming.

    Hexadecimal features:

    (29 A F) ~16~

    (16 16 ^ 3 ^ ^ 16 ^ 0 ^ ^ 1 ^ 2 ^ 16)

    Each code 0 to 9, A to F, A total of 16 digits, base 16

    The high weight is 16 times the low weight

    The addition and subtraction algorithm: advance 1 to 16, borrow 1 to become 16

    ?
    Bci6Nq.png

    Two, eight, hexadecimal numbers -> decimal

    For example :(1 1 0 1 1 1)~2~

    = 1 * ^ 3 ^ 2 + 1 * 2 ^ ^ 2 + 0 x ^ 1 ^ 2 + 1 + 1 x 2 x 2 ^ 0 ^ ^ – ^ 1 + 1 * 2 ^ – ^ 2

    = (13.75) ~ 10 ~

    Binary -> hexadecimal

    Algorithm: A group of four – digit binary numbers, each group with an equivalent hexadecimal replacement

    For example: (101011.11) ~ 2 ~ = (1.1100 10101) ~ 2 ~ = (2 b) C) ~ ~ 16

    Conversion from hexadecimal to binary

    A hexadecimal number is substituted for a four-digit binary number

    For example :(17e.58)~16~ = (0001,0111,1110.0101,1000)~2~

    The method of the above two transformations is the same, the high level is insufficient, the left side is filled with 0, the low level is insufficient, the right side is filled with 0.

    Decimal number –> binary number

    Algorithm: divide by 2 mod, until the quotient is 0, the remainder is inverted.

    Decimal number Pure decimal -> binary number

    Algorithm: multiply by 2 to round, until the fractional part of the product is 0, the integer part in order.

    ?
    B6bpAH.png

    Decimal with decimal –> binary

    Algorithm: integer, pure decimal, respectively, and then merge

    (13.8125) ~ 10 ~ ~ = (1101.1101) ~ 2

    The last

    The more you know, the more you don’t know. See you next time for more exciting content!