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

Which instrument has keys, pedals and strings? a. Violin b. Piano c. Guitar
Scientists can identify where earthquakes will most likely occur. a. True b. False
what do the Narragansett do every August
18. Which of the following was a criticism of laws designed to protect the environment? A. Too much regulation would attract illegal immigrants. B. Environment
Which of the following factors does NOT help determine the height, length, and period of a wave? a. wind speed b. fetch c. temperature d. how long the wind
HELP Which sentence has no errors in capitalization? A. We could barbeque polish sausages. B. No, I don't think Canadian bacon would be appropriate. C. A vir
Which one of the following types of writing would most likely be fiction? A. Informational literature B. Novel C. Essay D. Autobiography
how many times is 0.7m in 28m
Which of the following leaders was NOT a dictator during the 1930s? A. Josef Stalin B. Benito Mussolini C. Adolf Hitler D. Winston Churchill
how would you respond to a person who tells you not to believe scientific theory because theories are only possible for explanations that are not packed by evid