The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: None
Declaration: function Bin (innum: longint; places: byte): string;

The function Bin converts the integer number innum to an ASCII string which is the binary representation of that number. The number is written with a variable number of places, which can be defined by the parameter places (1..32). Leading nulls are not suppressed.

Hint: If the value of the parameter places is less than one or greater than 32 the value is automatically restricted to these boundaries (whichever is next). If places does not suffice to display the binary representation, then the resulting string is truncated.

Example: write (Bin (22,8)); writes the number 22 using binary notation with 8 characters ('00010110');

Last Update: 2012-Oct-20