Gray to Octal

Updated: Feb 14, 2019

Gray Code to Octal Converter is used to convert a Gray Code number into Octal format. Use the Gray Code Converter tool to convert between any number base and gray code.

Input: Paste Gray Code numbers below (1 per line if multiple)



Octal To Gray Code Converter

Convert Octal number to Gray Code

View Tool
Background Information

Gray Code

Gray Code also known as Reflected Binary Code is an ordering of binary numeral system used for error correction in digital terrestrial television and some cable TV systems.

Octal

Octal number system is composed of digits from 0 to 7. It has a base of 8 hence the name Octal.

Conversion from Gray Code to Octal

A Gray Code can be converted to Octal in three steps:-

  1. Take the first bit of the gray code input and write it to the output
  2. Repeat the following steps until you reach the end of the input
  3. Take the second bit of the input and XOR it to the last bit of the output
  4. Write this result to the output. So, 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1 and 1 + 1 = 0.
  5. Convert the binary output to octal

Example Gray Code to Octal Conversion

Let's say your Gray Code value is 11111011 and you want to convert it to it's Octal form.

  1. Step 1: Take the first bit of the gray code input and write it to the output. Output is 1
  2. Step 2: Repeat the steps below until you reach the end of the input
    • Take the second bit of the input and XOR it to the last bit of the output. 1 + 1 = 0
    • Write the result to the output. Output: 10
    • Take the third bit of the input and XOR it to the last bit of the output. 1 + 0 = 1
    • Write the result to the output. Output: 101
    • Take the fourth bit of the input and XOR it to the last bit of the output. 1 + 1 = 0
    • Write the result to the output. Output: 1010
    • Take the fifth bit of the input and XOR it to the last bit of the output. 1 + 0 = 1
    • Write the result to the output. Output: 10101
    • Take the sixth bit of the input and XOR it to the last bit of the output. 0 + 1 = 1
    • Write the result to the output. Output: 101011
    • Take the seventh bit of the input and XOR it to the last bit of the output. 1 + 1 = 0
    • Write the result to the output. Output: 1010110
    • Take the eighth (last) bit of the input and XOR it to the last bit of the output. 1 + 0 = 1
    • Write the result to the output. Output: 10101101
  3. Step 3: So, our binary result is: 10101101
  4. Step 4: Convert the binary output to octal. So, 10101101 becomes 255

Gray Code Table

DecimalHexBinaryGray Code
0000000000
1100010001
2200100011
3300110010
4401000110
5501010111
6601100101
7701110100
8810001100
9910011101
10a10101111
11b10111110
12c11001010
13d11011011
14e11101001
15f11111000
 

Comments 0


History

Feb 5, 2018
Tool Launched