Lab 2: Базовые команды и кодирование для процессора #2

Merged
mrqiz merged 21 commits from labs/02 into main 2024-09-22 18:15:51 +03:00
Showing only changes of commit 99b00ebcc0 - Show all commits

11
02-cpu-commnads/hex2bin.py Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/python3
import sys
def hex2bin(hexNum: str) -> None:
return bin(int(hexNum, 16))
if (len(sys.argv) > 1):
print(hex2bin(sys.argv[1]))
else:
print("No number passed")