# Tag Archives: binary-representation

Given a binary input that represents binary representation of positive number n, find a binary representation of n+1.The binary input may be and may not… Read More
Given an string of binary number n. Convert binary fractional n into it’s decimal equivalent. Examples: Input: n = 110.101 Output: 6.625 Input: n =… Read More
Given a fraction decimal number n and integer k, convert decimal number n into equivalent binary number up-to k precision after decimal point. Examples:   Input: n… Read More
Given a integer ‘x’, find the number of values of ‘a’ satisfying the following conditions:  a XOR x > x 0 < a < x… Read More
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
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
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
Given a number n, find length of the longest consecutive 1s in its binary representation.Examples :  Input : n = 14 Output : 3 The… Read More
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
Given a Binary Number as a string, print its 1’s and 2’s complements.  1’s complement of a binary number is another binary number obtained by… Read More
Given an integer ‘x’, write a C function that returns true if binary representation of x is palindrome else return false.For example a numbers with… Read More
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