Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the algorithm of addition, subtraction, multiplication and division

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail what is the algorithm of addition, subtraction, multiplication and division. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Addition, subtraction, multiplication and division are the basic four operations. in the absence of parentheses, the order of operation is multiplication and division first, then addition and subtraction.

Additive commutative law: a+b=b+a

Additive binding law: aplombda + (biconc)

Multiplicative commutative law: a*b=b*a

The law of multiplicative association: a multiplicative association law * (biconc)

Multiplicative distribution law: (aqb) * c=a*c+b*c

The nature of subtraction: a, b, m,.

Properties of division: a/b/c=a/ (biconc)

The principle of computer addition, subtraction, multiplication and division

Principle of addition and subtraction: original code, inverse code, complement code

Number of machines: the real storage of numerical values in a computer; for example, [+ 2] is [00000010], [- 2] is [10000010]; the highest bit is called symbol bit, 0 represents positive number and 1 represents negative number.

True number of machines: the true number of machines, such as [+ 2] is [0000010], [- 2] is [0000010], and so on.

Original code: the symbol bit plus the absolute value of the true number, using the first bit to represent the symbol, and the remaining bits to represent the value.

Inverse code: the inverse code of a positive number is itself; the inverse code of a negative number is based on its original code, the symbol bits remain unchanged, and the other bits are inverted.

Complement: the complement of a positive number is itself; the complement of a negative number is based on its original code, the symbol bit is unchanged, and the rest of you are reversed, and finally + 1.

Multiplication principle: computer values are expressed to the N power of 2:

2 ^ n0 + 2 ^ N1 + 2 ^ N2 + 2 ^ n3 + 2 ^ n4.

Xfanty

= (x) * (2 ^ n0 + 2 ^ N1 + 2 ^ n2 + 2 ^ n3 + 2 ^ n4)

= (x* 2 ^ n0) + (x* 2 ^ N1) + (x* 2 ^ N2) + (x* 2 ^ n3) + (x* 2 ^ n4) +.

= (x move left n 0) + (x left move n 1) + (x left move n 2) + (x left move n 3) + (x left move n 4) +.

Division principle: shift to the left, symbol bits do not participate in the operation.

On what is the algorithm of addition, subtraction, multiplication and division is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report