Answer:
Converting the numbers provided to decimal:
128: 10000000
64: 01000000
32: 00100000
16: 00010000
1: 00000001
56: 00111000
121: 01111001
45: 00101101
132: 10000010
245: 11111001
Answer:
- public class Square {
- public static boolean isPerfectSquare(int n){
- int sqrt_n = (int) Math.sqrt(n);
- if(sqrt_n * sqrt_n == n ){
- return true;
- }else{
- return false;
- }
- }
- }
Explanation:
Firstly, use sqrt method from Math package to calculate the square root of input n (Line 3). Cast the result to integer and assign it to sqrt_n variable.
Next, square the sqrt_n and check if it is equal to input n (Line 4). If so, return true, if not, return false (Line 4-8).
I believe it’s C.) data link layer
Answer:disk caching
Explanation:
Disk caching speeds up hard drive performance
Answer: The message must be sent 9.313 approximately 9 times to get the entire data through.
Explanations: To find how many times the message must be sent on average to avoid error control in data link later.
E = 1/P
E = The average number of attempt before successful transmission.
P= Total probability of transmission without error.
STEP1 : FIND TOTAL PROBABILITY;
Since it each frame has a probability of 80% to be successful.
For each frame p = 80/100 = 0.8
For the 10 frame; total probability
P= (0.8)^10 = 0.1074
STEP2: FIND THE AVERAGE NUMBER OF OF TRIAL BEFORE A SUCCESSFUL TRANSMISSION WITHOUT ERROR;
Using equation above
E = 1/P
E= 1 ÷ 0.1074 = 9.313
Therefore they must be an average of 9.313 approximately 9 trials before a successful transmission without error.