SlideShare a Scribd company logo
1 of 17
El código Gray es un tipo especial
de código binario que no es ponderado,
su característica es que entre una
combinación de dígitos y la siguiente, sea
ésta anterior o posterior, sólo hay una
diferencia de un dígito.
Por eso también se le llama código
progresivo.

El código GRAY es utilizado
principalmente en sistemas de posición, ya
sea angular o lineal. Sus aplicaciones
principales se encuentran en la industria y
en robótica.
Numero Binario a código Gray
•   Para convertir un numero binario a código Gray se aplican las siguientes reglas:
•   El bit más significativo (el más a la izquierda) en el código Gray es el mismo que el
    MSB correspondiente en el número binario.
•   Siguiendo de izquierda a derecha, sume cada par adyacente de bits del código
    binario, para obtener el siguiente bit del código Gray.

•   Ejemplo:
•   Paso 1. El digito del código Gray mas a la izquierda es el mismo que el digito del
    código binario mas a la izquierda.


                 1           0          1           1          0       Binario
                 1                                                     Gray
•   Paso 2. Sume el bit de código binario más a la izquierda al bit adyacente.



                1          0           1          1           0      Binario
                1          1                                         Gray

•   Paso 3. Sume el siguiente par adyacente.

                 1          0           1          1          0       Binario
                 1          1           1                             Gray


•   Paso 4. Sume el siguiente par adyacente y descarte el acarreo.

                 1          0           1          1          0       Binario
                 1          1           1          0                  Gray
•   Paso 5. Sume el último par adyacente.


               1          0          1          1          0      Binario
               1          1          1          0          1      Gray

•   La conversión ha sido completada el numero binario 10110 B2 = 11101 en código
    Gray.
Código Gray a numero Binario
•   Para convertir un numero en código Gray a numero binario se aplican las siguientes
    reglas:
•   -El bit más significativo (el más a la izquierda) en el código binario es el mismo que el
    bit correspondiente en el código Gray.
•   -Sume cada bit generado del código binario al bit del código Gray en la siguiente
    posición adyacente.

     Ejemplo:
•   Paso 1. El digito del código binario más a la izquierda es el mismo que el digito del
    código Gray más a la izquierda.

               1          1           0           1           1      Gray
               1                                                     Binario
•   Paso 2. Sume el ultimo bit del código binario que se acaba de generar al bit del
    código Gray en la siguiente posición.


                1          1           0          1           1      Gray
                1          0                                         Binario


•   Paso 3. Sume el ultimo bit del código binario que se acaba de generar al bit del
    código Gray en la siguiente posición.

                1          1           0          1           1      Gray
                1          0           0                             Binario



•   Paso 4. Sume el ultimo bit del código binario que se acaba de generar al bit del
    código Gray en la siguiente posición.

                1          1           0          1           1      Gray
                1          0           0          1                  Binario
•   Paso 5. Sume el ultimo bit del código binario que se acaba de generar al bit del
    código Gray en la siguiente posición.



                1          1          0           1          1       Gray
                1          0          0           1          0       Binario

•   La conversión ha sido completada el numero 11011 en código Gray= 10010B2.
Numero Binario a código Gray
•   Para realizar esta conversión es necesario tomar en cuenta lo siguiente:

•   -El MSB del número binario será el mismo para el código Gray.
•   -Sumar el MSB del número binario al bit situado a su derecha inmediata y anotar el
    resultado del número en código Gray que estamos formando.
•   -Continuar sumando bits a los bits situados a la derecha y anotando las sumas.
•   -El número en código Gray tendrá el mismo número de bits que el número binario.
•   Ejemplo:
•   Convertir el numero binario 0010 a código Gray




•   La conversión ha sido completada el 0010B2= 0011 en código Gray.
Código Gray a numero Binario

•   Para realizar esta conversión se tomara en cuenta lo siguiente:

•   -El bit izquierdo de código Gray será el MSB del número binario.
•   -El bit obtenido es sumado al segundo bit de la izquierda del código Gray, y el
    resultado se anotara a la derecha del numero binario a formar.
•   -Este resultado se le suma al bit situado a la derecha inmediata del ultimo bit que
    sumamos y el resultado será el otro bit del número binario (se ordena de izquierda a
    derecha).
•   -Repetir el paso anterior hasta llegar al bit mas a la derecha del código Gray.
•   -El número de bits del número binario deberá coincidir con el número de bits del
    número en código Gray.
•   Ejemplo:
•   Convertir el número en código Gray 1001 a número binario




