Skip to content

Blog

Members Public

Challenge 2: Check If a Given Number is Even/Odd

This is an example of another Bitwise question. Think of the rightmost bit of a number and think of some logic that could solve this.

Members Public

Counting Bits II

This is an extension to the counting set bits problem, counting the number of set bits or 1's present in a number. In here we see solutions in Java, JavaScript, Cpp, and TypeScript.

Members Public

Challenge 1: Count Set Bits Or Number of 1 bit's

This is a traditional problem counting the number of set bits or 1's present in a number. Let’s see how we can count the set bits using the AND operator.

Members Public

Bitwise AND, Computations, and Examples

A Bitwise AND is a binary operation that takes two equal-length binary representations and performs the logical AND operation on each pair of the corresponding bits. This is equivalent to multiplying them.

Members Public

Introduction to Bitwise AND operator

Bitwise AND is the most commonly used logical Bitwise operator. It is represented by a sign (&). AND operator is the same as the AND gate we studied in the chapter on digital electronics.

Members Public

Convert Decimal Numbers to Binary Numbers

We use the modulo and division method, and we calculate the binary representation of a decimal number. Let’s represent the binary by considering the remainder column from bottom to top.

Members Public

Count the Number of Digits in an Integer

This is an example problem for counting digits in an integer. Solving this problem helps you find the place values and how they are represented in the decimal number system. Let’s see some approaches we can take to solve this algorithmic problem. Approach

Members Public

What are Bitwise Operators?

This article will help you understand Bitwise operators and how to use them by giving practical examples.

Members Public

Binary Number System and Its Representation

In mathematics and digital electronics, a binary number is expressed in the base-2 number system, using only two symbols: "0" and "1". Another number system that became famous after the decimal is the binary number system, which has only two digits, 0 and 1.

Members Public

What is Decimal Number System?

Long ago, humans created a number system that has precisely ten digits. This number system is called the Decimal Number System, and the digits in this number system are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.