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
seropon [69]
3 years ago
14

Convert 15 from decimal to binary. Show your work.

Computers and Technology
1 answer:
weeeeeb [17]3 years ago
5 0

Answer: 1111

Explanation: As a decimal number can be decomposed in a sum of products involving powers of ten, it can be factored as a sum of products of powers of 2 in order to convert to binary.

In the example, we can write 15 as a decimal number in this way:

1* 10¹ + 5* 10⁰ = 15

Decomposing in powers of 2:

1*2³ + 1* 2² + 1*2¹ + 1.2⁰ = 1 1 1 1 = (15)₂

You might be interested in
What does the following program do? student = 1 while student <= 3: total = 0 for score in range (1,4): score = int(input("En
sukhopar [10]

Answer:

The code requests for the scores of three students for three courses offered by each student.

It calculates and print the average score for each student

Explanation:

The code written in Python programming language uses a while to get student 1-3 and a for loop to get scores for course 1-3

See attached code and output

6 0
3 years ago
Write a program that declares an array named myArray with 8 components of the type int. Initialize the array to 8 values that th
Savatey [412]

Answer:

#include <iostream>

using namespace std;

void filterEvens(int myArray[]) {

   for (int i = 0; i < 8; ++i) {

     if(myArray[i]%2==0){

         cout<<myArray[i]<<" ";

     }

  }

}

int main(){

   int myArray[8];

   for(int i =0;i<8;i++){

       cin>>myArray[i];

   }

   filterEvens(myArray);

   return 0;

}

Explanation:

The solution is provided in C++

#include <iostream>

using namespace std;

The function filerEvens is defined here

void filterEvens(int myArray[]) {

This iterates through the elements of the array

   for (int i = 0; i < 8; ++i) {

This checks if current element is an even number

     if(myArray[i]%2==0){

If yes, this prints the array element

         cout<<myArray[i]<<" ";

     }

  }

}

The main begins here

int main(){

This declares an integer array of 8 elements

   int myArray[8];

The following iteration allows input into the array

<em>    for(int i =0;i<8;i++){</em>

<em>        cin>>myArray[i];</em>

<em>    }</em>

This calls the defined function filter Evens

   filterEvens(myArray);

   return 0;

}

6 0
3 years ago
Write a program that reads a list of words. Then, the program outputs those words and their frequencies. If the input is 5 hey h
zysi [14]

Answer:

/ declare the necessary header files.

#include <iostream>

#include <string>

#include <vector>

using namespace std;

// declare the main function.

int main()

{

// declare a vector.

vector<string> words;

vector<int> counts;

// declare variables.

int size;

string str;

cin >> size;

// start the for loop.

for(int i = 0; i < size; ++i)

{

// input string.

cin >> str;

words.push_back(str);

}

// start the for loop.

for(int i = 0; i < size; ++i)

{

int count = 0;

// start the for loop.

for(int j = 0; j < words.size(); ++j)

{

// check the condition.

if(words[j] == words[i])

{

count++;

}

}

counts.push_back(count);

}

// start the for loop.

for(int i = 0; i < size; ++i)

{

// display result on console.

cout << words[i] << "\t" << counts[i] << endl;

}

return 0;

}

Explanation:

4 0
3 years ago
Critical Thinking Questions
Pani-rosa [81]

Answer:

Explanation:

1) Assassins Creed Valhalla. The developers (ubisoft?) is canadian i think. The culture of ACV is of the vikings. Some advantages would be many people could learn about viking culture but some concerns is since it may not be the developers culture some information could be wrong and many people could be misinformed

2) personally i would put them in the order of Asteroid, Pac Man, then modern warfare.

this is all i really know sorry

but i hope this helps <3

8 0
3 years ago
Read 2 more answers
Does anyone know the answer to 2 and 3
docker41 [41]
No because u ain’t put the question up here for someone to answer
6 0
3 years ago
Other questions:
  • When data are entered into a form and saved, they are placed in the underlying database as knowledge?
    10·1 answer
  • A network that is located in a small area, such as a single building is called a
    6·1 answer
  • Before becoming romantically involved with a coworker you should
    7·2 answers
  • You have just starting working at Quantum Company. As a new programmer, you have been asked to review and correct various pseudo
    14·1 answer
  • Why is it preferable to code web pages in html format?
    15·2 answers
  • Which is a benefit of getting information from a government website?
    15·2 answers
  • Write a function sample_median(n,P) that generates n random values using distribution P and returns the median of the collected
    7·1 answer
  • In which area is composing for games different from composing for movies?
    12·1 answer
  • 5.2
    8·1 answer
  • Please answer questions in complete sentences!
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!