# 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=2 Output: 00 01… Read More
Given a decimal number n. Find the gray code of this number in decimal form. Examples : Input : 7 Output : 4 Explanation: 7… Read More
Given Binary code of a number as a decimal number, we need to convert this into its equivalent Gray Code. Examples : Input : 1001… 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 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 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