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
X y/x-y=1/2 solve for y
umka2103 [35]

y will equal negative 1  cause one half over 2 plus y equals negative 1


5 0
4 years ago
Calculate the state income tax owed on a $90,000<br> per year salary.<br> tax = $[?]
lakkis [162]

Answer:

$4918

Step-by-step explanation:

first income must be divided according to tax bracket

2% tax on first 3000 income= 2% of $3000=$60

3% tax on income after first 3000 but upto 5000= 5000-3000= $2000

=3% of 2000= $60

5% tax on income after second 5000 but upto 12000= 17000-5000

=12000 5% of $12000= $600

Lastly, 5.75% income over 17000=

90000-17000= $73000 so, 5.75 % of 73000= $4197.5

tax= $60+60+600+4197.5

= $4917.5

= $4918

6 0
3 years ago
Which statements are true? Check all that apply
const2013 [10]
Read the paragraph, then go back and see which of the points match up and which don’t
7 0
3 years ago
=−2x^2 +8 +3<br> write in vertex form
Oxana [17]

Answer:

y=-(x+0)^2+11

8 0
3 years ago
Y= 3/4x - 10<br><br> Please Help me ASAP
guajiro [1.7K]

Answer:

solving for x?

if so x=y+133/10

Step-by-step explanation:

7 0
3 years ago
Other questions:
  • ANSWER ASAP !! what is the solution to the system that represents this scenario , 5x+10y=70 &amp; 8x+8y=64
    13·1 answer
  • One triangle has side lenghts of 6,8,10. A similar triangle has a perimeter of 60. What are the lengths of the similar triangle?
    6·1 answer
  • -7x+3y=30 find the value of y whenx is 0
    12·2 answers
  • Thirty-two percent of the students in a management class are graduate students. A random sample of 5 students is selected. Using
    8·1 answer
  • What is the ratio of $.81 to $1 and $2.63 to $1?
    14·2 answers
  • What is 14/49 in its simplest form???
    5·2 answers
  • The length of a rectangle is 3 cent. less than four times it’s width. it’s area is 10 sq cent.
    12·1 answer
  • Work out the value of x.
    10·1 answer
  • Convert 5 ounces into kilograms. Round your answer to the nearest hundredth.
    11·2 answers
  • I need this due by tonight what is 45+x=75
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!