afan 发表于 2010-9-26 19:47:10

真难,连参与的勇气都没有 - -|

水木子 发表于 2010-9-26 19:52:23

是啊!感觉好难哦!做不了。

这就是P版所指的“位运算”,确实很强大。

lanfengc 发表于 2010-9-26 20:54:59

$Rand=Random(-100, 100, 1)
MsgBox(0,"第1题--2变64",BitShift(2,-5))
MsgBox(0,"第2题--高低位互换",Hex(BitRotate(0x2D041020,16,"D")))
MsgBox(0,"第3题--奇偶判断(1奇0偶)"&$Rand,"结果为:"&BitAND($Rand,1))
MsgBox(0,"第4题--正负判断(1负0正)"&$Rand,BitAND(BitShift($Rand,31),1))
MsgBox(0,"第5题--后三位判断(结果为7符合)"&$Rand,BitAND($Rand,7))
MsgBox(0,"第6题--7变13/13变7","7==>"&BitXOR(7,10)&@CRLF&"13==>"&BitXOR(13,10))
MsgBox(0,"第7题--右起第十位取反",BitXOR(36615,0x00000200))
MsgBox(0,"第8题--取末尾连续1"&$Rand,BitShift(BitXOR($Rand, $Rand + 1), 1))
MsgBox(0,"第9题--取绝对值"&$Rand,BitXOR($Rand,BitShift($Rand,31))+BitAND(BitShift($Rand,31),1))
MsgBox(0,"第10题--右起第1位取反"&$Rand,BitOR($Rand, 1))我也不符合要求。{:face (394):}

Duvet 发表于 2010-9-26 21:19:50

學習了,發現還挺有趣的

lixiaolong 发表于 2010-9-26 21:25:55

本帖最后由 lixiaolong 于 2010-9-26 21:27 编辑

回复 1# pusofalse

第8题,不知道这样对不对?
$iRandom = "847"
MsgBox(0, BitXOR($iRandom, 832), "取" & $iRandom & "右边位连续的1。")

pusofalse 发表于 2010-9-26 22:00:47

回复 20# lixiaolong


    只用847测试是正确的,而真正用到时,这个数是未知的。用1024这个数测试呢~

lixiaolong 发表于 2010-9-26 22:07:05

太复杂了,,{:face (229):}

rolaka 发表于 2010-9-27 17:22:31

运算符不能用实在太变态了...

大绯狼 发表于 2010-9-27 23:21:23

P大出马 惯例 留名待查。。

fenglin1978 发表于 2010-9-28 10:43:59

看不懂题目的悄悄路过

orp 发表于 2010-9-28 17:37:41

{:face (121):}精彩极了,学习了

lxz 发表于 2010-9-28 18:37:24

精彩的代码,学习了...

lin0308 发表于 2010-10-10 00:51:10

学习了,谢谢

allchn 发表于 2010-10-17 19:21:21

本帖最后由 allchn 于 2010-10-17 19:22 编辑

这不是标准函数吗,AutoIt3 有位运算
页: 1 [2]
查看完整版本: 10道位运算题目。