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
2x^5 + 4x^4 – x^3 - x^2 + 7 is divided by 2x^2 - 1.
mixer [17]

Answer: 11

Step-by-step explanation: 2x^5 + 4x^4 – x^3 - x^2 + 7= 11

2x^2 - 1= 1

2x^5 + 4x^4 – x^3 - x^2 + 7 is divided by 2x^2 - 1.=11

4 0
4 years ago
If h(x) = (f o g)(x) and h(x) = ∛7x+1, find f(x) and g(x)
Mariana [72]
There's more than one way to combine them really
but an obvious one will be

\bf \begin{array}{llll}&#10;h(x)&=&(f\circ g)(x)\\\\&#10;&&\sqrt[3]{7x+1}\\\\&#10;&&\sqrt[3]{g(x)}\leftarrow &#10;\begin{array}{llll}&#10;f(x)=\sqrt[3]{x }\\\\&#10;g(x)=7x+1&#10;\end{array}&#10;\end{array}\\\\&#10;-----------------------------\\\\&#10;(f\circ g)(x)\iff f[\quad g(x)\quad ]=\sqrt[3]{g(x)}\implies  f[\quad g(x)\quad ]=\sqrt[3]{7x+1}
7 0
3 years ago
How many thousands equal 20 hundreds
Nady [450]
<span><u><em>The correct answer is:</em></u>
2.

<u><em>Explanation</em></u><span><u><em>:</em></u>
20 hundreds =20*100=2000;
this is two thousand, so it is made of 2 thousands.</span></span>
3 0
3 years ago
This dot plot is symmetric, and the data set has no extreme values. 4 5 6 8 910 Which of these measures is the best measure of v
Shkiper50 [21]

Answer:

Step-by-step explanation:

I think it would be c

6 0
3 years ago
Read 2 more answers
PLSS HELPP!!!! I WILL BE GIVING BRAINLIEST AND POINTS!!:(
max2010maxim [7]
The answer is y=2/12
3 0
3 years ago
Other questions:
  • 3. what is the simplified form of x+4/7 - x+3/x+5
    12·1 answer
  • Y = 4x + 13<br> is this a function
    9·1 answer
  • How to do this in math
    10·1 answer
  • Finding the length of arc and and sector area? Genuinely confused and will mark for brainliest.
    15·2 answers
  • Point X is located at (3, 2). Point Y is located at (3, -8)
    5·1 answer
  • Gianna is designing a new board game, and is trying to figure out all the possible outcomes. How many different possible outcome
    8·1 answer
  • What is the slope of a line parallel to the line whose equation is 3x−2y=18. Fully reduce your answer.
    14·2 answers
  • Which of the following expressions is equivalent to 4y + z + y − 8 + 6z
    8·2 answers
  • The result of subtraction of 3x from -4x is​
    15·2 answers
  • Complete the table of values for function A
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!