18
Gray Code Gray Code Benchmark Companies Inc PO Box 473768 Aurora CO 80047

Gray Code

  • Upload
    yorick

  • View
    103

  • Download
    0

Embed Size (px)

DESCRIPTION

Gray Code. Benchmark Companies Inc PO Box 473768 Aurora CO 80047. Gray Code:. The Gray Code is a widely used non-weighted code system. Gray Code:. Also known as the cyclic , unit distance or reflective code , the Gray code can exist in either the pure binary or BCD formats. Gray Code:. - PowerPoint PPT Presentation

Citation preview

Page 1: Gray Code

Gray CodeGray Code

Benchmark Companies Inc

PO Box 473768

Aurora CO 80047

Page 2: Gray Code

Gray Code:

The Gray Code is a widely used non-weighted code system.

Page 3: Gray Code

Gray Code:

Also known as the cyclic, unit distance or reflective code, the Gray code can exist in either the pure binary or BCD formats.

Page 4: Gray Code

Gray Code:

The Gray code is shown in the table. As with the pure binary code, the first ten codes are used in BCD operations.

DEC 8241 GRAY

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 0101 1100

9 0110 1101

Page 5: Gray Code

Gray Code:

Notice that there is a change in only one bit from one code number to the next in sequence.

DEC 8241 GRAY

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 0101 1100

9 0110 1101

Page 6: Gray Code

Gray Code:

You can get a better idea about the Gray code sequence by comparing it to the standard four-bit 8421 pure binary code also shown in the table.

DEC 8241 GRAY

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 0101 1100

Page 7: Gray Code

Gray Code:

For example, consider the change from 7 (0111) to 8(1000) in the pure binary code. When this change takes place all bits change.

DEC 8241 GRAY

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 1000 1100

Page 8: Gray Code

Gray Code:

Bits that were 1’s are changed to 0’s and 0’s are changed to 1’s. Now, notice the code change from 7 to 8 in the Gray code.

DEC 8241 GRAY

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 1000 1100

Page 9: Gray Code

Gray Code:

Here 7(0100) changes to 8 (1100). Only the first bit changes.

DEC 8241 GRAY

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 1000 1100

Page 10: Gray Code

Gray Code:

The Gray code is generally known as an error-minimizing code because it greatly reduces the possibility of ambiguity in the electronic circuitry, when changing from one state to the next.

DEC 8241 GRAY

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 0101 1100

9 0110 1101

Page 11: Gray Code

Gray Code:

When binary codes are implemented with electronic circuitry, it takes a finite period of time for bits to change from 0 to 1 or 1 to 0. These state changes can create timing and speed problems.

Δtime

Page 12: Gray Code

Gray Code:

This is particularly true in the standard 8421 codes where many bits change from one combination to the next.

Δtime

Page 13: Gray Code

Gray Code:

When the Gray code is used, however, the timing and speed errors are greatly minimized because only one bit changes at a time.

Δtime

Page 14: Gray Code

Gray Code:

This permits code circuitry to operate at higher speeds with fewer errors.

Δtime

Page 15: Gray Code

Gray Code:

The biggest disadvantage of the Gray code is that it is difficult to use in arithmetic computations.

Page 16: Gray Code

Gray Code:

Where numbers must be added, subtracted or used in other computations, the Gray code is not applicable.

Page 17: Gray Code

Gray Code:

In order to perform arithmetic operations the Gray code number must generally be converted into pure binary form.

Page 18: Gray Code

End of Presentation