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
PLEASE PLEASE PLEASE HELP 2 COLUMN PROOF
Vika [28.1K]

Answer:

1. Statement: <2 and <5 are supplementary. Reason: Given

2. Reason: Vertical

3. Reason: Consecutive interior angles

4. Statement L is parallel to m. Reason: transversal makes equal angles

Have a good day!

3 0
3 years ago
How to solve 4+|7-m|=5
notka56 [123]
When
|a|=b
assume
a=b and -a=b
so

4+|7-m|=5
minus 4 from both sides
|7-m|=1
assume
7-m=1 and
-(7-m)=1

7-m=1
minus 7 both sidees
-m=-6
times -1 both sides
m=6

-(7-m)=1
distribute
-7+m=1
add 7 to both sides
m=8

m=6 and 8
4 0
3 years ago
The linear equation 99​(xminus−77​)equals=99​(xplus 88​) is
Natalija [7]
99(x-77)=99(x+88)
99x-7623=99x+8712
99x-99x=8712+7623
0=670824.no solution as x becomes 0
3 0
3 years ago
a fitness club requires a $75 Initiation fee and dues of $25 per month write an expression for the cost of the membership for n
sasho [114]
75 + (25 x n) is the answer.
3 0
3 years ago
If c=g-4f, find trinomial that represents C when F=2x^2-5 and G=5x^2+x-3
Margaret [11]

Answer:

c = -3x² + x + 17

Step-by-step explanation:

c = g - 4f

f = 2x² - 5

g = 5x² + x - 3

c = (5x² + x - 3) - 4(2x² - 5)

c = 5x² + x - 3 - 8x² + 20

c = -3x² + x + 17

5 0
2 years ago
Other questions:
  • NewPop produces their brand of soda drinks in a factory where they claim that the
    6·1 answer
  • Suppose you want to know how often people brush their teeth every day, so you take a survey. Explain why the survey results woul
    12·1 answer
  • What is the solution to the following system?​
    10·1 answer
  • What does x equal? 2x-8=2x+6+x
    15·2 answers
  • Joe is a repair technician for a computer company. Each week he has a batch of computers that needs fixed. The number of compute
    6·1 answer
  • NEED HELPPP ASAPPP !!
    13·1 answer
  • HELP ME LOL AND EXPLAIN HOW TO DO IT (if u can) LOL IM SO ST00PID
    6·2 answers
  • What number am I?
    13·1 answer
  • Calculate the rise and run to find the slope of each line
    9·2 answers
  • What is the value of 12⁰?​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!