You can shift a
to align it with b
on the left. The sample code below works with your example but does not properly handle overflows etc. It should give you a starting point though.
int a = 21;
int b = 269;
int shift = Integer.numberOfLeadingZeros(a) - Integer.numberOfLeadingZeros(b);
int c = (a << shift) ^ b;
System.out.println(Integer.toBinaryString(c)); // 1011101