Implement all methods for binary division #4
|
@ -225,18 +225,6 @@ def format_device_state_table(table) -> str:
|
|||
return pt.get_string()
|
||||
|
||||
|
||||
def get_mantice_complement(register: BasicRegister) -> BasicRegister:
|
||||
memory: list[bool] = list(register.memory)
|
||||
invertion_enabled: bool = False
|
||||
|
||||
for i, v in list(enumerate(memory))[::-1]:
|
||||
memory[i] = v ^ invertion_enabled
|
||||
|
||||
if v:
|
||||
invertion_enabled = True
|
||||
|
||||
return BasicRegister(deque(memory))
|
||||
|
||||
def binary_multiplication_method_1(first_term: BasicRegister, second_term: BasicRegister) \
|
||||
-> tuple[BasicRegister, list[list[str]]]:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue