Negative numbers to binary string in JavaScript
Short answer: The toString() function takes the decimal, converts it to binary and adds a “-” sign. A zero fill right shift converts it’s operands to signed 32-bit integers in two complements format. A more detailed answer: Question 1: //If you try (-3).toString(2); //show “-11” It’s in the function .toString(). When you output a number … Read more