请输入您要查询的字词:

 

单词 BitwiseXOR
释义

bitwise XOR


Bitwise XOR or bitwise exclusive OR is a bit-level operationMathworldPlanetmath on two binary values which indicates which bits are set in only one value. For each position i, if the bit di in one value is 1 and the other is 0, then di of the result is 1, otherwise it’s 0. If both input di are 1, the output di is 0. then For example, given 50 and 163 in two unsigned bytes, a bitwise XOR returns 145.

Given a Mersenne number of the form 2k-1 (where k is the bit size of the data type in use, e.g., 8 for bytes, 16 for words, 32 for double words, etc.) and some smaller integer n, XORing that Mersenne number with n has the same effect as performing a bitwise NOT on n. Or, given m and n, XORing them has the same effect as m-n (subject to some caveats about the sign bit, or if the values are unsigned, the effect is then the same as |m-n|). XORing two values that are the same gives 0.

随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/4 9:39:45