Efficient convertors between binary and decimal numbers

Alternatives to the built-in functions bin2dec & dec2bin, exhibiting a somewhat faster performance.
ダウンロード: 1.9K
更新 2010/1/21

ライセンスの表示

These programs were developed for fast conversions between binary and decimal integers (there are other programs by fellow Matlab-users, dealing with fractions). They can be useful when the binary numbers are in vector form instead of strings.

b2d takes a binary number in the form of an array and calculates the equivalent decimal one. Nothing fancy, but quite effective as a component of a program that needs to be efficient in terms of computational overhead.

d2b is the symmetrical program, taking a decimal number and providing the equivalent binary one, in the form of an array.

Usage: y = b2d(x), y = d2b(x)

引用

Zacharias Voulgaris (2025). Efficient convertors between binary and decimal numbers (https://jp.mathworks.com/matlabcentral/fileexchange/26447-efficient-convertors-between-binary-and-decimal-numbers), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2009a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersData Type Conversion についてさらに検索
タグ タグを追加
謝辞

ヒントを与えたファイル: Binary encoding method, Random combinatorics

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0