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

Description

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

Parameters

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

Return Value

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

Remarks

The BitsToBytes function performs the reverse conversion of BytesToBits. It takes the specified number of bits and returns the corresponding number of bytes. The conversion is based on the standard conversion rate, where 1 byte is equal to 8 bits.

Related

BytesToBits

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