|
@ -3,7 +3,7 @@ def decToBin(decIn): |
|
|
ret = "" |
|
|
ret = "" |
|
|
twoMult = int(1) |
|
|
twoMult = int(1) |
|
|
currentTwoPwr = int(0) |
|
|
currentTwoPwr = int(0) |
|
|
while ans != 0: |
|
|
while ans > 0: |
|
|
''' |
|
|
''' |
|
|
sleep(0.1) |
|
|
sleep(0.1) |
|
|
print("TwoMult = " + str(twoMult)) |
|
|
print("TwoMult = " + str(twoMult)) |
|
@ -22,6 +22,10 @@ def decToBin(decIn): |
|
|
currentTwoPwr -= 1 |
|
|
currentTwoPwr -= 1 |
|
|
twoMult = 2 ** currentTwoPwr |
|
|
twoMult = 2 ** currentTwoPwr |
|
|
|
|
|
|
|
|
|
|
|
while (currentTwoPwr >= 0): |
|
|
|
|
|
ret += "0" |
|
|
|
|
|
currentTwoPwr -= 1 |
|
|
|
|
|
|
|
|
return int(ret) |
|
|
return int(ret) |
|
|
|
|
|
|
|
|
def binToDec(binIn): |
|
|
def binToDec(binIn): |
|
|