Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  


Decodes a number from it's binary representation.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Math 6.4 Yes Yes Yes Yes Yes
MBS( "Math.DecodeNumber"; NumberType; Bits; Text { ; BigEndian } )   More


Parameter Description Example value
NumberType Which type of number to encode.
Can be "Float", "Integer" or "UnsignedInteger".
Bits The number of bits.
Can be 32 or 64 for float.
Can be 8, 16, 24, 32 or 64 for integers.
Text The hex encoded binary data. "14EF"
BigEndian Optional
Pass 1 to encode big endian.
Default is 0 for little endian.


Returns number or error.


Decodes a number from it's binary representation.
This may be useful for binary protocols with serial ports or sockets.


Decodes a 32-bit floating point number:

MBS( "Math.DecodeNumber"; "Float"; 32; "79E9F642" )

Decode a 8-bit integer number:

MBS( "Math.DecodeNumber"; "Integer"; 8; "C8")

Decode a 64-bit unsigned integer:

MBS( "Math.DecodeNumber"; "UnsignedInteger"; 64; "C0BA8A3CD5620400")

Decode big endian 64-bit:

MBS( "Math.DecodeNumber"; "Integer"; 64; "0000000000000001"; 1)

See also

Blog Entries

Created 14th July 2016, last changed 1st August 2016

Math.DecToHex   -   Math.EncodeNumber

Feedback: Report problem or ask question.

MBS Xojo Chart Plugins