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
help please?? cant solve
PilotLPTM [1.2K]
Y=-2/5-1 i hope this helps!
8 0
2 years ago
Read 2 more answers
How can you find the median when the number is not in the middle
lara [203]
You add the two numbers and whatever you get you then divide it by 2
8 0
2 years ago
Can someone help me PLS :)
Elodia [21]

Answer:

C

Step-by-step explanation:

The graph in this case represents exponential decline.

8 0
3 years ago
A box is supposed to have 150 folders in it. Clare counts only 147 folders in
VikaD [51]

Answer:

it's a 0.02% error.

147/150= 0.98% of the folders are there, making the error 0.02%

Step-by-step explanation:

5 0
2 years ago
Describe two methods that can be used to find the area of the composite figure.
vekshin1

You can draw a line to make a square and a rectangle to help find the area. The other method would be to form 2 squares and 1 rectangle.

This is probably wrong but I hope it helps!

4 0
2 years ago
Read 2 more answers
Other questions:
  • Need Help asap! plz answer thx
    14·1 answer
  • (3.2x10^4)(1.4x10^2)
    11·2 answers
  • Solve equation -5(5b+7)=7b+29
    13·1 answer
  • Create medical term from the definition below. The word root has been provided for you. Stone in the bladder (Bladder: cyst/o)
    14·1 answer
  • 4. The net of a square pyramid is shown
    6·1 answer
  • Arabellah earned $20 for babysitting her younger sibling, spent $4 on ice cream, and received a $5 allowance. Which expression r
    14·1 answer
  • Can someone help me :(
    6·2 answers
  • What is the difference between 0.05 and 0.5
    13·1 answer
  • Can someone plzzz help ASAP
    9·1 answer
  • Is the expected wait time for 240 people less than, greater than, or equal to 40 minutes? How do you know?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!