bi2gray

A function to convert a binary sequence to the Gray-encoded sequence.
5.3K Downloads
Updated 29 May 2002

No License

The function converts the binary input sequence into another binary sequence according to Gray code. See also gray2bi.

Example:

bi2gray( [ 1 1 1 ] )

will produce a following sequence:

1 0 0.

Cite As

Adrian Bohdanowicz (2026). bi2gray (https://www.mathworks.com/matlabcentral/fileexchange/1743-bi2gray), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Data Type Conversion in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0