NUMBER SYSTEMS/ BASE CONVERTER

버전 1.2.0.0 (78 KB) 작성자: Divakar Roy
Convert a number between different number systems-hex,oct,bin,dec.
다운로드 수: 4.3K
업데이트 날짜: 2012/9/12

라이선스 보기

Instances:

bin_2_oct('0100101111100100110010010101001010010010101111010011101010010101001')
ans =
4574462251222572352251

bin_2_dec('0100101111100100110010010110100100101001010010010101111010011101010010101001')
ans =
22399866065043652727977

bin_2_hex('0100101111100100110010010110100100101001010010010101111010011101010010101001')
ans =
4BE4C96929495E9D4A9

oct_2_bin('3532432436345324764546435345')
ans =
11101011010100011010100011110011100101011010100111110100101100110100011101011100101

oct_2_dec('3423432323563455432643242435524242445457735325263326453243245342645327')
ans =
727762791843212863701450133737761143418605884024736534705687255

oct_2_hex('3532432436345324764546435345433463427254364534321323123')
ans =
EB51A8F395A9F4B3475CB1B99C5D58F4AE345A653

dec_2_bin('3423432323563455442374874327')
ans =
10110000111111001011111111100010000011010011101010111010110011110001101011111101010011010111

dec_2_oct('3423432323563455432643242435524242445457735325263326453243245342645327')
ans =
77373335764716516477107330113172733565105561077056067173304146511645015456117

dec_2_hex('3423432323563455432643242435524242445457735325263326453243245342645327')
ans =
7EFB6EFD39D4E9F91DB04B3D76EEA45B88FC5C373DB10CD49D28365C4F

hex_2_bin('71253785ae6DEF324534Ff')
ans =
111000100100101001101111000010110101110011011011110111100110010010001010011010011111111

hex_2_oct('7125378512AE32546DEF213ae43535fe2312d23145465787654d2e3c')
ans =
161112336050452706225066757102353441523277610611322142425062570354523227074

hex_2_dec('7125378512AE32546DEF213ae43535fe2312d23145465787654d2e3c')
ans =
11915599092607191739039367662030936125233731628115520027914010439228

Added GUI version for easy usage and added cases where user puts invalid numbers and automatic conversion of lowercase to uppercase when user puts ‘a’ instead of ‘A’. So, it’s rather bug-less at least to me, but yes of course bug-reporting(if any)/reviews/comments are very welcome.

Welcome, to no-limit world :)

인용 양식

Divakar Roy (2024). NUMBER SYSTEMS/ BASE CONVERTER (https://www.mathworks.com/matlabcentral/fileexchange/11953-number-systems-base-converter), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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

Updated to include an App file for R2012b

1.1.0.0

Made the change of accommodating the case where input is '0', though I thought no one will use it for that case, anyway thanks to Brian. Except that, the original code works fine for all cases and not just dec_2_hex.

1.0.0.0