gpt4 book ai didi

c# - "addition"和 "bitwise addition"之间有区别吗?

转载 作者:太空狗 更新时间:2023-10-29 19:44:13 27 4
gpt4 key购买 nike

作为一个小项目(没有什么关键任务),我决定尝试用 C# 编写 GOST 28147-89 的实现。但是,在阅读 RFC 5830 时(定义 GOST 28147-89 的信息),我注意到了这一点。

(+) is a bitwise addition of the words of the same length modulo 2.

[+] is an addition of 32-bit vectors modulo 2^32.

这两者有什么区别,主要是第一个指定按位加法,第二个只是简单地说明加法?

最佳答案

因为它说的是“模 2”,所以我必须假设它们只是意味着不带进位地单独添加每一位。

所以

  0101 
+1111
-------
1010

我想不出它有什么特别好的用途,因为它本质上与 xor 相同。

关于c# - "addition"和 "bitwise addition"之间有区别吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14901697/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com