##
Program for Decimal to Binary Conversion
July 5, 2017

Given a decimal number as input, we need to write a program to convert the given decimal number into equivalent binary number. Examples: Input :… Read More »

July 5, 2017

Given a decimal number as input, we need to write a program to convert the given decimal number into equivalent binary number. Examples: Input :… Read More »

Given a binary number as input, we need to write a program to convert the given binary number into equivalent decimal number. Examples: Input :… Read More »

July 3, 2017

Given a binary array arr[], we to find the number represented by the subarray a[l..r]. There are multiple such queries. Examples: Input : arr[] =… Read More »

June 30, 2017

The problem is to convert the given binary number (represented as string) to its equivalent octal number. The input could be very large and may… Read More »

June 29, 2017

Given two numbers m and n. Find the position of rightmost different bit in binary representation of numbers. It is guaranteed that such a bit… Read More »

June 7, 2017

The problem is to check whether the decimal representation of the given binary number is divisible by 5 or not. Take care, the number could… Read More »

May 28, 2017

The problem is to convert the given binary number to its equivalent hexadecimal number. The input could be very large and may not fit even… Read More »

May 26, 2017

Given a real number between 0 and 1 (e.g., 0.72) that is passed in as a double, print the binary representation. If the number cannot… Read More »

May 13, 2017

Given a binary input that represents binary representation of positive number n, find binary representation of n+1. The binary input may be and may not… Read More »

March 31, 2017

Given an string of binary number n. Convert binary fractional n into it’s decimal equivalent. Input: n = 110.101 Output: 6.625 Input: n = 101.1101… Read More »

March 30, 2017

Given an fraction decimal number n and integer k, convert decimal number n into equivalent binary number up-to k precision after decimal point. Input: n… Read More »

March 26, 2017

Given a integer ‘x’, find the number of values of ‘a’ satisfying the following conditions: a XOR x > x 0 < a < x… Read More »

March 24, 2017

Give an integer n. We can flip exactly one bit. Write code to find the length of the longest sequence of 1 s you could… Read More »

January 1, 2017

Given a number n, the task is to find the maximum 0’s between two immediate 1’s in binary representation of given n. Return -1 if… Read More »

December 17, 2016

Given binary square matrix [n*n]. Find maximum integer value in a path from top left to bottom right. We compute integer value using bits of… Read More »