Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1

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 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-bits4-bits 00 01 11 10 0000 0001 0011 0010 0110 0111 0101 0100 1100 1101 1111 1110 1010 1011 1001 1000 3-bits 000 001 011 010 110 111 101 100 2/14

3 Motivation DecimalBinary... 3011 4100... DecimalBinaryGray Gray As Decimal 0000 0 1001 1 20100113 3 0102 41001106 51011117 61101015 71111004 3/14

4 Grey code for 23: (23) 10 = (0001 0111) 2 Function: Result = Num (Num / 2) // (div 2) 10 == (>> 1) 2 Example 00010111 00001011 00011100 = (28) 10 4/14

5 Function: a n −1 = g n −1 a i = g i ⊕ a i +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

6 Grey Code (Implementation) 6/14

7 Grey Code Inverse (Implementation) 7/14

8 8/14 CpuStreamCpuCode.c

9 9/14 CpuStreamKernel.maxj

10 10/14 CpuStreamManager.maxj

11 11/14 Build & Run

12 Conclusion Unfortunately, DFE algorithm implementation does not cause speedup in most of the cases... 12/14

13 References https://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

14 14/14 Professor: dr Veljko M. Milutinović Student: Petar Ristić 32/2012 Software engineering School of Electrical Engineering University of Belgrade Microprocessor Systems (MIPS)


Download ppt "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."

Similar presentations


Ads by Google