binaryCalculatorPrototype/main.py

23 lines
454 B
Python
Raw Normal View History

2023-06-25 19:39:37 +03:00
from bitutilities import *
import timeit
2023-06-17 21:41:51 +03:00
if __name__ == '__main__':
reg: BasicRegister = BasicRegister(get_memory("memory"))
# print(type(reg))
2023-06-17 21:41:51 +03:00
print("\nRegister:")
2023-06-17 21:41:51 +03:00
print(reg)
print("\nReversed:")
reg.reverse()
print(reg)
print("\nShifted left:")
print([int(value) for value in reg.left_shift()])
2023-06-17 21:41:51 +03:00
print(reg)
print("\nShifted right:")
print([int(value) for value in reg.right_shift()])
2023-06-17 21:41:51 +03:00
print(reg)