二元算术 [英] Binary Arithmetics
问题描述
你好我想添加一个长到长的我需要一些帮助
例如:
01101011
00001000
--------
????????
有没有人知道如何制作一个简单的功能(a, b)
我发现如果我和一个工作但是1是AND并且1
下一个左边的位需要设置为1.
谢谢
Hello I am trying to add a long to long and I need some help
example:
01101011
00001000
--------
????????
does anyone have any idea how to make a simple function(a,b)
I figure out that if I AND a to be is working but is 1 is ANDing to 1
the next left bit needs to be set as 1.
thanks
推荐答案
< ke **** @ gmail.com>写道:
<ke****@gmail.com> wrote:
你好我想添加一个很长很长的我需要一些帮助
例如:
01101011
00001000
- -------
????????
有没有人知道如何制作一个简单的功能(a,b)
我想出来了如果我和一个正在工作,但是1是ANDing到1
下一个左边的位需要设置为1。
Hello I am trying to add a long to long and I need some help
example:
01101011
00001000
--------
????????
does anyone have any idea how to make a simple function(a,b)
I figure out that if I AND a to be is working but is 1 is ANDing to 1
the next left bit needs to be set as 1.
看一看在此链接。
http:// en。 wikipedia.org/wiki/Binary_arithmetic#Addition
很酷,但我知道那部分我不知道如何写作
在C
感谢无论如何
that is cool but I know that part I don''t know how I can make write
that in C
thanks anyway
在文章< 11 ******** **************@g14g2000cwa.googlegroups .com> ;,
ke **** @ gmail.com < ke **** @ gmail.com>写道:
In article <11**********************@g14g2000cwa.googlegroups .com>,
ke****@gmail.com <ke****@gmail.com> wrote:
我发现如果我和一个正在工作但是1是ANDing到1
下一个左边的位需要设置为1。
I figure out that if I AND a to be is working but is 1 is ANDing to 1
the next left bit needs to be set as 1.
看一下这个链接。
http://en.wikipedia.org/wiki/Binary_arithmetic#添加
很酷,但我知道那部分我不知道如何写作
在C中
Take a look at this link.
http://en.wikipedia.org/wiki/Binary_arithmetic#Addition
that is cool but I know that part I don''t know how I can make write
that in C
请另外 - 看看链接,因为您描述的算法
(我上面引用的)不正确。
-
这个签名故意留下......哦,笨蛋!
Please take -another- look at the link, as the algorithm you described
(which I quoted above) is not correct.
--
This signature intentionally left... Oh, darn!
这篇关于二元算术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!