C-notes - Principles of Computer

**************************************************************************

1. The composition and program computers running processes

 

5 equipment:

       input device

       Main memory

       Operator

       Output Device

Controller Hub

 

CPU: operator + + Controller register

 

 

Main memory: memory

       Bit: b 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

Byte: B 1B = 8b     

      KB   1KB  = 1024 B    =  2^10 b

     MB   1MB = 1024 KB   =  2^20 b

     GB   1GB = 1024 MB   =  2^30 b

     TB   1TB = 1024 GB    =  2^40 b

 

 

 

Hex:

       Decimal: 0123456789 thereof. Every 10 into a

                 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20

 

       Binary: 01 every 2 into a composition

       0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

 

       Octal: 01234567 1 composition every 8 into

              00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17 20

 

       Hex: 0 1 2 3 4 5 6 7 8 9 abcdef every 16 into a composition

       00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10

       10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20

 

2. Base conversion:

10 hexadecimal is converted into binary, octal, hexadecimal:

              Flounder division, in reverse order value.

 Binary, octal, hexadecimal switch 10 decimal.

              Adding power and position.

 

 

Binary decimal

1                        1

10                      2

100                    4

1000                  8

10000              16

100000            32

1000000          64

10000000      128

100000000    256

1 square behind a few times is 0 2.

 

Binary to octal conversion.

       Demolition 3.

 

Hexadecimal is converted into binary.

      Demolition of four.

 

Computer addition. +

Original code: the number of machines a number, so that the most significant bit as a sign bit.

       18+2=20

       Suppose: 0001 0010 (18) 0000 0010 + (2) = 00010100 (20) of the

 

       20-2 = 18-20 + (- 2) = 18

       0001 0100(20) + 1000 0010(-2) = 1001 0110(-22)

 

Anti-code: positive anti-code is the original code itself

              Inverted sign bit negative unchanged, the rest of you negated.

              Calculation inverted out, is obtained inverted.

              2000010100 (original) 00,010,100 (trans)

              -210000010 (original) 11111101 (trans)

      

            20-2 =17?

 

Complement: complement is a positive number of the original code itself

              Anti-complement +1 negative (sign bit change, remaining after you inverted + 1)

              Calculated complement.

 

       2000010100 (original) 00,010,100 (trans) 00,010,100 (s)

      -210,000,010 (original) 11,111,101 (trans) 1111 1110 (supplement) 

      

       20 + (-2) =18

 **************************************************************************/

To a: memory inside the computer, are stored complement.

1. The program calculation process;

a) 5 stores input devices output control operation

b) CPU + control register operator +

2. The binary conversion between binary octal 10 Hexadecimal

Binary decimal

1                        1

10                      2

100                    4

1000                  8

10000              16

100000            32

1000000          64

10000000      128

100000000    256

1 square behind a few times is 0 2.

Octal and binary operators 3

Hexadecimal and binary operators 4

 

Anti-code complement the original code

       Positive anti-code complement the original code all the same.

       negative number

       What is the code figure out what the code.

 

Guess you like

Origin www.cnblogs.com/noob0820/p/11234056.html