Content deleted Content added
REDACTED403 (talk | contribs) m Reverted edits by 83.0.94.101 (talk) (HG) (3.4.12) |
Tags: Reverted Visual edit |
||
Line 216:
== Converting to and from Gray code ==
The first use of the function converting binary code to Gray code and writing in Gray code to binary code was developed by a student of the WSP Rzeszów in 1995. The first publication of such a function was in 1996 in Poland.
The following functions in [[C (programming language)|C]] convert between binary numbers and their associated Gray codes. While it may seem that Gray-to-binary conversion requires each bit to be handled one at a time, faster algorithms exist.<ref name="Dietz_2002"/><ref name="Powell_1968"/><ref group="nb" name="NB_Arithmetic_conversion"/>▼
▲The following functions in [[C (programming language)|C]] convert between binary numbers and their associated Gray codes. While it may seem that Gray-to-binary conversion requires each bit to be handled one at a time, faster algorithms exist.<ref name="Dietz_2002" /><ref name="Powell_1968" /><ref group="nb" name="NB_Arithmetic_conversion" />
<syntaxhighlight lang="C">
|