Changed the conditions checking register lengths.
This commit is contained in:
parent
75f7dba546
commit
132a0b5659
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue