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]
4 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]4 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
What is n x 2 squared= 14
zepelin [54]

Answer:

n=3.5

Step-by-step explanation:

2²=4

14÷4=3.5

3.5×4=14

3.5×2²=14

7 0
3 years ago
For 33 hrs of work you are paid 252.45 how much would you receive for 36 hours
poizon [28]
For 33 Hours, It is = $252.45

Now, for 1 Hour, It is 252.45 / 33 = 7.65

Now, For 36 hours, It would be: 7.65 * 36 = 275.4

In short, Your Answer would be: $275.4

Hope this helps!
3 0
4 years ago
Find the value of the expression. pm + 4 for m = 4 and p = 4
Svetlanka [38]
Pm+4=4(4)+4=20

The value is 20.

Hope this helps
7 0
3 years ago
Read 2 more answers
The median of 10,31,36,36,38,42,47,48,49,52
olga2289 [7]
So,

To find the median, arrange all the numbers from least to greatest.

10, 31, 36, 36, 38, 42, 47, 48, 49, 52

The middle two numbers are 38 and 42.  Take their average.
40

40 is the median of 10, 31, 36, 36, 38, 42, 47, 48, 49, and 52.
7 0
4 years ago
Which operation is NOT closed for polynomials?
dem82 [27]
I believe it’s A!!!!!!!!!!!!!!
4 0
3 years ago
Other questions:
  • 2(7x-1)1/2-4=0 help plz
    15·1 answer
  • 91284 the nearest ten thousand
    7·2 answers
  • 25 is 32% of what number? Round to the nearest tenth if necessary.
    15·2 answers
  • Ms. Daffy tells you that the longest side of her right-triangular garden is 26m and one of the sides is 14m. A. She asks you to
    15·1 answer
  • Tapiwa raked 5% more leaves than Adam raked. Together, they raked 697 liters of leaves. How many liters of leaves did Adam rake?
    9·1 answer
  • You spin the spinner shown below once. Each sector shown has an equal area.
    8·1 answer
  • What's the equation of the parabola that has its vertex at (8,–14) and a point (5,13) that lies on the curve?
    15·1 answer
  • Solve the equation.<br> 3ln(2-x)=1<br> NEED ASAP<br> thank you!
    10·1 answer
  • The Volume of this triangular pyramid is 11140 cubic meters what is the value of u? Please help!!!
    8·1 answer
  • Lisa reads 45 pages in 8 minutes. How many minutes will it take her to read 36 pages. Use a proportion or unit rate to solve.​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!