10 ^ 2的结果是什么. [英] what is the result of 10^2.

查看:98
本文介绍了10 ^ 2的结果是什么.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

10 ^ 2的结果是什么....这是一个异或的示例.它是如何工作的..plshelp

what is the result of 10^2....This is an example of exclusive OR. How does it works..pls help

推荐答案

假设您使用的是十进制,请先转换为二进制(读取二进制的XOR比较容易,通常您会以十六进制表示为紧凑型).
Assuming you are working in decimal, first convert to binary (it is easier to read XOR in binary, normally you would work in hex for compactnes).
10 Dec = 1010 Binary
02 Dec = 0010 Binary



当该位置上的位在任一输入上为1,而在另一输入上为0时,异或"(或简称为异或")给出"1".如果输入位相同,则XOR始终为零.



Exclusive OR (or XOR for short) gives a One when the bit in that position is a one on either of the inputs, and a zero on the other. In cases where the input bit is the same, XOR always gives a zero.

Input1 Input2 Output
  0      0       0
  0      1       1
  1      0       1
  1      1       0


因此,如果您将10(dec)与2(dec)异或,您将得到8(dec):


So if you XOR 10(dec) with 2(dec) you get 8(dec):

         Dec  Bin 
Input1   10   1010
Input2   02   0010
Output   08   1000


我是在google上找到的:

http://mathworld.wolfram.com/XOR.html [
I found this with google:

http://mathworld.wolfram.com/XOR.html[^]


这篇关于10 ^ 2的结果是什么.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