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
Natali5045456 [20]
2 years ago
5

1. Give the binary equivalents for the numbers 15, 24, 102?

Computers and Technology
1 answer:
castortr0y [4]2 years ago
6 0

Answer:1111,15<11000,24>1100110,102

Explanation:

You might be interested in
printArray is a function that has two parameters. The first parameter is an array of element type int and the second is an int,
Illusion [34]

Answer:

printArray(inventory, n);

Explanation:

The question doesn't specify in which language this has to be done, here's a generic call then... so if it's aimed at a specific language, some minor adjustments might be needed to respect the proper syntax/structure of that specific language.

Given:

printArray: function name, using 2 parameters.

inventory: array of ints

n : integer, number of items in array inventory

The call to the function would be:

printArray(inventory, n);

7 0
3 years ago
Think about a career you would like to have 10 years from now.
WITCHER [35]

Answer: Scientist

Explanation: Scientists use technology to record data, as well as using technology to study different things, for example scientists use computers to track DNA.

6 0
2 years ago
Suppose you have two arrays of ints, arr1 and arr2, each containing ints that are sorted in ascending order. Write a static meth
telo118 [61]
Since both arrays are already sorted, that means that the first int of one of the arrays will be smaller than all the ints that come after it in the same array. We also know that if the first int of arr1 is smaller than the first int of arr2, then by the same logic, the first int of arr1 is smaller than all the ints in arr2 since arr2 is also sorted.

public static int[] merge(int[] arr1, int[] arr2) {
int i = 0; //current index of arr1
int j = 0; //current index of arr2
int[] result = new int[arr1.length+arr2.length]
while(i < arr1.length && j < arr2.length) {
result[i+j] = Math.min(arr1[i], arr2[j]);
if(arr1[i] < arr2[j]) {
i++;
} else {
j++;
}
}
boolean isArr1 = i+1 < arr1.length;
for(int index = isArr1 ? i : j; index < isArr1 ? arr1.length : arr2.length; index++) {
result[i+j+index] = isArr1 ? arr1[index] : arr2[index]
}
return result;
}


So this implementation is kind of confusing, but it's the first way I thought to do it so I ran with it. There is probably an easier way, but that's the beauty of programming.

A quick explanation:

We first loop through the arrays comparing the first elements of each array, adding whichever is the smallest to the result array. Each time we do so, we increment the index value (i or j) for the array that had the smaller number. Now the next time we are comparing the NEXT element in that array to the PREVIOUS element of the other array. We do this until we reach the end of either arr1 or arr2 so that we don't get an out of bounds exception.

The second step in our method is to tack on the remaining integers to the resulting array. We need to do this because when we reach the end of one array, there will still be at least one more integer in the other array. The boolean isArr1 is telling us whether arr1 is the array with leftovers. If so, we loop through the remaining indices of arr1 and add them to the result. Otherwise, we do the same for arr2. All of this is done using ternary operations to determine which array to use, but if we wanted to we could split the code into two for loops using an if statement.


4 0
3 years ago
How can you different between standard and protocol?
Verizon [17]
A standard is something that is always at a certain time of the day and is scheduled the same. A protocol takes priority of anything and everything else you work on.
6 0
3 years ago
Write a note on secondary storage​
slega [8]

Answer:  Storage devices are non-volatile devices. That means that when the power is removed from them, for example, when you switch your computer off, they retain their contents (unlike RAM, which is volatile – it loses its contents). You can then retrieve the contents next time you switch your computer on. Storage devices can be used to hold operating systems, applications and files, amongst other types of software. They are simply big suitcases – used only for storage. We have already seen that when you want to use an application kept on a storage device, it has to be moved to RAM before you can start using it. This applies to the operating system, your files and any other category of software. For this reason, RAM is sometimes known as Primary Memory whereas storage devices are often referred to as Secondary Storage devices.

8 0
3 years ago
Other questions:
  • _ effects determine how slide elements disappear
    11·1 answer
  • Write the execution steps if the input is a lion.
    11·1 answer
  • Brainly wont show me the "I'm Done" button after an interactive ad, and I cant figure out why. I've watched the entire ad, click
    11·2 answers
  • True or false? Colons are required when entering the MAC address into the Reservation window?
    14·1 answer
  • 1. Which one of the following is true about screening interviews?
    7·1 answer
  • How to convert binary to decimal <br> Please it’s so hard and what is digital and analogue
    9·1 answer
  • Which tab do you open to access the Comments feature?
    11·1 answer
  • • Use variable to create the number 0 at location 0, 400.
    11·1 answer
  • If a computer uses 500 characters, how many bits this system requires to give different code to all characters?
    15·1 answer
  • Jazmine just finished setting up an operating system that's designed to work between a VM guest OS and computer hardware. What i
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!