Introduction Gray code is a binary numeral system where two successive values differ in only one bit...
-
Upload
melissa-foster -
Category
Documents
-
view
219 -
download
0
description
Transcript of Introduction Gray code is a binary numeral system where two successive values differ in only one bit...
![Page 1: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/1.jpg)
Gray Codes
![Page 2: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/2.jpg)
Introduction
• Gray code is a binary numeral system where two successive values differ in only one bit (binary digit).
• Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems.
• This code was originally designed to prevent spurious output from electromechanical switches.
2-bits 4-bits00011110
0000000100110010011001110101010011001101111111101010101110011000
3-bits000001011010110111101100
2/14
![Page 3: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/3.jpg)
Motivation
Decimal Binary
... ...
3 011
4 100
... ...
Decimal Binary Gray
Gray As
Decimal
0 000 000 01 001 001 12 010 011 33 011 010 24 100 110 65 101 111 76 110 101 57 111 100 4
3/14
![Page 4: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/4.jpg)
Grey code for 23:(23)10 = (0001 0111)2
Function: Result = Num (Num / 2) //(div 2)10 == (>> 1)2
Example
0 0 0 1 0 1 1 1
0 0 0 0 1 0 1 1
0 0 0 1 1 1 0 0 = (28)10
4/14
![Page 5: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/5.jpg)
Function: an−1 = gn−1 ai = gi ⊕ ai+1, i = n − 2, . . . , 0
g: 0 0 0 1 1 1 0 0 a: 0 0 0 1 0 1 1 1 = (23)10
Example (inverse)
5/14
![Page 6: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/6.jpg)
Grey Code (Implementation)
6/14
![Page 7: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/7.jpg)
Grey Code Inverse (Implementation)
7/14
![Page 8: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/8.jpg)
8/14
CpuStreamCpuCode.c
![Page 9: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/9.jpg)
9/14
CpuStreamKernel.maxj
![Page 10: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/10.jpg)
10/14
CpuStreamManager.maxj
![Page 11: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/11.jpg)
11/14
Build & Run
![Page 12: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/12.jpg)
ConclusionUnfortunately, DFE algorithm implementationdoes not cause speedup in most of the cases...
12/14
![Page 13: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/13.jpg)
Referenceshttps://en.wikipedia.org/wiki/Gray_code
The Gray Code by R. W. Doran
Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007). “Section 22.3.GrayCodes”. Numerical Recipes: The Art of Scientific Computing (3rd ed.). New York: Cambridge University Press.
Wilf, Herbert S. (1989). "Chapters 1–3". Combinatorial algorithms: an update. SIAM.ISBN 0-89871-231-9.
13/14
![Page 14: Introduction Gray code is a binary numeral system where two successive values differ in only one bit (binary digit). Today, Gray codes are widely used.](https://reader034.fdocuments.net/reader034/viewer/2022051405/5a4d1b617f8b9ab0599ad4b5/html5/thumbnails/14.jpg)
14/14
Professor: dr Veljko M. Milutinović
Student: Petar Ristić 32/2012
Software engineeringSchool of Electrical Engineering
University of Belgrade
Microprocessor Systems (MIPS)