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
Express 10000 in Index form​
9966 [12]

Answer:

10^4

Step-by-step explanation:

10×10×10×10=10,000, which is given number.

4 0
2 years ago
b) In a exam, Biraj got 350 marks and failed by 20 marks lf the percentageof pass marks is 40%, what is the full marks​
gogolik [260]

Answer:

925 marks.

Step-by-step explanation:

AS Biraj had 20 less marks then the  40% pass mark must be 350+20 = 370.

370  is equivalent to 40%

So 100% = 100*370 / 40

= 925 marks.

6 0
3 years ago
Read 2 more answers
A store is instructed by corporate to put the markup of 43% on all items. An item costing 7$ is displayed by the manager at sell
Shalnov [3]

Answer:

Selling rice is $10.00

Step-by-step explanation:

The manager put what the markup of $3.00 was to be added onto what the item cost.

5 0
3 years ago
Quadrilateral ABCD shown below, is translated 3 units to the left to create quadrilateral A'BCD
Anton [14]
I believe b but I could be so wrong I’m sorry if I am
3 0
3 years ago
2(x + _) = 2x + 10 Using the distributive property, what number would go in the blank in order for the given statement to be cor
Damm [24]

Answer:

10

Step-by-step explanation:

2

5 0
2 years ago
Read 2 more answers
Other questions:
  • A kilogram of whole-wheat flour costs $6. What is the cost of 400 grams of the flour
    5·1 answer
  • Which of the following values would be an outlier in the following set? 1, 14, 17, 18, 19, 23
    9·2 answers
  • For Pi Day, Matt noticed that there were three pies that were left untouched. In addition, another 4 slices o pizza were uneaten
    10·1 answer
  • Pedro Pascal wants to have $15,000 in an account after five years. He found a bank that will offer him a 7.5% interest rate, com
    9·1 answer
  • Please Hurry! What is the solution to log2_(9x)-log2_3=3?
    9·2 answers
  • An empty suitcase has a mass of 2 kilograms. Draw a bar model to find its mass in grams.
    11·1 answer
  • Uhhh help me , i give brainliest
    7·1 answer
  • Evaluate.<br> 5.002 - 4.3<br> 
    7·2 answers
  • Consider the line represented by the equation 5x + 2y = 10. How is the slope of the line related to values of A, B, and C in sta
    13·1 answer
  • A ball is thrown in the air from a platform that is 96 feet above ground level with an initial vertical velocity of 32 feet per
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!