Gray Codes Introduction Gray code is a binary

Gray Codes

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 -bits 00 01 11 10 0001 0010 0111 0100 1101 1110 1011 1000 3 -bits 000 001 010 111 100 2/14

Motivation Decimal Binary . . . 3 011 4. . . 100. . . Decimal Binary Gray As Decimal 0 000 0 1 001 1 2 010 011 3 3 011 010 2 4 100 110 6 5 101 111 7 6 110 101 5 7 111 100 4 3/14

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

Example (inverse) 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 1 1 = (23) 10 5/14

Grey Code (Implementation) 6/14

Grey Code Inverse (Implementation) 7/14

Cpu. Stream. Cpu. Code. c 8/14

Cpu. Stream. Kernel. maxj 9/14

Cpu. Stream. Manager. maxj 10/14

Build & Run 11/14

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

References � Milutinovic, V. , editor, Advances in Computers: Data. Flow, Elsevier, 2015. � Milutinovic, V. , editor, "Computer Architecture, " (Chapter 9, Data. Flow Computation, Dennis, J. , ), North Holland, 1988. � Hurson, A. , Milutinovic, V. , editors, "Data. Flow Processing, ” Elsevier, 2015. 13/14

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