Skip to content

Introduction to OR Operator

OR operator compares each bit of the first operand to the second operand’s corresponding bit. If both bits are 0, the corresponding result bit is set to 0. Otherwise, the corresponding result bit is set to 1

Gopi Gorantala
Gopi Gorantala
1 min read

Related Posts

Members Public

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.

Members Public

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.

Members Public

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.