a|b=c
knowing a
and c
, how to calculate b
For example:
0011 | b = 0111
Knowing a = 0011
and c = 0111
, how to figure out b
to be 0101
a|b=c
knowing a
and c
, how to calculate b
For example:
0011 | b = 0111
Knowing a = 0011
and c = 0111
, how to figure out b
to be 0101
There will be more than one correct answer.
For simplicity consider the trivial example: 1|0 = 1
i.e. a=1, b=0 and c=1. In this case, b can also be 1.
So given that the bit in a
is 1, we won't be able to know for sure whether the bit in b
is 0 or 1.
In some logics there is also a "value" for unknown X
So if you want to get b
from a|b=c
=> 0011 | b = 0111
the in my mind nicest answer would be 01XX
Everything that is:
0
in c
has to be 0
in b
1
in c
and 0
in a
has to be 1
in b
1
in c
and 1
in a
is unknown X