Hex Calculator

버전 1.0.0.0 (1.07 KB) 작성자: Murphy O'Brien
Hex evaluation and calculator with logical and arithmetic operators
다운로드 수: 1.8K
업데이트 날짜: 2006/10/10

라이선스 없음

Evaluates the input character string as a hexadecimal expression and returns both hex and decimal outputs.
Allowed operators in precedence order are:
#(xor) &(and) |(or) ^(exponential) /(divide) *(times) -(minus) +(plus)

[OUTH,OUTD]=HEXCALC(EXPR)
evaluate the input expression and return both hex and decimal outputs.

HEXCALC(EXPR) with no output arguments prints both outputs

example:
hexcalc('F4*4-34/2*4-640*3+a#F2+3|A0')
prints out:
evaluates as FFFFF243 hex or -3517 decimal

인용 양식

Murphy O'Brien (2024). Hex Calculator (https://www.mathworks.com/matlabcentral/fileexchange/12544-hex-calculator), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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

Taking John's excellent review on board, changed precedence to more usual divide before multiply. Also changed help a little. Might get around to adding brackets some day if file proves popular.