Number numbering and Coding basics

Source: Internet
Author: User

Table Style
Binary: (B)
Octal system: 306 (o/q)
Decimal: (D)
Hex: 12ABCDEF (H)

Conversion Mode
Binary to octal system: cut from the decimal point, the integer part from right to left three digits to an octal, the decimal part from left to right three digits to an octal, the number of digits is not enough plus 0
Binary turn 16: The way is like binary to octal, the difference is that four-bit turn a
Octal 16 System: first octal to binary, then binary to hexadecimal

Binary operation
(1) Addition and subtraction operation
Same as decimal plus minus operation
(2) Multiplication and division operation
Multiplication: 0x any number =0 1x any number = any number
Division: Same as decimal
(3) Logical operation
With or as distinct or (same as 0 different to 1)

Truth value and Word length
(1) Truth value
The first digit of the binary number is used in the computer to indicate positive or negative, for example, the first digit is 1, and the true value of 1111 is 7 if-,0 indicates positive.
(2) Word length
The word length represents the number of binary numeric codes that a computer can handle at one time, and is the unit of operation of computer storage and operation.
For example, the 32-bit processor word length is usually 32.
It is generally considered that 16 bits is a word, 32 bits is a double word, and 64 bits are two double words.
A 8-bit processor can handle data in a total of 256 digits (-127- -0,+0-127) (where +0 and-0 binary representations are not the same)

Four Expressions
(1) The original Code
(2) complement (using the idea of modulo, in the clock, -10 = 2)
The complement is to solve the problem of the addition and subtraction of the original code, and 0 of the original code is ambiguous.
such as 001 = -2 (D) The calculation of the complement:
the complement of a positive number is itself, and the complement of negative numbers is to first take all the digits except the symbol bit to reverse, and then at the bottom +1 get.
For example, the 101 complement is 110+001=111,001 's complement is 001, so 101+001=111+001=000 is 0.
(3) Anti-code (in addition to the symbol bit to take the reverse, the inverse code is the original code to complement the evolution of the transition, the fact that the original code can not be resolved to solve the problem)
(4) Move Code
Truth part and the complement, the symbol part and the complement.
Solution: First find the inverse code, and then take the symbol bit back.
(5) complement Operation
Addition:
two number and complement = two number complement and
Subtraction:
two number difference complement = Bing complement + minus complementary complement
meiosis negative Calculation method: All bits (including symbol bits) are reversed plus 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.