## Highest power of 2 that divides a number represented in binary

Given a binary string str, the task is to find the largest power of 2 that divides the decimal equivalent of the given binary number.… Read More »

- Check if the binary representation of a number has equal number of 0s and 1s in blocks
- Lucky alive person in a circle | Set - 2
- Count all prefixes of the given binary array which are divisible by x
- Check if matrix A can be converted to B by changing parity of corner elements of any submatrix
- Smallest index such that there are no 0 or 1 to its right
- Queries to answer the number of ones and zero to the left of given index
- Count numbers have all 1s together in binary representation
- Maximum elements which can be crossed using given units of a and b

Given a binary string str, the task is to find the largest power of 2 that divides the decimal equivalent of the given binary number.… Read More »

Given a binary array of N elements and two initial values a and b. We can cross the i-th element if: If a[i] == 0,… Read More »

Given two binary matrices A[][] and B[][] of N X M. In a single operation, one can choose a sub-matrix (min of 2 rows and… Read More »

Given a binary array and Q queries. Every query consists of a number K, the task is to print the number of ones and zeros… Read More »

Given a binary array arr[] and an integer x, the task is to count all the prefixes of the given array which are divisible by… Read More »

Given a binary array of N numbers. The task is to find the smallest index such that there are either no 1’s or 0’s to… Read More »

Given an integer N, the task is to check if its equivalent binary number has the equal frequency of consecutive blocks of 0 and 1.… Read More »

Given an integer n, the task is to count the total lucky numbers smaller than or equal to n. A number is said to be… Read More »

Given that N person (numbered 1 to N) standing as to form a circle. They all have the gun in their hand which is pointed… Read More »

Given a number N. The task is to find the sum of the decimal equivalent of all the pairs formed from the binary representation of… Read More »

Binary is a base-2 number system that uses two states 0 and 1 to represent a number. We can also call it to be a… Read More »

The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation which was established in 1985 by the Institute of Electrical… Read More »

When doing addition/subtraction on binary numbers in other representations we need to apply different logics (circuits) to perform addition and subtraction. In 2s-complement representation, we… Read More »

In computer Architecture 2’s Compliment Number System is widely used. The discussion of overflow here mainly will we with respect to 2’s Complimentary System. N-bit… Read More »

Prerequisite – Base conversions, 1’s and 2’s complement of a binary number, 2’s complement of a binary string Suppose the following fragment of code, int… Read More »