Johnatron5464 Johnatron5464
  • 13-01-2021
  • Computers and Technology
contestada

Write a procedure ConvertToBinary that takes an input as a number from 0 to 16 (including 0 but not 16) and converts it to a binary number. The binary number should be returned as a list.

Respuesta :

tonb
tonb tonb
  • 13-01-2021

Answer:

function ConvertToBinary(n) {

 console.log(n.toString(2).split(''));

}

ConvertToBinary(13);

Answer Link

Otras preguntas

The Southern Christian Leadership Conference (SCLC) was created in 1957 with the PRIMARY purpose of Question 4 options: urging people to turn in suspected commu
Does the graph above represent a function?
The levels of organization within an organism are atom, molecule, __________, tissue, __________, and organ system. atomic number; element cell; organ compou
a hairstylist earns $12.95/h and works 32 hours a week. what is her gross weekly income during a week in which she receives $219 in tips? A. $195.40 B. $263.95
A solution of licl in water has xlicl = 0.0900. what is the molality?
What does the phrase, "Think like a mom, see like a kid" mean?
(4) while you were "sweating" your chemistry test, water vapor evaporates from your body, absorbing 125 kj of energy. (assume no temperature change). what mass
Which of the following is a Puritan belief that Anne Bradstreet expresses in the poem "Verses Upon the Burning of our House"? A. Personal possessions are highl
What is a correct congruence statement for the triangles shown?
A 2.0 kg brick has a sliding coefficient of friction of .38. What force must be applied to the brick for it to move at a constant velocity