Gray Code Generator
Schematic Symbol :GrayCodGen
Simcode :12012
Definition of Gray Code:
An ordering of ‘2 raised to the power of n’ binary numbers such that only one bit
changes from one entry to the next. Gray codes for 4 or more bits are not
unique, even allowing for permutation (A rearrangement of elements, where none
are lost, added, or changed) or inversion of bits. The term Gray code is often
used to refer to a "reflected" code, or more specifically still, the binary
reflected Gray code. The code is called reflected because it can be generated in
the following manner as shown:
Take the Gray code 0, 1. Write it forwards, then backward: 0, 1, 1, and 0. Then
pretend 0s to the first half and 1s to the second half: 00, 01, 11, and 10.
Continuing, write 00, 01, 11, 10, 10, 11, 01, 00 to obtain: 000, 001, 011, 010,
110, 111, 101, 100, Each iteration therefore doubles the number of codes.
In this model the following the gray code is generated as per given the table
given below:
Function of the Model
Binary values from zero to 15 are fed through the input pins of the gray code
generator and the corresponding gray code value is obtained for the given binary
values. In this model A3, A2, A1, A0 are the input pins. A3 is the MSB pins and
A0 is LSB pin. The values for A3, A2, A1, A0 are fed by means of the clock
editor.
The model can be used for the generation of gray code from binary values zero to
15.
Click here to view other Instrumental Models