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 two English colonies were formed from the Dutch colony of New Netherland?
Why are the poles colder than the equator?
Please help!! Which description of the term nationalism is correct? A. trust in the rule of a strong central government B. confidence in the unlimited potenti
Which of the following is true about the Palestinian Liberation Organization?
Which plant adaptation would likely be found in the taiga?
is it possible for Transnet to make economic loss in the short-run?Briefly motivate with the aid of a graph
An entrepreneur knits sweaters for sale. The entrepreneur has fixed costs of $100. When he makes 10 sweaters in one month, he must spend $15 on wool. To make el
Terrance __________ watch the movie, but only after he completes his chores. a. can b. may
An atom of sodium-23 (atomic number = 11) has a positive charge of +1. Given this information, how many electrons does it have? How many protons and neutrons do
Homologous structures are those that: serve the same function in different organisms share an evolutionary and developmental history in different organisms occu