1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sladkaya [172]
3 years ago
7

Algorithm for converting decimal into binary.

Computers and Technology
1 answer:
belka [17]3 years ago
7 0
The simplest way is to make for loop first you need to<span> generate 1,2,4,8,16,32,64,128,256....and others number in Array. Then you will check every number. Like this.</span>
<span>Decimal </span>Input 84;
64 is closest to 84.
84-64=20
<span>Write: </span>1
20-32=-12(Because It's negative you will write 0)
Write:10
20-16=4
<span>Write: </span>101
4-8=-4 (Negative)
Write:1010
4-4=0
<span>Write: </span>10101
0-2=-2
0-1=-1
<span>Write: </span><span>1010100 = 84</span>
You might be interested in
Explain the correct ways of using keyboard. .​
Naily [24]

Answer:

https://www.digitalunite.com/technology-guides/computer-basics/using-computer/how-use-computer-keyboard

Explanation:

the link at the top should explain it all! :)

7 0
2 years ago
Consider the following code:
ycow [4]

Answer:

The num >= 0 test condition is not correct

Explanation:

The line would lead to the printing of "Your entered: " + str(num) repeatedly without stopping.

The while loop checks the condition that the "num" variable is less than zero. This condition will always be true as there is no means of resetting the value after initially inputting the value that is less than zero.

4 0
3 years ago
If I want to add a new slide to my presentation, which option would I click on?
ivanzaharov [21]
The answer would be D. New Slide
3 0
2 years ago
Write a setInterval() function that increases the count by 1 and displays the new count in counterElement every 300 milliseconds
Alina [70]

Answer:

  1. var count = 0;
  2. var counterElement = document.getElementById("counter");
  3. counterElement.innerHTML = count;
  4. var a = setInterval(
  5.    function(){  
  6.        count++;
  7.        counterElement.innerHTML = count;
  8.        if(count == 5){
  9.            clearInterval(a);
  10.        }
  11.    }
  12.        , 300);

Explanation:

The solution code is given from Line 6 - 15.  

setInterval function is a function that will repeatedly call its inner function for an interval of time. This function will take two input, an inner function and the interval time in milliseconds.  

In this case, we define an inner function that will increment count by one (Line 8) and then display it to html page (Line 9). This inner function will repeatedly be called for 300 milliseconds. When the count reaches 5, use clearInterval to stop the innerFunction from running (Line 11 - 13).  

8 0
3 years ago
Write a program to calculate the area of a triangle whose base is 10cm and height is 6cm
Tcecarenko [31]

Answer:

30cm

Explanation:

Height X Base

6cm X 10cm

60cm

Then take half because a triangle is half a square and we are using a square formula.

60cm divided by 2

=30cm

7 0
3 years ago
Other questions:
  • Schools are businesses that need to install software on a large number of computers can usually obtain a ______
    13·1 answer
  • There was an airplane crash, every single person on board died, but yet two people survived. How is this possible?
    5·2 answers
  • Can y’all help me with these questions ?
    5·1 answer
  • Write a function similar to keep_ints like before, but now it takes in a number n and returns a function that has one parameter
    8·1 answer
  • What should be used to clean LCD monitors? Liquid window cleaner Ammonia wipes Windshield washer liquid Antistatic monitor wipes
    15·1 answer
  • The continue statement _________.
    11·1 answer
  • Cuáles eran las condiciones de vida de las mujeres durante el renacimiento perduran​
    14·1 answer
  • Kyle returns to work the next day and he would like to continue working on the document from yesterday. What should Kyle do?
    7·1 answer
  • 2. Explain the difference between a JMP instruction and CALL instruction
    6·1 answer
  • Leslie works in an SDLC team. When Leslie edits a file, it gets saved as an altered version. Later all the altered versions are
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!