Discharging a Capacitor
Charging a Capacitor
Electric FluxClosely Related Articles
Binary Number System | Binary to Decimal and Decimal to Binary Conversion
Binary to Decimal and Decimal to Binary Conversion
BCD or Binary Coded Decimal | BCD Conversion Addition Subtraction
Binary to Octal and Octal to Binary Conversion
Octal to Decimal and Decimal to Octal Conversion
Binary to Hexadecimal and Hex to Binary Conversion
Hexadecimal to Decimal and Decimal to Hexadecimal Conversion
Gray Code | Binary to Gray Code and that to Binary Conversion
Octal Number System
Digital Logic Gates
2s Complement Arithmetic
Error Detection and Correction Codes
9s complement and 10s complement | Subtraction
Some Common Applications of Logic Gates
Alphanumeric codes | ASCII code | EBCDIC code | UNICODE
Boolean Algebra Theorems and Laws of Boolean Algebra
De Morgan Theorem and Demorgans Laws
Truth Tables for Digital Logic
Simplifying Boolean Expression using K Map
Excess 3 Code Addition and Subtraction
K Map or Karnaugh Map
Switching Algebra or Boolean Algebra
Binary Adder Half and Full Adder
Seven Segment Display
Binary to Gray Code Converter and Grey to Binary Code Converter
Binary to BCD Code Converter
Analog to Digital Converter
Digital Encoder or Binary Encoder
Basic Digital Counter
BCD to Seven Segment Decoder
Parallel Adder or Subtractor
555 Timer and 555 Timer Working
Look Ahead Carry Adder
OR Operation | Logical OR Operation
AND Operation | Logical AND Operation
Logical OR Gate
Logical AND Gate
Universal Gate | NAND and NOR Gate as Universal Gate
Diode and Transistor NAND Gate or DTL NAND Gate and NAND Gate ICs
X OR Gate and X NOR Gate
Transistor Transistor Logic or TTL
Fan out of Logic Gates
NMOS Logic and PMOS Logic
Logic Families Significance and Types of Logic Families
S R Flip Flop
Active Low S R Latch
Clocked S R Flip Flops
D Flip Flop
J K Flip Flop
Master Slave Flip Flop
Read Only Memory
Programmable Logic Devices
Programmable Array Logic
Application of Flip Flops
Buffer Register and Controlled Buffer Register
Data Transfer in Shift Registers
Serial In Serial Out (SISO) Shift Register
Serial in Parallel Out (SIPO) Shift Register
Parallel in Serial Out (PISO) Shift Register
Parallel in Parallel Out (PIPO) Shift Register
Universal Shift Registers
Bidirectional Shift Register
Dynamic Shift Register
Applications of Shift Registers
Conversion of Flip Flops
Gray Code | Binary to Gray Code and that to Binary Conversion
From this table we can obtain the equivalent gray code of the decimal numbers. There are several steps which will make you understand how the codes are formed. (1) In case of gray code one bit will change from its previous in each steps. One thing must be kept in mind that the change of bit always occurs from the right side i.e from L.S.B towards the M.S.B. At first the first three bits are constant I,e 000 and the fourth bit changes from 0 to 1. We know that for binary digit possible combination is 0 and 1, so keeping first three bit constant the possible combination of 4th bit is over for decimal 0 and 1 respectively.
(2)Now move to the next bit from L.S.B i.e 3rd bit, that changes from 0 to 1 which is the decimal equivalent for 2. Now one more combination is left for the fourth bit keeping the first three constant i.e 001. We can change 4th bit from 1 to 0. Thus the gray code for decimal number 3 is 0010. (3)Traverse to the next code. Here we can do only one thing i.e we can change the second bit as all possible combinations are over. Question may strike in your mind that why can’t we change the third bit again which will also be a one bit change from its previous. But changing third bit would give the equivalent gray code 0000 which has occurred earlier. So you must remember that a number occurring previously must not be repeated. So the equivalent code for 4 will be 0110. Here only the second bit has changed from the previous code. Now again we will keep first and second bit constant and find the possible combinations of the third and the fourth bit by only changing 1 bit in each steps. Now for 5 only the fourth bit has changed. Again for 6 only the third bit is changed keeping others constant. Lastly at 7 again the fourth bit has changed from 1 to 0 where all other bits are constant. In 8 you can see that the equivalent gray code is 1100. Here the 1st bit changes from 0 to n1 as all the combination of the 2nd, 3rd and 4th bits are completed keeping the 1st constant at 0. Now in same way the 1st bit is kept constant and all the possible combination changing single bit in each step from right to left is done.
Binary to gray code conversionBinary to gray code conversion is a very simple process. There are several steps to do this types of conversions. Steps given below elaborate on the idea on this type of conversion.
- The M.S.B. of the gray code will be exactly equal to the first bit of the given binary number.
- Now the second bit of the code will be exclusive-or of the first and second bit of the given binary number, i.e if both the bits are same the result will be 0 and if they are different the result will be 1.
- The third bit of gray code will be equal to the exclusive-or of the second and third bit of the given binary number. Thus the Binary to gray code conversion goes on. One example given below can make your idea clear on this type of conversion.
Gray code to binary conversionGray code to binary conversion is again very simple and easy process. Following steps can make your idea clear on this type of conversions.
- The M.S.B of the binary number will be equal to the M.S.B of the given gray code.
- Now if the second gray bit is 0 the second binary bit will be same as the previous or the first bit. If the gray bit is 1 the second binary bit will alter. If it was 1 it will be 0 and if it was 0 it will be 1.
- This step is continued for all the bits to do Gray code to binary conversion.
Closely Related Articles Binary Number System | Binary to Decimal and Decimal to Binary ConversionBinary to Decimal and Decimal to Binary ConversionBCD or Binary Coded Decimal | BCD Conversion Addition SubtractionBinary to Octal and Octal to Binary ConversionOctal to Decimal and Decimal to Octal ConversionBinary to Hexadecimal and Hex to Binary ConversionHexadecimal to Decimal and Decimal to Hexadecimal ConversionOctal Number SystemDigital Logic Gates2′s Complement1′s ComplementASCII CodeHamming Code2s Complement ArithmeticError Detection and Correction Codes9s complement and 10s complement | SubtractionSome Common Applications of Logic GatesKeyboard EncoderAlphanumeric codes | ASCII code | EBCDIC code | UNICODEMore Related Articles Digital ElectronicsBoolean Algebra Theorems and Laws of Boolean AlgebraDe Morgan Theorem and Demorgans LawsTruth Tables for Digital LogicBinary Arithmetic Binary AdditionBinary SubtractionSimplifying Boolean Expression using K MapBinary DivisionExcess 3 Code Addition and SubtractionK Map or Karnaugh MapSwitching Algebra or Boolean AlgebraBinary MultiplicationParallel SubtractorBinary Adder Half and Full AdderBinary SubstractorSeven Segment DisplayBinary to Gray Code Converter and Grey to Binary Code ConverterBinary to BCD Code ConverterAnalog to Digital ConverterDigital Encoder or Binary EncoderBinary DecoderBasic Digital CounterDigital ComparatorBCD to Seven Segment DecoderParallel AdderParallel Adder or SubtractorMultiplexerDemultiplexer555 Timer and 555 Timer WorkingLook Ahead Carry AdderOR Operation | Logical OR OperationAND Operation | Logical AND OperationLogical OR GateLogical AND GateNOT GateUniversal Gate | NAND and NOR Gate as Universal GateNAND GateDiode and Transistor NAND Gate or DTL NAND Gate and NAND Gate ICsX OR Gate and X NOR GateTransistor Transistor Logic or TTLNOR GateFan out of Logic GatesINHIBIT GateNMOS Logic and PMOS LogicSchmitt GatesLogic Families Significance and Types of Logic FamiliesLatches and Flip FlopsS R Flip Flop S R LatchActive Low S R Latch and Flip FlopGated S R Latches or Clocked S R Flip FlopsD Flip Flop or D LatchJ K Flip FlopMaster Slave Flip FlopRead Only Memory | ROMProgrammable Logic DevicesProgrammable Array LogicApplication of Flip FlopsShift RegistersBuffer Register and Controlled Buffer RegisterData Transfer in Shift RegistersSerial In Serial Out (SISO) Shift RegisterSerial in Parallel Out (SIPO) Shift RegisterParallel in Serial Out (PISO) Shift RegisterParallel in Parallel Out (PIPO) Shift RegisterUniversal Shift RegistersBidirectional Shift RegisterDynamic Shift RegisterApplications of Shift RegistersUninterruptible Power Supply | UPSConversion of Flip FlopsJohnson CounterSequence GeneratorRing CounterNew Articles Ring CounterDischarging a CapacitorCharging a CapacitorElectric PotentialParity GeneratorElectric Flux