Hexadecimal to binary

converts a hexadecimal string of just about any length to the proper binary equivalent
3,2K téléchargements
Mise à jour 27 mai 2009

Afficher la licence

this will do the easy conversion for you without any truncating or improper values. It puts it in matrix format for easier manipulation.

hex2bin('0123456789abcdef')

ans =

Columns 1 through 18

0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1

Columns 19 through 36

0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0

Columns 37 through 54

1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1

Columns 55 through 64

0 1 1 1 1 0 1 1 1 1

Citation pour cette source

Michael Chenoweth (2024). Hexadecimal to binary (https://www.mathworks.com/matlabcentral/fileexchange/24282-hexadecimal-to-binary), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2007a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Numeric Types dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0