For every set bit of a number toggle bits of other | C # program toggle bits of n2 that are at same position as set bits of n1 . ; function for the Nega_bit ; Driver program
using System ; class GFG { static int toggleBits ( int n1 , int n2 ) { return ( n1 ^ n2 ) ; } public static void Main ( ) { int n1 = 2 , n2 = 5 ; Console . WriteLine ( toggleBits ( n1 , n2 ) ) ; } }