A compilation Start Basics

Welcome to the world of binary computer

Observation and Reflection:

Conversion between hexadecimal:

10 Hex: 0123456789

Two 229: 01

Octal: 01234567

Hex: 0123456789abcdef

 

In order not represent misunderstanding, after the binary add B, followed by the hexadecimal H,

 

Binary Decimal: 1011 rpm decimal 1 * 2 . 3  + 0 * 2 2 + 1 * 2 1 + 1 * 2 0 = 11   

A representative of each digital is not the same, for example, in binary

4 represent 1101 8421

5 is not present on behalf 11111 168421

Switch 10 decimal figures represent the number of bits is multiplied by the respective corresponding, since only the binary 0 and 1, can be regarded as non-0, as there are 1, then put the corresponding digital summing to

For example: 11001 equivalent to 16 + 8 + 1 = 25,, 11 001 to decimal 25

   10011 equivalent to 16 + 2 + 1 = 19,, 11 001 to decimal 19

 

Decimal into binary:

A number continue to take the remainder divided by 2 is the binary, why divided by 2, since the remainder is divided by two and only two possibilities 0 and 1, then we can form a binary

Then to a decimal number 70, to see if the composition can be a multiple of 2, you can quickly determine which 70 in binary, e.g.

Binary decimal digits corresponding to 6,432,168,421

70, there is a 64,70-64 6,6 = a 2, a 4, so 70 bit 1000110

Note that the above method is not suitable for more than 255 figures

 


Every party rank corresponding to 16: Hex 

Hex decimal turn

  E * = 16 for example e12H 2 + 16 *. 1 . 1 + 2 16 * 0   = 3602

Decimal turn a hexadecimal number can be divided by 16

Or watching a multiple of 16, similar to the above binary decimal ,,,, rapid conversion = 83 * 5 + 3 = 16 53

 

Hex quickly convert binary:

The 9-9A = 1001 1010 8421 1001 divided by hexadecimal decimal to binary A-to-10, 10 10 1010, 1010 is the hexadecimal into binary

That corresponds to the decimal number for each hexadecimal into binary, hexadecimal

Binary hex, it is imperative every four binary is converted to a hexadecimal

 

Get started compilation:

s the high and low frequency converted into binary numbers 0,1,0,1

Binary required readability into something, then appeared in assembly language

Machine instruction: 01001010110101 B

The machine instruction into high and low, the driving operation of the computer

Enter dosbox

The same string of hexadecimal numbers: + number + number of hexadecimal digits + + Some English words alphanumeric

                 073F: 0113 7400 SW 0115

Hexadecimal numbers translated into binary:

7400 machine instructions, assembler instructions behind, which is one to two

7 4 00 SW 0115

0111 0100        0000  0000

Compiler translation software, the assembly instructions translated by a compiler into machine instructions, of course, a different compiler language translation of nowhere

Assembly instructions translated by a compiler into a machine code or machine instructions

Directive tells the compiler is translation software, how to translate

In line with system * - * / compiler tube

 

Assembly instructions stored where? ? Most instructions operate on memory and main memory data stored in memory,

example:

Memory Number: 073F: 0244

Memory number is zero-based

 

dosbox -debug -u -d 

D command interpretation and comparison instructions nowhere U

u see instruction machine instructions and assembler instructions

see instruction data d

The smallest unit of memory is a byte 74H 03H = 2 hexadecimal bits = 8 bits     

1Bytes = 8bit 1bit = 1 binary bits Items 2

unit of measurement

 

 

For contact between the cpu and memory data communication i.e., it is necessary to know the memory number (address lines) (transport position), data (data line) (transmission data), read and write information (control line) (read or write judgment) ,

Address line :::

An address line only represents 0 or 1, the number of address lines determines how much you are able to find the address (addressability) 2 the n-    

For example ten address lines, its addressing range 0 to 1023    

Data line :::

How much time can pass digital (byte capacity),

:: :( control line control of the other components)

B800: 400 is a memory address as address modifications in existing

 

Data register, address register

DS ES SS CS is address information 

Left for the segment address register, the address register is an offset to the right

Address registers cheap SP BP SI DI IP BX (BX can both special)

Address adder, the address calculation,

Segment address * 16 (10H) + offset = physical address

* 16 segment address = base address

Address = base address + offset physical address

8086cpu address bus 20, the address register can store 16 ,, that is offset worse

Examples: F230H segment address offset address C8H  

F230 * 10H + C8H = F23C8 is the 20-bit address

 

 

Data Register:

AX  BX CX DX

They may be divided from the upper eight bits and lower eight bits into AH AL register AX e.g.

 

Guess you like

Origin www.cnblogs.com/Robertzewen/p/10837209.html