# Tag Archives: Bitwise-XOR

Given a binary string, task is to convert this string in to two’s complement with the help of XOR operator. Examples:  Input : 00000101 Output… Read More
Given a number where . The task is to find the minimum number of elements to be deleted in between to such that the XOR obtained from the remaining… Read More
Given a value K which is the XOR of all the values from 1 to N, the task is to find the minimum value of… Read More
Given a non-negative integer N. The task is to invert the bits of the number N and print the decimal equivalent of the number obtained… Read More
Given positive integers N, L, and R, we have to find the maximum value of N ⊕ X, where X ∈ [L, R].Examples:   Input :… Read More
Given two binary strings s1 and s2. The XOR of them is X, the task is to find the number of ways to swap two-bit… Read More
Given an array of N integers, the task is to find the number of pairs (i, j) such that A[i] ^ A[j] is odd.Examples:   Input… Read More
Given an array, find the XOR of sum of all pairs in an array.Examples:   Input : arr[] = {1, 2, 3} Output : 0 (1… Read More
Given two non-negative numbers a and b and two values l and r. The problem is to check whether all bits at corresponding positions in… Read More
Given a non-negative number n and two values l and r. The problem is to check whether all the bits are unset or not in… Read More
BitSet is a class defined in the java.util package. It creates an array of bits represented by boolean values. Syntax  public void xor(BitSet set); Explanation: The… Read More
Given two binary strings. The task is to check if string s1 can be converted to string s2 by performing the given operations any number… Read More
Given a number N and the min and max range. Given N values of a and b respectively. The task is to count the number… Read More
Given an array A of size n. the task is to generate a new sequence B with size N^2 having elements sum of every pair… Read More
Given an array where all elements appear even number of times except two, print the two odd occurring elements. It may be assumed that the… Read More