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
The local newspaper has letters to the editor from 20 people. If this number represents 8​% of all of the​ newspaper's readers,
zlopas [31]

let the all readers be x

8%=20×100%÷x

8%x=2000%

x=2000%÷8%

x=250

3 0
3 years ago
How to find if a triangle is acute or obtuse with side lengths?
elena55 [62]
You would have to determine if<span> the following </span>lengths<span> make an </span>acute<span>, right or </span>obtuse triangle<span>. Plug in each set of </span>lengths<span> into the Pythagorean Theorem.</span>
8 0
3 years ago
Encuentra los cuatro siguientes terminos de la sucesion y el numero que los relacina 7 4 7 2 7 14
fredd [130]
you translate in English
7 0
4 years ago
A manufacturing process is designed to produce bolts with a 0.25-in. diameter. Once each day, a random sample of 36 bolts is sel
Troyanec [42]

Answer:

0.6170

Step-by-step explanation:

Given that a manufacturing process is designed to produce bolts with a 0.25-in. diameter.

i.e. no of bolts which are produced as per standard is X means then

X is normal with mean = 0.250 and std dev = 0.04

No of bolts tested = 36

If this mean falls outside the interval (0.230,0.270) the production would be shut down.

i.e. P(|x-25|>0.20) =production shut down probability

P(|x-25|>0.20)\\=P(|Z|>0.5)\\=2(0.5-0.1915)\\= 0.6170

3 0
3 years ago
What is the value of x?
Hitman42 [59]
The correct answer is √313. ( square root of 313 or 17.7)
Hope this helps.
7 0
3 years ago
Other questions:
  • A TV that usually sells for $183.26 is on sale for 25% off. If sales tax on the TV is 9%, what is the price of the TV, including
    6·1 answer
  • I NEED HELP PLEASE!!!!!
    7·1 answer
  • Given RST~ ABC find value of x.
    12·1 answer
  • What is the length of the transverse axis? (x-2)^2/36 - (y+1)^2/64=1
    5·2 answers
  • Steve, Elizabeth, and Andy decide to become partners in a janitorial service company. They need $140,000 for the franchise. They
    8·1 answer
  • How many times can you take away 12 from 324
    8·2 answers
  • Helen Sanchez's checking account had a balance of $678.22. She wrote a check to pay her gasoline charge
    14·1 answer
  • Help me out please! Anybody? I’m so confused
    6·2 answers
  • HELLO! HOW ARE THEY? I HOPE PERFECT. : D
    14·1 answer
  • What graph can be used to solve the equation 2x - 1 = x + 2?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!