"Sputnik" help  
Sputnik Help
BytesToBits(<value>)

Description

The BytesToBits function converts the specified number of bytes to the equivalent number of bits.

Parameters

<value> The number of bytes to convert to bits.

Return Value

Success: Returns the equivalent number of bits.
Failure: Returns null.

Remarks

The BytesToBits function follows the standard conversion, where 1 byte is equal to 8 bits. It takes the specified number of bytes and calculates the corresponding number of bits.

Related

BitsToBytes

Example

Example of usage:

say BitsToBytes(8);
say BitsToBytes(16);
say BitsToBytes(32);
say BitsToBytes(64);

say BytesToBits(1);
say BytesToBits(2);
say BytesToBits(4);
say BytesToBits(8);

// PRINTS
// 1
// 2
// 4
// 8
// 8
// 16
// 32
// 64

 


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org