##
Convert a binary number to hexadecimal number
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 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 »

October 18, 2016

Given a number n, find length of the longest consecutive 1s in its binary representation. Examples: Input : n = 14 Output : 3 The… Read More »

February 21, 2016

Binary Numbers is default way to store numbers, but in many applications binary numbers are difficult to use and a variation of binary numbers is… Read More »

February 4, 2016

Given a Binary Number as string, print its 1’s and 2’s complements. 1’s complement of a binary number is another binary number obtained by toggling… Read More »

June 13, 2014

Given an integer ‘x’, write a C function that returns true if binary representation of x is palindrome else return false.

February 15, 2013

Given two bit sequences as strings, write a function to return the addition of the two sequences. Bit strings can be of different lengths also.… Read More »