The typical binary Gray code is called Gray code. It is named after the Frank Gray patent "Pulse Code Communication" published in 1953. It was originally used for communication, and is now commonly used in analog-to-digital conversion and position-to-digital conversion. The porter code used by French telecommunications engineer Porter in 1880 is equivalent to a variant of it. In 1941, an 8-element binary mechanical counter designed by George Stibitz coincided with the counting rule of the Gray code counter.
Gray code used Grey Code, Gray code, Gram code, Gree code, Golay code, cyclic code, binary reflection code, minimum error code, etc. Some of them are wrong, some are easy to Other names are confusing and it is recommended not to use them.
Gray code coding rulesThe Gray code bus position detecting unit includes an address transmitting unit, an antenna box, an address detecting unit, a Gray code bus, and an installation accessory.
Using the simplest single-turn coil induction principle, an alternating magnetic field is generated around the antenna box when an alternating current is passed through the antenna box coil. The Gray code bus is approximately in an alternating, evenly distributed magnetic field, and each pair of Gray code bus cores produces an induced electromotive force. The transmitting unit address signal is transmitted to the sensing loop of the Gray code bus by electromagnetic coupling.
The address detecting unit performs phase comparison on the received signals. The signal phase of the cross line is the same as the signal phase of the parallel line, and the address is “0â€; the signal phase of the cross line is opposite to the signal phase of the parallel line, and the address is “1â€, so that the sensed address information is Gray code arrangement, never Repeat, thereby determining the position of the mobile station in the direction of the length of the Gray code bus.
The law of Gray codeIn the digital system, only 0 and 1 can be identified, and various data can be converted into binary code for processing. Gray code is an unweighted code, and absolute coding is used. The typical Gray code is a reflection characteristic and a cyclic characteristic. Single-step self-complementing code, its cyclic and single-step characteristics eliminate the possibility of significant errors in random fetching. Its reflection and self-compensation characteristics make reversal very convenient. Gray code belongs to reliability coding and is an error-minimized coding method because natural binary code can be directly converted into analog signal by digital-to-analog converter, but in some cases, for example, from decimal 3 to 4 time binary code. Every bit changes, causing the digital circuit to generate large spikes of current. Gray code does not have this disadvantage. It is a digital sorting system in which all adjacent integers differ in their digital representation by only one number. When it transitions between any two adjacent numbers, only one digit changes. It greatly reduces the confusion of logic from one state to the next. In addition, since only one number is different between the maximum number and the minimum number, it is usually called a Gray reflection code or a cyclic code. The following table is a comparison table of several natural binary codes and Gray codes:
┌────┬──────┬───┬────┬──────┬────â”
│Decimal Number│Natural Binary Number│Gray Code│Decimal Number│Natural Binary Number│ Gray Code│
├────┼──────┼───┼────┼──────┼────┤
│0 │0000 │0000 │8 │1000 │1100 │
├────┼──────┼───┼────┼──────┼────┤
│1 │0001 │0001 │9 │1001 │1101 │
├────┼──────┼───┼────┼──────┼────┤
│2 │0010 │0011 │10 │1010 │1111 │
├────┼──────┼───┼────┼──────┼────┤
│3 │0011 │0010 │11 │1011 │1110 │
├────┼──────┼───┼────┼──────┼────┤
│4 │0100 │0110 │12 │1100 │1010 │
├────┼──────┼───┼────┼──────┼────┤
│5 │0101 │0111 │13 │1101 │1011 │
├────┼──────┼───┼────┼──────┼────┤
│6 │0110 │0101 │14 │1110 │1001 │
├────┼──────┼───┼────┼──────┼────┤
│7 │0111 │0100 │15 │1111 │1000 │
└────┴──────┴───┴────┴──────┴────┘
In general, ordinary binary code and Gray code can be converted to each other as follows:
Binary code - Gray code (encoding): From the rightmost bit, each bit is XORed with the left bit (XOR) ( ) as the value corresponding to the Gray code bit, the leftmost bit is unchanged (equivalent On the left is 0);
Gray code -> binary code (decoding): From the second bit on the left, the XOR of each bit is XORed with the decoded value of the left bit as the decoded value of the bit (the leftmost bit remains unchanged).
Math (computer) description:
Original code: p[0~n]; Gray code: c[0~n](n∈N); Code: c=G(p); Decoding: p=F(c); Marking from left to right when writing Decrease in turn.
Code: c=p XOR p[i+1](i∈N, 0≤i≤n-1), c[n]=p[n];
Decoding: p[n]=c[n], p=c XOR p[i+1](i∈N, 0≤i≤n-1).
Gay Code was proposed by Bell Labs' Fank Gay in the 1940s (in 1880 by French engineer Jean-Mauice-Emlle)
Invented by Baudot) to avoid errors when transmitting signals using the PCM (Pusle Code Modulation) method, and obtained a US patent on March 17, 1953. By definition, the Gay Code encoding method is not unique. The most commonly used one is discussed here.
Solar Cable,Solar Wire,Pv Cable,Solar Panel Cable
Sowell Electric CO., LTD. , https://www.sowellsolar.com