#include Func _HexToBin($dahex) dim $hextable[16][2] = [[0,"0000"],[1,"0001"],[2,"0010"],[3,"0011"],[4,"0100"],[5,"0101"],[6,"0110"],[7,"0111"],[8,"1000"],[9,"1001"],["A","1010"],["B","1011"],["C","1100"],["D","1101"],["E","1110"],["F","1111"]] local $iCodex $currentdata = StringSplit($dahex, "", $STR_NOCOUNT) _ArrayColInsert($currentdata, 1) For $i = 0 To UBound($currentdata)-1 Step 1 $curntdata = $currentdata[$i][0] $iCode = Asc($curntdata) if ($iCode >= 65) and ($iCode <= 70) Then $iCodex = $iCode-55 Else $iCodex = $curntdata EndIf $vallookup = $hextable[$iCodex][1] $currentdata[$i][1] = $vallookup Next $binstuff = _ArrayToString($currentdata, " ", 0, -1, @CRLF, 1, 1) $binstuff = StringStripWS($binstuff, $STR_STRIPALL) Return $binstuff EndFunc Func _BinToHex($num) $sStrippedString = StringStripCR($num) $sStrippedString = StringStripWS($sStrippedString, $STR_STRIPALL) Local $dec = 0, $len = StringLen($sStrippedString) For $i = 0 To ($len)-1 If NOT Mod($i ,4) Then $teststrip2 = StringMid($sStrippedString, $i+1, 4) Switch $teststrip2 Case 0000 $val = '0' Case 0001 $val = '1' Case 0010 $val = '2' Case 0011 $val = '3' Case 0100 $val = '4' Case 0101 $val = '5' Case 0110 $val = '6' Case 0111 $val = '7' Case 1000 $val = '8' Case 1001 $val = '9' Case 1010 $val = 'a' Case 1011 $val = 'b' Case 1100 $val = 'c' Case 1101 $val = 'd' Case 1110 $val = 'e' Case 1111 $val = 'f' EndSwitch $dec = $dec & $val EndIf Next $dec = StringTrimLeft($dec, 1) ;ConsoleWrite($dec & ' nonfunc:' & $teststrip2 & @CRLF) Return $dec EndFunc ;==>_BinToDe