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
Can someone help me with this right answer only and please explain it too
sineoko [7]

Answer:

g(6) = 71

f(11) = 62

Step-by-step explanation:

Let's solve g(6) first

Plug 6 into x

g(6) = 2(6)^2 - 1

g(6) = 2(36) - 1

g(6) = 72 - 1

g(6) = 71

Now let's solve f(11)

f(11) = 5(11) + 7

f(11) = 55 + 7

f(11) = 62

<em>Thus, out answers are 71 and 62 respectively</em>

5 0
3 years ago
Help<br> Me plssssssss and Thxs
Vanyuwa [196]

Answer:

1. 7/10

2.1/10

3.6/10 (Simplifly is 3/5)

4. 1/10

Step-by-step explanation:

5 0
2 years ago
What i 12% of 32? is 32the part or the whole???
Valentin [98]
32 is the whole 12.16 is 12 percent of 32
7 0
3 years ago
What is the solution to x in 3(x+2)-4x+2=3x+2(x-8)
NeTakaya

Answer:

x=4

Step-by-step explanation:

4 0
3 years ago
Read 2 more answers
Lexi has 514 cups of popcorn. How many friends can she share with if each person gets 78
s2008m [1.1K]

Answer:

approx. 6 friends brainiest rate 5 stars and thank mee : )

Step-by-step explanation:

3 0
2 years ago
Read 2 more answers
Other questions:
  • What is the volume of a sphere with a radius of 9 inches
    10·1 answer
  • A crew consists of 1 apprentice, 1 journeyman, and 1 master carpenter. The crew receives a check for $6400 for a job they just f
    5·1 answer
  • Find the slope of the line that passes through (10, 8) and (1, 9)?
    11·2 answers
  • A washer and dryer cost $869 combined. The washer cost $81 less than the dryer. What is the cost of the dryer?
    15·2 answers
  • after every eighth visit to a restaurant you receive a free beverage.after every tenth visit you receive a free appetizer. if yo
    10·1 answer
  • F(x) = 3x<br> g(x) = x2 – 5x - 9<br> Find (fºg)(x).
    8·1 answer
  • Is 18/30 and 3/5 equivalant
    11·1 answer
  • Can u guys help me please dont steal or guess ( will give brainiest for proof)
    6·1 answer
  • Identify the slope of the table​
    10·2 answers
  • Find the value of x: 3(6x - 4x) = -30<br> (Provide Step-By-Step)
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!