You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I using B2A and A2B gates to perform conversions between arithmetic and Boolean, I observed a strange behavior. After a value from PutGTGate in the Boolean circuit is converted to arithmetic and converted back to the Boolean, though its value keeps the same, its inversion is changed.
In the code, I compare two variables and get the result correctly. After I convert the result from Boolean to arithmetic and convert it back, though the result keeps the same, the result_inv is different.
The output is shown below.
result: 1
result_inv: 65534
If two lines that perform the conversion "result = Acirc -> PutB2AGate(result);result = circ -> PutA2BGate(result, Ycirc);" is deleted, the output is shown below.
result: 1
result_inv: 0
I cannot find the reason behind this behavior. Could you help me to explain this?
The text was updated successfully, but these errors were encountered:
Hello, sorry for disturbing you.
When I using B2A and A2B gates to perform conversions between arithmetic and Boolean, I observed a strange behavior. After a value from PutGTGate in the Boolean circuit is converted to arithmetic and converted back to the Boolean, though its value keeps the same, its inversion is changed.
Here is an example.
In the code, I compare two variables and get the result correctly. After I convert the result from Boolean to arithmetic and convert it back, though the result keeps the same, the result_inv is different.
The output is shown below.
If two lines that perform the conversion "result = Acirc -> PutB2AGate(result);result = circ -> PutA2BGate(result, Ycirc);" is deleted, the output is shown below.
I cannot find the reason behind this behavior. Could you help me to explain this?
The text was updated successfully, but these errors were encountered: