# Tag Archives: gray-code

Given a number n, generate bit patterns from 0 to 2^n-1 such that successive patterns differ by one bit. Examples:  Input: n=2Output: 00 01 11… Read More
Given a decimal number n. Find the gray code of this number in decimal form. Examples:  Input : 7 Output : 4 Explanation: 7 is represented as… Read More
Given the Binary code of a number as a decimal number, we need to convert this into its equivalent Gray Code. Assume that the binary number… Read More
Given a number n, the task is to generate n bit Gray codes (generate bit patterns from 0 to 2^n-1 such that successive patterns differ… Read More
Prerequisite – Number System and base conversions Gray Code system is a binary number system in which every successive pair of numbers differs in only… Read More
Binary Number is the default way to store numbers, but in many applications, binary numbers are difficult to use and a variety of binary numbers… Read More
Given a number N, generate bit patterns from 0 to 2^N-1 such that successive patterns differ by one bit. Examples: Input: N = 2 Output:… Read More