Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bytes[byteIndex] |= (byte)(1 << (7-bitIndex));
- function binarytodecimal(input,l)
- {
- var i=0;
- var dec=0;
- while (i<l)
- {
- var temp1 = parseInt(input.charAt(l-1-i));
- dec = dec + temp1*Math.pow(2,i);
- i++;
- }
- dec = dec+'';
- return dec;
- }
Add Comment
Please, Sign In to add comment