Computer mathematics note

Source: Internet
Author: User

Complement:

Positive complement: the positive complement is the original code.

For example, the complement code of 4 is converted to a binary original code: 00000100. The complement code is the same as the original code, that is, 00000100.

Negative complement: The symbol bit is 1, the other bit is the original code of this value is reversed by bit, and then the entire number is added to 1

For example, the-4 complement code is converted to the binary original code: 1000100, bitwise reverse: 1111011, and the addition of 1 is: 1111100

Re-code to original code:

The source code of positive numbers is the same as the source code, that is, the source code is the source code itself.

The original code of the negative number is: the complement code is binary inverse + 1

Bitwise non-operation:

Set each 0-bit of the positive number operand to 1, and set each 1-bit to 0, resulting in a binary complement of a number. For any positive number ,~ X and-X-1 are the same.

Example:-4 bitwise non-, converted to binary original code: 10000100, bitwise reverse: 11111011, which is a complement code, converted to the original code (+ 1): 10000100, add 1 to 10000101, And the leftmost is the symbol bit. The positive number corresponding to the original code is-5.

N root:

The Npower root of M is equal to the 1/Npower of M.




Related Article

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.