#include Local $sBasedOn="Musashi", $iIter=100000, $sOut, $t=TimerInit() Local $input="10101010", $aArr, $dec For $n=1 To $iIter $aArr = StringSplit($input, "", 2) $dec = 0 For $i = UBound($aArr) - 1 To 0 Step -1 If $aArr[$i] = "1" Then $dec = BitXOR($dec, BitShift(1, -(UBound($aArr) - 1 - $i))) $sOut=Hex($dec) &" "& $dec EndIf Next Next $t=TimerDiff($t) ConsoleWrite("Based on code from: "& $sBasedOn & @CRLF& " Check: "& $sOut &" "& @CRLF &" "& $iIter &" Iterations in "& $t/1000 &" Seconds" &@CRLF&@CRLF)