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

What is the relationship between rational numbers and ratios
If 6 and x have the same mean (average) as 2,4, and 24, what is the value of x? And how?
How do you compare distances in words? ex: jack travels 2.45 miles to school. Wanda travels 2.31 miles to school. Compare the distance using words.
Can some one please help me with this ???
what is 12,430,090 in expanded form
Your dad tells you that he will pay you $6.00 an hour for the 6 seconds that you take to wash your hands before dinner. How much did you make for washing your h
a number is k units to the left of 0 on the number line. describe the location of its opposite.
Can some one please help me with this ???
out of 45 times at bat, Raul got 19 hits. Find Rauls batting average as a decimal rounded to the nearest thousandth.
Why were Native Americans who practiced agriculture more likely than hunter-gatherers to establish permanent homes?