•   La conversión ha sido completada el numero 1001 en código Gray= 1110B2.
Plc presentacion
Plc presentacion

More Related Content

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Plc presentacion

  • 1.
  • 2. El código Gray es un tipo especial de código binario que no es ponderado, su característica es que entre una combinación de dígitos y la siguiente, sea ésta anterior o posterior, sólo hay una diferencia de un dígito. Por eso también se le llama código progresivo. El código GRAY es utilizado principalmente en sistemas de posición, ya sea angular o lineal. Sus aplicaciones principales se encuentran en la industria y en robótica.
  • 3.
  • 4.
  • 5.
  • 6. Numero Binario a código Gray • Para convertir un numero binario a código Gray se aplican las siguientes reglas: • El bit más significativo (el más a la izquierda) en el código Gray es el mismo que el MSB correspondiente en el número binario. • Siguiendo de izquierda a derecha, sume cada par adyacente de bits del código binario, para obtener el siguiente bit del código Gray. • Ejemplo: • Paso 1. El digito del código Gray mas a la izquierda es el mismo que el digito del código binario mas a la izquierda. 1 0 1 1 0 Binario 1 Gray
  • 7. Paso 2. Sume el bit de código binario más a la izquierda al bit adyacente. 1 0 1 1 0 Binario 1 1 Gray • Paso 3. Sume el siguiente par adyacente. 1 0 1 1 0 Binario 1 1 1 Gray • Paso 4. Sume el siguiente par adyacente y descarte el acarreo. 1 0 1 1 0 Binario 1 1 1 0 Gray
  • 8. Paso 5. Sume el último par adyacente. 1 0 1 1 0 Binario 1 1 1 0 1 Gray • La conversión ha sido completada el numero binario 10110 B2 = 11101 en código Gray.
  • 9. Código Gray a numero Binario • Para convertir un numero en código Gray a numero binario se aplican las siguientes reglas: • -El bit más significativo (el más a la izquierda) en el código binario es el mismo que el bit correspondiente en el código Gray. • -Sume cada bit generado del código binario al bit del código Gray en la siguiente posición adyacente. Ejemplo: • Paso 1. El digito del código binario más a la izquierda es el mismo que el digito del código Gray más a la izquierda. 1 1 0 1 1 Gray 1 Binario
  • 10. Paso 2. Sume el ultimo bit del código binario que se acaba de generar al bit del código Gray en la siguiente posición. 1 1 0 1 1 Gray 1 0 Binario • Paso 3. Sume el ultimo bit del código binario que se acaba de generar al bit del código Gray en la siguiente posición. 1 1 0 1 1 Gray 1 0 0 Binario • Paso 4. Sume el ultimo bit del código binario que se acaba de generar al bit del código Gray en la siguiente posición. 1 1 0 1 1 Gray 1 0 0 1 Binario
  • 11. Paso 5. Sume el ultimo bit del código binario que se acaba de generar al bit del código Gray en la siguiente posición. 1 1 0 1 1 Gray 1 0 0 1 0 Binario • La conversión ha sido completada el numero 11011 en código Gray= 10010B2.
  • 12. Numero Binario a código Gray • Para realizar esta conversión es necesario tomar en cuenta lo siguiente: • -El MSB del número binario será el mismo para el código Gray. • -Sumar el MSB del número binario al bit situado a su derecha inmediata y anotar el resultado del número en código Gray que estamos formando. • -Continuar sumando bits a los bits situados a la derecha y anotando las sumas. • -El número en código Gray tendrá el mismo número de bits que el número binario.
  • 13. Ejemplo: • Convertir el numero binario 0010 a código Gray • La conversión ha sido completada el 0010B2= 0011 en código Gray.
  • 14. Código Gray a numero Binario • Para realizar esta conversión se tomara en cuenta lo siguiente: • -El bit izquierdo de código Gray será el MSB del número binario. • -El bit obtenido es sumado al segundo bit de la izquierda del código Gray, y el resultado se anotara a la derecha del numero binario a formar. • -Este resultado se le suma al bit situado a la derecha inmediata del ultimo bit que sumamos y el resultado será el otro bit del número binario (se ordena de izquierda a derecha). • -Repetir el paso anterior hasta llegar al bit mas a la derecha del código Gray. • -El número de bits del número binario deberá coincidir con el número de bits del número en código Gray.
  • 15. Ejemplo: • Convertir el número en código Gray 1001 a número binario • La conversión ha sido completada el numero 1001 en código Gray= 1110B2.