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]
4 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]4 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
Which of the following are steps to use when an equation check all that apply
Tcecarenko [31]
Jensjdnd dhdnd. Dnd dndnndb
5 0
3 years ago
1 - 10 + 40 / 2 * 48 = n<br> Define N. I give brainly
TEA [102]

Answer:

n = 744

Step-by-step explanation:

4 0
3 years ago
Read 2 more answers
The measure of rqc = (x+12) and m PCq = (2x) set up and solve an equation to find the value for x
kotegsom [21]
1753 737272727278383828881829939393837377
3 0
3 years ago
Like bought 15 boos six books each cost $7 four of the books each cost $5 the rest of the books each cost $3 how many do all the
Gekata [30.6K]

Answer:

The total combined cost of 15 books  is $77.

Step-by-step explanation:

Here, the total number of books purchased  = 15

The cost of books = $7 for 6 books

So, the cost of six books  =  6 x ( cost of 1 book) = 6 x ($7)  = $42

⇒Out of 15 books, the cost of 6 books  = $42  .... (1)

The cost of books = $5 for 4 books

So, the cost offour books  =  4 x ( cost of 1 book) = 4 x ($5)  = $20

⇒Out of 15 books, the cost of 4 books  = $20  .... (2)

Now, the left books are at cost $3 each book.

The number of left books  = 15 - ( 6+4) = 15 - 10 =  5

So, the cost of books = $3 for 5 books

So, the cost of five books  =  5 x ( cost of 1 book) = 5 x ($3)  = $15

⇒Out of 15 books, the cost of 5 books  = $15  .... (3)

Now, to get the total price of 15 books add (1) + (2) + (3), we get:

$42 + $20 + $15  = $77

Hence, the total combined cost of 15 books  is $77.

8 0
3 years ago
What conclusion can be determined from the dot plot below? A. The median of the data set is 3. B. The mean of the data set is 3.
RSB [31]

Given:

Consider the below figure attached with this question.

To find:

The conclusion that can be determined from the dot plot.

Solution:

The number of dots in the dot plot is 15. So, the number of observations is 15 and option D is correct.

The data set represented by the dot plot is:

2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6

Number of observations is 15, which is an odd number. So, the median of the data set is:

Median=\dfrac{15+1}{2}\text{th term}

Median=\dfrac{16}{2}\text{th term}

Median=8\text{th term}

Median=4

The median of the data set is 4. So, option A is incorrect.

Mean of the data set is:

Mean=\dfrac{\text{Sum of all observations}}{\text{Number of observations}}

Mean=\dfrac{2+2+3+3+3+4+4+4+4+4+5+5+5+6+6}{15}

Mean=\dfrac{60}{15}

Mean=4

The mean of the data set is 4. So, option B is incorrect.

The range of the data set is:

Range = Maximum - Minimum

Range = 6-2

Range = 4

The range of the data set is 4. So, option C is incorrect.

Therefore, the correct option is D.

3 0
3 years ago
Other questions:
  • Given that events A and B are independent with P(A)=0.24P(A)=0.24 and P(B|A)=0.85P(B∣A)=0.85, determine the value of P(B)P(B), r
    6·1 answer
  • Mark all the integers below.<br><br><br><br> 2 2/3<br><br> 1<br><br> -2<br><br> 6.78<br><br> -25
    10·2 answers
  • A man recipe for 5 dozen cookies for 4 cups of flour . How much flour is needed to make 90 cookies . ( show you work
    10·2 answers
  • Please help fast please please​
    7·2 answers
  • 28
    7·1 answer
  • Help!!!! They didn’t go over this in the study guide!!!
    13·1 answer
  • mike is filing 2 cylindrical containers with paint. the larger container has dimensions three times those of the smaller contain
    8·1 answer
  • Please explain the steps
    8·1 answer
  • 6. Complete: (ref.p.290)<br> a. 18 ft ..............d<br> b. 6.5c =.......................fl. oz
    8·1 answer
  • Please help me thank you!!!
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!