From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Converting Decimal Numbers to Hexadecimal Numbers

Code and Documents

Attachment

You can use LabVIEW to convert integers from one base to another, but not to convert floating-point numbers. This example shows how to convert a decimal to an equivalent value in hexadecimal, represented as a string. For example, this example would convert 10.75 (decimal) to A.C (hex).

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors