## C++ Programming – Swap all odd and even bits

C++ Programming – Swap all odd and even bits – Bit Algorithm – Given an unsigned integer, swap all odd bits with even if the given number is 23 , it should

## C Programming – Swap all odd and even bits

C Programming – Swap all odd and even bits – Bit Algorithm – Given an unsigned integer, swap all odd bits with even bits. if the given number is 23

## C Programming – Binary representation of a given number

C Programming – Binary representation of a given number – Bit Algorithm – Write a program to print Binary representation of a given number.

## Position of Rightmost Set Bit

Position of Rightmost Set Bit – Bit Algorithm – Write a one line C function to return position of first 1 from right to left, in binary representation of

## C Programming – Efficient way to multiply with 7

C Programming – Efficient way to multiply with 7 – Bit Algorithm – We can multiply a number by 7 using bit wise operator. First left shift the number by

## Write a C program to find the parity of an unsigned integer

Write a C program to find the parity of an unsigned integer – Bit Algorithm – Parity of a number refers to whether it contains an odd or even number of

## C Programming – Write an Efficient Method to Check if a Number is Multiple of 3

C Programming – Write an Efficient Method to Check if a Number is Multiple of 3 – Bit Algorithm – If sum of digits in a number is multiple of 3 then number

## C Programming – Smallest power of 2 greater than or equal to n

C Programming – Smallest power of 2 greater than or equal to n – Bit Algorithm – Write a function that, for a given no n, finds a number p which is greater

## Count set bits in an integer in C Programming

Count set bits in an integer in C Programming – Bit Algorithm – Simple Method Loop through all bits in an integer, check if a bit is set and if it is then

## C Program to Reverse Bits of a Number

C Program to Reverse Bits of a Number – Bit Algorithm – Given an unsigned integer, reverse all bits of it and return the number with reversed bits.