1 / 12

INTRODUÇÃO À ENGENHARIA DE COMPUTAÇÃO Prof. Wanderley

INTRODUÇÃO À ENGENHARIA DE COMPUTAÇÃO Prof. Wanderley. CÓDIGOS. Aula 2. Introdução. Códigos são símbolos usados para representar números, letras, palavras, etc. Códigos mais famoso é o código Morse, onde pontos e traços representam letras do alfabeto.

prisca
Télécharger la présentation

INTRODUÇÃO À ENGENHARIA DE COMPUTAÇÃO Prof. Wanderley

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INTRODUÇÃO À ENGENHARIA DE COMPUTAÇÃOProf. Wanderley CÓDIGOS Aula 2

  2. Introdução Códigos são símbolos usados para representar números, letras, palavras, etc. Códigos mais famoso é o código Morse, onde pontos e traços representam letras do alfabeto. Conversão de Bases: Qualquer número decimal pode ser representado por um binário equivalente. Representação binária => em um código Aula 2

  3. Codificação em Binário Puro Exemplo: 1000010 = 100111000100002 Conversão longa e complicada! Motivação para buscar novas formas de codificação. Aula 2

  4. Código BCD 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 BCD – Binary Coded Decimal Exemplo: 1000010 = 0001 0000 0000 0000 00002 110 010 010 010 010 Aula 2

  5. Código BCD Exercício 1: Codificar 754 decimal em BCD Exercício 2: Codificar 24 decimal em BCD Exercício 3: Descodificar o código BCD 1001 0001 0000 0100 Exercício 4: Descodificar o código BCD 1000 0011 0100 Exercício 5: Por que 1100 0011 0100 não é um código BCD? Aula 2

  6. Código Gray Gray BCD 0 0 0 0 0 1 0 0 0 1 2 0 0 1 1 3 0 0 1 0 4 0 1 1 0 5 0 1 1 1 6 0 1 0 1 7 0 1 0 0 8 1 1 0 0 9 1 1 0 1 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 Aula 2

  7. Código Gray G2G1G0 0 0 0 0 0 1 0 0 0 1 2 0 0 1 1 3 0 0 1 0 4 0 1 1 0 5 0 1 1 1 6 0 1 0 1 7 0 1 0 0 8 1 1 0 0 9 1 1 0 1 Encoder: Codificador de posição Aula 2

  8. Código Gray Exercício 1: Codificar 754 decimal em Gray Exercício 2: Codificar 24 decimal em Gray Exercício 3: Descodificar o código Gray 1001 0001 0000 0100 Exercício 4: Descodificar o código Gray 1100 0011 0100 Exercício 5: Projete um encoder de 4 bits. Exercício 6: Projete um encoder de 5 bits. Aula 2

  9. Código ASCII Padrão ASCII (American Standard Code for Information Intechange) é o código alfanumérico mais utilizado. ASCII é o padrão usado para transferência de informação entre computadores e dispositivos externos (impressoras, teclados, mouses, outros computadores, etc.). Possui 7 bits => 27 = 128 representações codificadas. Aula 2

  10. Código ASCII Aula 2

  11. Código ASCII Exercício: Qual o código ascii para o seguinte torpedo enviado a um amigo (em binário e em hexadecimal): Churrasco às 7h! Aula 2

  12. Código ASCII Extendido Possui 8 bits => 28 = 256 representações codificadas. Aula 2

More Related