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

i need help remembering how to add fractions.​
Travis,Jessica ,and Robin are collecting donations for the school band.Travis wants to collect 20% more than Jessica,and Robin wants to collect 35% more than Tr
a.) How would you prepare .250 L of a 0.300 M phosphate buffer at pH=3 (H3PO4: pka1 = 2.12, pka2 = 7.21, pka = 12.32) using the appropriate weak acid and conjug
The owner of a pizza-by-the-slice shop has determined the marginal cost for his company is $1.50. His daily fixed costs are $125. What is the total cost to sell
How would you use the parallelogram method of vector addition when more than two forces are added?
A tank holds 10.3 mol of an ideal gas at an absolute pressure of 519 kPa while at a temperature of 361.38°C.
Solve and check x/5 = 8
Air enters an adiabatic turbine at 800 kPa and 870 K with a velocity of 60 m/s, and leaves at 120 kPa and 520 K with a velocity of 100 m / s. The inlet area of
(c) Draw the structure of any two aminoacids which bears a heterocyclic unit as all or part of the R side chain of the aminoacid, and highlight and name the par
. Does each of these describe a physical change or a chemical change? Explain a. The moth balls gradually vaporize in a closet. Hydrofluoric acid attacks class,