# Bit Manipulation

## Bit Manipulation Course Overview

Overview In this course, you will learn how to solve problems using bit manipulation, a powerful technique that can be used to optimize your algorithmic and problem-solving skills. This is one of the most important/critical topics when someone starts preparing for coding interviews for FAANG companies. To kick things

## Bit Manipulation Final Thoughts

This concludes our course on bit manipulation.

## Solution Review: Get the First Set Bit Position Using the Right Shift

In the kth bit set/unset problem, we first write the algorithm, then some pseudocode, and then implement the solution.

## Challenge 1: Get the First Set Bit Position Using the Right Shift

This problem is similar to the last lesson we discussed. If you need a clue, return to the previous lesson to further your understanding.

## Check If Kth Bit Is Set/Unset Using Right Shift

In the kth bit set/unset problem, we need to write a program that checks whether the kth bit of a number is 1 or 0.

## Solution Review: Get The First Set Bit Position Using the Left Shift

In the kth bit set/unset problem, we first write the algorithm, then some pseudocode, and then implement the solution.

## Challenge 1: Get the First Set Bit Position Using the Left Shift

This problem is similar to the last lesson we discussed. If you need a clue, return to the previous lesson to further your understanding.

## Check If Kth Bit Is Set/Unset Using Left Shift

In the kth bit set/unset problem, we need to write a program that checks whether the kth bit of a number is either 1 or 0.

## Find the Bit Length of a Number

In this lesson, we use the Left Shift operator to find the bit length of a number. Introduction In this question, we take input and find its bit length. Problem Statement Given an input, find its bit length. Input: 8 Output: 4 (1000) Input: 2 Output: 2 (10) Input: 7

## Arithmetic and Logical Right Shifts

The logical right shift means shifting the bits to the right, and MSB(most significant bit) becomes 0. The arithmetic right shift means shifting the bits to the right, and MSB is the same as in the original number.