Changed the conditions checking register lengths.

This commit is contained in:
Rhinemann 2023-06-27 14:09:07 +03:00
parent 75f7dba546
commit 132a0b5659
1 changed files with 5 additions and 5 deletions

View File

@ -82,12 +82,12 @@ def binary_sum(a_original: BasicRegister, b_original: BasicRegister) -> BasicReg
required_size = max(size_a, size_b)
a = a_original
b = b_original
if size_a != size_b:
a = a_original.adjusted_by_size(required_size)
b = b_original.adjusted_by_size(required_size)
else:
a = a_original
b = b_original
a = a.adjusted_by_size(required_size)
b = b.adjusted_by_size(required_size)
c = BasicRegister([False] * required_size)