A simple but powerful libraire to convert decimals to binary and binary to decimal
Usage
Require the module
var doubleConversion = ;
uint8 to Array Binary
doubleConversion; // [0,0,0,0,0,1,0,1]
uint8 to String Binary
doubleConversion; // "00000101"
Array Binary to uint8
doubleConversion; // 5
String Binary to uint8
doubleConversion; // 5
uint8, uint16, uint32, float32, float64
In above exemples, you can see how tu use uint8. But other type of number works in the same way!
doubleConversion;doubleConversion;doubleConversion;doubleConversion;doubleConversion; doubleConversion;doubleConversion;doubleConversion;doubleConversion;doubleConversion; doubleConversion;doubleConversion;doubleConversion;doubleConversion;doubleConversion; doubleConversion;doubleConversion;doubleConversion;doubleConversion;doubleConversion;
What is differences between uint8, uint16, uint32, float32 and float64 ?
http://my.math.wsu.edu/help/matlab/uint8.html
https://en.wikipedia.org/wiki/IEEE_754-1985
Installation
You will can install Double Conversion Decimal Binary with npm:
npm install double-conversion-decimal-binary --save
Contribute
Double Conversion Decimal Binary is an Open Source project that started in Lyon, French. Anybody in the world is welcome to contribute to the development of the project.
If you want to contribute feel free to send PR's, just make sure to run the gulp test task before submiting it. This way you'll run all the test specs .
<3