diff --git a/bitutilities.py b/bitutilities.py index 2275c12..c6fdfa5 100644 --- a/bitutilities.py +++ b/bitutilities.py @@ -437,9 +437,9 @@ def binary_division_method_1(first_term: BasicRegister, second_term: BasicRegist rg2, _ = binary_subtraction_second_complement(rg2, rg1) data_table[-1].append(list(map(str, [i, rg3, rg2, rg1, "RG2 := RG2 - RG1"]))) - rg3.left_shift(rg2.memory[0]) + rg3.left_shift(not rg2.memory[0]) rg2.left_shift() - data_table[-1].append(list(map(str, [i, rg3, rg2, rg1, f"RG3 := l(RG3).RG2[{n+2}]\nRG2 := l(RG2).0"]))) + data_table[-1].append(list(map(str, [i, rg3, rg2, rg1, f"RG3 := l(RG3).!RG2[{n+2}]\nRG2 := l(RG2).0"]))) return BasicRegister(deque(list(rg3.memory)[1:])), data_table diff --git a/main.py b/main.py index 6187570..9295868 100644 --- a/main.py +++ b/main.py @@ -34,8 +34,6 @@ def input_handler(first_register: bu.BasicRegister, second_register: bu.BasicReg case "d": match input("Choose method to use (1-2):\n>>> "): case "1": - # Warn about development - print("WARNING: this method is still being figured out, wrong results to be expected for now.") result, data_table = bu.binary_division_method_1(first_register, second_register) print(f"Division:\n{bu.format_device_state_table(data_table)}\nResult: {result}") case "2":