SIMPLE ELECTRONIC PROJECTS | ELECTRONICS TUTORIALS | ELECTRONICS RESOURCES | ELECTRONIC COMMUNICATIONS | CONSUMER ELECTRONICS
BINARY–GRAY CODE CONVERSION AND GRAY CODE–BINARY CONVERSION BASIC INFORMATION AND TUTORIALS
Binary–Gray Code Conversion
A given binary number can be converted into its Gray code equivalent by going through the following steps:
1. Begin with the most significant bit (MSB) of the binary number. The MSB of the Gray code equivalent is the same as the MSB of the given binary number.
2. The second most significant bit, adjacent to the MSB, in the Gray code number is obtained by adding the MSB and the second MSB of the binary number and ignoring the carry, if any. That is, if the MSB and the bit adjacent to it are both ‘1’, then the corresponding Gray code bit would be a ‘0’.
3. The third most significant bit, adjacent to the second MSB, in the Gray code number is obtained by adding the second MSB and the third MSB in the binary number and ignoring the carry, if any.
4. The process continues until we obtain the LSB of the Gray code number by the addition of the LSB and the next higher adjacent bit of the binary number.
The conversion process is further illustrated with the help of an example showing step-by-step conversion of (1011)2 into its Gray code equivalent:
Binary 1011
Gray code 1- - -
Binary 1011
Gray code 11- -
Binary 1011
Gray code 111-
Binary 1011
Gray code 1110
Gray Code–Binary Conversion
A given Gray code number can be converted into its binary equivalent by going through the following steps:
1. Begin with the most significant bit (MSB). The MSB of the binary number is the same as the MSB of the Gray code number.
2. The bit next to the MSB (the second MSB) in the binary number is obtained by adding the MSB in the binary number to the second MSB in the Gray code number and disregarding the carry, if any.
3. The third MSB in the binary number is obtained by adding the second MSB in the binary number to the third MSB in the Gray code number. Again, carry, if any, is to be ignored.
4. The process continues until we obtain the LSB of the binary number.
The conversion process is further illustrated with the help of an example showing step-by-step conversion of the Gray code number 1110 into its binary equivalent:
Gray code 1110
Binary 1- - -
Gray code 1110
Binary 10 - -
Gray code 1110
Binary 101
Gray code 1110
Binary 1011
Subscribe to:
Post Comments (Atom)
ARTICLES
-
▼
2012
(300)
-
▼
Sep
(25)
- COAXIAL CABLE CAPACITANCE AND CUT OFF FREQUENCY BA...
- VOLTAGE STANDING WAVE RATIO BASIC INFORMATION AND ...
- DECIBEL AND LOGARITHMIC SCALE BASIC INFORMATION AN...
- SCATTER IN COMMUNICATION (SPORADIC E) BASIC INFORM...
- MULTI PATH RADIO PROPAGATION BASIC INFORMATION AND...
- TROUBLE SHOOTING THE PCI BUS BASIC INFORMATION AND...
- PCI BUS DEFINITION BASIC INFORMATION AND TUTORIALS
- TROUBLE SHOOTING THE MOTHER BOARD OF A COMPUTER BA...
- REPLACING AND UPGRADING THE CPU BASIC INFORMATION ...
- MICRO COMPUTER BASICS
- LOGIC GATES SYMBOL IIEE/ANSI STANDARDS BASIC INFOR...
- ENHANCED SPECIALIZED MOBILE RADIO (ESMR) BASIC DEF...
- TIME DIVISION MULTIPLE ACCESS (TDMA) BASIC DEFINIT...
- GLOBAL SYSTEM FOR MOBILE COMMUNICATION (GSM) BASIC...
- CODE DIVISION MULTIPLE ACCESS (CDMA) DEFINITION BA...
- VOLTMETER PROJECT DIAGRAM - UNIVERSAL HIGH RESISTANCE
- AUTOMATIC HEAT DETECTOR PROJECT DIAGRAM AND TUTORIALS
- E-BOOK COPY PROTECTION BASIC INFORMATION AND TUTOR...
- WHAT IS AN E-BOOK?
- BIOS (BASIC INPUT OUTPUT SYSTEM) OF COMPUTERS BASI...
- BINARY–GRAY CODE CONVERSION AND GRAY CODE–BINARY C...
- BATTERY TESTER FOR 1.5 AND 9 VOLTS BASIC CIRCUIT D...
- CLAP-BASED SWITCHING FOR DEVICES PROJECT CIRCUIT D...
- VERSATILE EMERGENCY LIGHT USING FLUORESCENT TUBES ...
- AUDIO PRE AMPLIFIER PROJECT CIRCUIT BASIC ELECTRONICS
-
▼
Sep
(25)
No comments:
Post a Comment