[Small classroom notes] assembly language

Originally written for a while and feel like nothing is too simple to write necessary, to complete this lesson today really dizzy head, or record it, or after head and dizzy to read them all understand what the teacher is saying.

 

Chapter One

> First class assembly language foundation

Ary how the conversion is omitted. Some basic concepts -

Bit - bit, the smallest unit of data storage, and a two states --0;

Byte - byte, each composed of an 8 bit byte, store an 8-bit binary number, the basic unit of the CPU is accessing memory or peripherals.

 

For an 8-bit binary number, if it is unsigned, then the range of 0 to 255 (2 ^ 8--1); if there is a number of symbols:

1, a symbol representing the most significant bit, 0 means positive and 1 negative;

2, showing the range of -127 (1111 1111) to 127 (01111111);

3, look at the original code, the inverted complement the concept of code analysis

Original code: it can be understood as the absolute value of the true value of (?)

Anti-code: x> 0, equivalent to the original code; x <0, all except the sign bit inverted.

Complement: x> 0, equivalent to the inverted; x <0, +1 inverted basis.

Special case: the original code and the anti-code 0 is not unique, and is divided into +0 -0; but the only complement, namely 00 million;

At first glance this concept is very strange, not good memories, but also thought too much.

And today the teacher said, "If there is a symbolic number, the number is to complement the expression", it is ignorant, and why? Complement what privilege it?

Bebe with philosopher said, there is only computer complement this kind of storage, which means that the original code, anti-code purely just to find two's complement to get out of something, in itself of no practical use.

Then I read articles about this answer, suddenly feeling a little big to understand.

A very good understanding, for giving a complement seeking original value:

Ignoring the sign bit argument, as unsigned directly, i.e., 0 to 255; if 0 <= X complement <= 127 (0111 1111), x = x complement; if 128 (1000 0000) <= x complement <= 255 (1111 1111), x = x complement --256 (i.e. negative sign bit table 1)

 

Second, Chapter II

 

Guess you like

Origin www.cnblogs.com/jinkun113/p/12343867.html