Decimal to Binary converter (Configurable)

버전 1.0.0.0 (16.8 KB) 작성자: James
Convert Decimal to Binary number up to 4 bits
다운로드 수: 1.1K
업데이트 날짜: 2015/7/7

라이선스 보기

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 (2024). Decimal to Binary converter (Configurable) (https://www.mathworks.com/matlabcentral/fileexchange/52006-decimal-to-binary-converter-configurable), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2015a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Logical에 대해 자세히 알아보기
도움

도움 받은 파일: Decimal to Binary in SIMULINK

도움 준 파일: Binary Stopwatch with Arduino

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0