Explore chapters and articles related to this topic
Numbering Systems and Coding Techniques
Published in David G. Johnson, Programmable Controllers for Factory Automation, 2020
The Gray code is a cyclic code used primarily with position sensing devices such as digital encoders. This code system is normally part of the inner workings of the encoder system, and is, therefore, transparent to the user of such apparatus. A Gray code table is shown in Table 3.5. It was developed for use with high-speed sensing systems, and only allows one bit of information to change for each increment or decrement. This provides for a more accurate and predictable sensing/decoding system. In today’s advanced programmable controller systems, many have as available options an intelligent input/output module for use with an incremental position encoder. All of the position sensing, data latching, and accuracy maintenance is done in the intelligent module, relieving the user of the task of interfacing the encoder, and writing the program to decode the position data.
Conversion Macros
Published in Murat Uzam, PIC16F1847 Microcontroller-Based Programmable Logic Controller, 2020
Gray code is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit). Gray code was originally designed to prevent spurious output from electromechanical switches. Gray codes are widely used to facilitate error correction in digital communications such as digital television and some cable TV systems. The binary to gray code conversion method strongly follows the EX-OR gate operation between binary bits. The following steps briefly show how to perform binary to gray code conversion: To convert binary to gray code, bring down the most significant bit (MSB) of the given binary number, because the MSB of the gray coded number is the same as the binary number. To obtain the successive gray coded bits from the given binary number, add the first binary bit (the MSB) of binary to the second one and write down the result next to the first bit of gray code, add the second binary bit to the third one and write down the result next to the second bit of gray code, follow this operation until the last binary bit, and write down the results to produce the equivalent gray coded number. Recall that the addition of two bits is carried out by means of a two-input EX-OR gate.
Arithmetic and Logic Unit Organisation
Published in Pranabananda Chakraborty, Computer Organisation and Architecture, 2020
When multiple input conditions in digital circuit are continuously changing almost at the same time at very high speeds, the situation may be misinterpreted, leading to an erroneous outcome. For example, with a 3-bit number, when the number 3 (binary 011) changes to 4 (binary 100), all three bits individually must change their states at the same time. In order to reduce the likelihood of a digital circuit misinterpreting a changing input, and also to facilitate such changes faster, the Gray codehas been evolved as a way to represent a sequence of numbers. The unique aspect of the Gray code is that only one bit ever changes between two successive numbers in the sequence.
A Fault-Tolerance Nanoscale Design for Binary-to-Gray Converter based on QCA
Published in IETE Journal of Research, 2023
Saeid Seyedi, Nima Jafari Navimipour
The circuits which are converting a determined code to another code are known as code converters. These codes have been encoded in logic arrays. Gray code has a digital structure in which two successive value differs just a bit from the previous one. This code is not convenient for arithmetic operations. Gray code has many constructive applications, including simplifying fault correction, terrestrial television, cable television systems, an analog-to-digital converter, and a peripheral apparatus. On the other hand, most circuits in the QCA technology are produced using inverter and majority gates. However, the standard inverter and majority gates have a feeble fault-tolerant capability toward several commonplace faults. For this reason, the researchers proposed a fault-tolerant inverter and majority gate, which can be seen in Figure 2 [25]. Based on these gates, the block diagram for two-bit fault-tolerant binary-to-gray converter are shown in Figure 3. Also, the block diagram for three-bit binary-to-gray converter are illustrated in Figure 4. The three-bit code converters’ inputs are B0, B1, and B2, and the yields are G0, G1, and G2. The recommended circuit is designed to utilize six fault-tolerant majority gates and four fault-tolerant inverter gates (In this plan, the inverter cells are located inside the wire cells and majority gate cells). Similarly, the block diagram and the proposed design for fault-tolerant four-bit binary-to-gray converter have been illustrated in Figure 5. The four-bit code converters’ inputs are B0, B1, B2, and B3, where the consistent outputs are G0, G1, G2, and G3. The recommended circuit is schematized using nine fault-tolerant majority and six fault-tolerant inverter gates (Also, the inverter cells are located inside the wire cells and majority gate cells). The logical equation of 2-bit, 3-bit and 4-bit binary to gray code converter are (G1 = B1, G0= B1⊕B0), (G0= B0, G1= B1⊕B0, G2= B2⊕B1), and (G3= B3, G2= B3⊕B2, G1= B2⊕B1 and G0= B1⊕B0), respectively.