Integer.ToBinary

From Xojo Documentation

Method

Integer.ToBinary(Optional minimumDigits As Integer) As Text

Supported for all project types and targets.

Converts the integer value to a Text containing its binary representation.

Sample Code

Convert an Integer value to the binary text value:

Var i As Integer = 8
Var binary As Text = i.ToBinary(4) // binary = "1000"