Solving 2 equation

Revision en1, by prathams, 2017-10-24 07:03:21

Given x and y, we need to find smallest a and b such that
a + b = x
a xor b = y

How to solve this?

Tags xor

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English prathams 2017-10-24 07:03:21 141 Initial revision (published)