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
Mashutka [201]
3 years ago
6

Int var1 = 0b0001; int var2 = 0b1111; int results1 = var1 & var2; int results2 = var1 | var2; int results3 = var1 ^ var2; in

t printit = results1 + results2 + results3; what are the values for results1, results2, results3 and printit after executing the code?
Mathematics
1 answer:
Afina-wow [57]3 years ago
8 0
<span>Int var1 = 0b0001;
int var2 = 0b1111;
int results1 = var1 & var2;
int results2 = var1 | var2;
int results3 = var1 ^ var2;
int printit = results1 + results2 + results3;
 
what are the values for results1, results2, results3 and printit after executing the code?
notes:
1. faster responses will be obtained if your code is presented line by line (in a file) before posting.
2. please specify language, many languages use the same syntax but could have differences in interpretation
-------------------------------------------------------------------------------

Assuming Java as the language.  C is similar.
</span><span><span>& bitwise AND &
^ </span><span>bitwise exclusive OR
</span><span>| bitwise inclusive OR

So 
results1=var1&var2=0b0001&0b1111=0b0001
results2=var1|var2=0b0001&0b1111=0b1111
results3=var1^var2=0b0001&0b1111=0b1110
printit=results1+results2+results3=0b0001+0b1111+0b1110
=0b10000+0b1110
=0b11110   

Note: by default, int has 4 signed bytes, ranging from decimal -2147483648 to +2147483647
</span></span>
You might be interested in
Which square root is NOT a whole number?
SashulF [63]

Answer:

B, \sqrt 156

Step-by-step explanation:

B \sqrt156 = 12.489996

A\sqrt144=12

C\sqrt169=13

D\sqrt196=14

3 0
3 years ago
COS Find the quotient when the polynomial expression is divided by a binomial Find the quotient ANSWER SOLUTION CHOICES X2+11x+
ryzh [129]

Answer:

x=−1 or x=−9

Step-by-step explanation:

x2+11x+10=x+1

Step 1: Subtract x+1 from both sides.

x2+11x+10−(x+1)=x+1−(x+1)

x2+10x+9=0

Step 2: Factor left side of equation.

(x+1)(x+9)=0

Step 3: Set factors equal to 0.

x+1=0 or x+9=0

x=−1 or x=−9

8 0
2 years ago
6 more than a number is at most 10.&lt;------Put as an inequality.The sum of a number and 14 is at least 18&lt;----Put as an ine
lord [1]
X+6 less than or equal to 10 
X+14 greater than or equal to 18
6 0
3 years ago
A recipe that makes 4 servings calls for Two-thirds cup of flour. How much flour is required to make 20 servings? 6 cups 3 and o
Vlad [161]

Answer:

3 1/3 cups of flour

Step-by-step explanation:

20/4 = 5

20 servings is 5 times 4 servings, so you need 5 times the amount of ingredients.

5 * 2/3 = 10/3 = 3 1/3

Answer: 3 1/3 cups of flour

6 0
3 years ago
Read 2 more answers
Please help. Thank you.
Marysya12 [62]

The answer would be 24pi inches.

You can find this by using the formula for a circumference and plugging in the value of the radius.

C = 2pi*r

C = 2pi * 12

C = 24pi

4 0
3 years ago
Other questions:
  • Samuel needs $29 to download some songs and movies on his MP3 player. His mother agrees to pay him $6 an hour for raking leaves
    5·2 answers
  • What two numbers multiply to be -375 and adds to be 10?
    15·1 answer
  • Write the standard form of the equation of each line. How do I find the slope and y-intercept with the graph for problem 6???
    11·1 answer
  • Evaluate 5p+cd when c=1/5 and d=15
    13·1 answer
  • Y=x* - 12x + 41
    6·1 answer
  • If a cell displaying #DIV/0! contains the formula =C2/D9, what must be the value of cell D9?​
    8·1 answer
  • 3) A skier traveled downhill at a rate of 12 feet per second. If he started at an elevation of 1,200 feet, what is his elevation
    8·2 answers
  • What is the value of x​
    14·1 answer
  • PLEASE HELP ME IM BEGGING
    13·2 answers
  • - Classify the quadrilateral in as many ways as possible. <br><br><br><br><br> .
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!