UNPKG

doubly-linked-list-typed

Version:
15 lines (14 loc) 1.01 kB
/** * The function `toBinaryString` converts a number to a binary string representation with a specified * number of digits. * @param {number} num - The `num` parameter in the `toBinaryString` function represents the number * that you want to convert to a binary string. * @param [digit=32] - The `digit` parameter in the `toBinaryString` function represents the number of * digits the binary string should have. By default, it is set to 32, meaning that the binary string * will be padded with zeros at the beginning to ensure it is 32 bits long. You can provide a * @returns The function `toBinaryString` takes a number as input and converts it to a binary string * representation with a specified number of digits (default is 32). The binary string is padded with * zeros at the beginning to ensure it has the specified number of digits. The function returns the * binary string representation of the input number. */ export declare function toBinaryString(num: number, digit?: number): string;