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

Sectional rivalries leading up to the Civil War centered on what 3 issues?
what is speedwriting?
Solve and simplify: 2/3 x 3/5 x 5/10 x 6/8 = A: 1/5 B: 1/2 C: 3/20 D: 1/4
How do I solve n^2-5n-14=0 by factoring
which energy transformation takes place when a firecracker explodes? A. Gravitational potential to mechanical and electromagnetic B. Nuclear to kinetic and c
What is the greatest common factor of 42, 126, and 210 ? F. 2 G. 6 H. 14 J. 21 K. 42
The area of a rectangular wall of a barn is 55 square feet. It's length is 6 feet longer than the width. Find the length and width of the wall of the barn.
describe in your own words what is a bookworm?
Why the people consuming sea food do not suffer from goiter
Which of the following statements must be true whenever n, a, b, and c are positive integers such that n < a, c > a, and b > c ? A. a < n B. b –