Decimal to Binary converter (Configurable)

Convert Decimal to Binary number up to 4 bits

現在この提出コンテンツをフォロー中です。

This Simulink model shows a simple code to convert decimal to binary numbers up to 8 bits (0 to 255 dec). It is easily configurable however, e.g if 9 bits is required, simply change 2 lines of the codes int he Matlab function block as shown below:
1)
a=zeros(1,8);
to
a=zeros(1,9);

2)
x=[a(8),a(7),a(6),a(5),a(4),a(3),a(2),a(1)];
to
x=[a(9),a(8),a(7),a(6),a(5),a(4),a(3),a(2),a(1)];

The code was modified to remove the bug during conversion at decimal 0.

引用

James (2026). Decimal to Binary converter (Configurable) (https://jp.mathworks.com/matlabcentral/fileexchange/52006-decimal-to-binary-converter-configurable), MATLAB Central File Exchange. に取得済み.

謝辞

ヒントを得たファイル: Decimal to Binary in SIMULINK

ヒントを与えたファイル: Binary Stopwatch with Arduino

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.0.0.0