Dual, 65Msps, 12-Bit, IF/Baseband ADC

BINARY-TO-GRAY CODE CONVERSION

 

 

 

 

 

 

GRAY-TO-BINARY CODE CONVERSION

 

 

 

 

 

 

1) THE MOST SIGNIFICANT GRAY-CODE BIT IS THE SAME

 

 

 

1) THE MOST SIGNIFICANT BINARY BIT IS THE SAME AS THE

 

 

AS THE MOST SIGNIFICANT BINARY BIT.

 

 

 

 

 

 

MOST SIGNIFICANT GRAY-CODE BIT.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D11

 

 

D7

 

 

D3

 

 

D0

BIT POSITION

 

 

D11

 

 

D7

 

 

 

D3

 

 

D0

BIT POSITION

 

0

1

1

1

0

1

0

0

1

1

0

0

BINARY

 

0

1

0

0

1

1

1

0

1

0

1

0

GRAY CODE

 

0

 

 

 

 

 

 

 

 

 

 

 

GRAY CODE

 

0

 

 

 

 

 

 

 

 

 

 

 

BINARY

2) SUBSEQUENT GRAY-CODE BITS ARE FOUND ACCORDING

 

 

2) SUBSEQUENT BINARY BITS ARE FOUND ACCORDING TO

 

 

TO THE FOLLOWING EQUATION:

 

 

 

 

 

 

 

THE FOLLOWING EQUATION:

 

 

 

 

 

 

 

 

 

 

GRAYX = BINARYX +

BINARYX + 1

 

 

 

 

 

 

 

BINARYX = BINARYX+1

+

GRAYX

 

 

 

 

 

 

WHERE

+

IS THE EXCLUSIVE OR FUNCTION (SEE TRUTH

 

 

 

WHERE

+

IS THE EXCLUSIVE OR FUNCTION (SEE TRUTH

 

 

 

TABLE BELOW) AND X IS THE BIT POSITION:

 

 

 

 

 

TABLE BELOW) AND X IS THE BIT POSITION:

 

 

 

 

 

 

GRAY10 = BINARY10

+

BINARY11

 

 

 

 

 

 

 

BINARY10 = BINARY11

+

GRAY10

 

 

 

 

 

 

 

GRAY10 = 1 +

0

 

 

 

 

 

 

 

 

 

 

BINARY10 = 0

+ 1

 

 

 

 

 

 

 

 

 

 

GRAY10 = 1

 

 

 

 

 

 

 

 

 

 

 

BINARY10 = 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D11

 

 

D7

 

 

D3

 

 

D0

BIT POSITION

 

 

D11

 

 

D7

 

 

 

D3

 

 

D0

BIT POSITION

0

+

1

1

1

0

1

0

0

1

1

0

0

BINARY

0

 

 

1

0

0

1

1

1

0

1

0

1

0

GRAY CODE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

1

 

 

 

 

 

 

 

 

 

 

GRAY CODE

0

 

 

1

 

 

 

 

 

 

 

 

 

 

BINARY

3) REPEAT STEP 2 UNTIL COMPLETE:

 

 

 

 

 

 

 

3) REPEAT STEP 2 UNTIL COMPLETE:

 

 

 

 

 

 

 

 

GRAY9 = BINARY9 +

BINARY10

 

 

 

 

 

 

 

BINARY9 = BINARY10

+

GRAY9

 

 

 

 

 

 

 

GRAY9 = 1

+

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BINARY9 = 1

+ 0

 

 

 

 

 

 

 

 

 

 

GRAY9 = 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BINARY9 = 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BIT POSITION

 

 

 

 

 

 

 

 

 

 

 

 

 

BIT POSITION

 

 

D11

 

 

D7

 

 

D3

 

 

D0

 

 

D11

 

 

D7

 

 

 

D3

 

 

D0

0

1

+

1

1

0

1

0

0

1

1

0

0

BINARY

0

1

 

0

0

1

1

1

0

1

0

1

0

GRAY CODE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+

 

 

 

 

 

 

 

 

 

 

 

0

1

 

0

 

 

 

 

 

 

 

 

 

GRAY CODE

0

1

 

1

 

 

 

 

 

 

 

 

 

BINARY

4) THE FINAL GRAY-CODE CONVERSION IS:

 

 

 

 

 

4) THE FINAL BINARY CONVERSION IS:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D11

 

 

D7

 

 

D3

 

 

D0

BIT POSITION

 

 

D11

 

 

D7

 

 

 

D3

 

 

D0

BIT POSITION

 

0

1

1

1

0

1

0

0

1

1

0

0

BINARY

 

0

1

0

0

1

1

1

0

1

0

1

0

GRAY CODE

 

0

1

0

0

1

1

1

0

1

0

1

0

GRAY CODE

 

0

1

1

1

0

1

0

0

1

1

0

0

BINARY

 

 

EXCLUSIVE OR TRUTH TABLE

FIGURE 8 SHOWS THE GRAY-TO-BINARY AND BINARY-TO-GRAY

A

B

Y = A + B

CODE CONVERSION IN OFFSET BINARY FORMAT. THE OUTPUT

 

 

 

FORMAT OF THE MAX12527 IS TWO'S-COMPLEMENT BINARY,

0

0

0

HENCE EACH MSB OF THE TWO'S-COMPLEMENT OUTPUT CODE

0

1

1

MUST BE INSERTED TO REFLECT TRUE OFFSET BINARY FORMAT.

1

0

1

 

 

1

1

0

Figure 8. Binary-to-Gray and Gray-to-Binary Code Conversion

MAX12527

______________________________________________________________________________________ 21

Page 21
Image 21
Maxim MAX12527 manual Binary-to-Gray and Gray-to-Binary Code Conversion