Code Pumpkin

Tag Archives: Right Shift Operation

Program to check if a given number is power of two or not?

August 20, 2017
Posted by Abhi Andhariya

In this post, we will discuss about one of the easiest and commonly asked Bit Manipulation Interview Question i.e. Write a program to check if a given number is power of two or not?   This post is continuation of our previuos article Program To Find Number Of Set Bits In The Number.  Both of the approach […]

Program to find number of set bits in the Binary number

August 20, 2017
Posted by Abhi Andhariya

In this post, we will discuss about one of the easiest and commonly asked Bit Manipulation Interview Question i.e. Find total number of set bits in the given number?  There are many approach to solve this problem. Here, we will discuss about below two approaches: & and >> Approach (Naive Approach) Brian Kernighan's Approach 1) & and >> Approach […]

Total Posts : 124
follow us in feedly

Like Us On Facebook