Convert numbers into binary representation and add them without carry | Function returns sum of both the binary number without carry ; XOR of N and M ; Driver code
function NoCarrySum ( N , M ) { return N ^ M ; } let N = 37 ; let M = 12 ; document . write ( NoCarrySum ( N , M ) ) ;