Hex Calculator

Hex evaluation and calculator with logical and arithmetic operators
1,8K descargas
Actualizado 10 oct 2006

Sin licencia

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

Citar como

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

Compatibilidad con la versión de MATLAB
Se creó con R14
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Numeric Types en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
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.