dreammartinez2605 dreammartinez2605
  • 18-10-2019
  • Computers and Technology
contestada

What is the range of values that a short can represent?

a. 0 to 256
b. -127 to 128
c. Math.pow(-2.0,15.0) to (Math.pow(2.0,15.0) -1)
d. 0 to Math.pow(2.0,16.0)

Respuesta :

ExieFansler ExieFansler
  • 18-10-2019

Answer:

c. Math.pow(-2.0,15.0) to (Math.pow(2.0,15.0) -1).

Explanation:

short represents a 16-bit signed integer. short is used to save memory because it occupies less space than integers where integers occupy 4 bytes short occupies 2 bytes.

Since it is signed so first bit is used to represent the sign if 0 then positive and 1 then the integer is negative.We are left with 15 bits.

So the range is -2¹⁵ to 2¹⁵-1.

Hence the answer is option c.

Answer Link

Otras preguntas

Chemoreceptors in the circulatory system detect changes in circulating pCO2. If CO2 concentrations get too high, the rate of ventilation increases. Why does thi
who was more prepared to fight in the civil war
These are statistics that describe the center of a distribution: mean, median, mode. They measure central _____.
Choisissez le bon mot pour compléter la phrase. Tu vas____! Regarde ____j'ai trouvé! 1st blank rire ris rirais 2nd blank ce que quel quelle
Wheres is the South China Sea located?
Does culture influence morals?
why is the demand for labor called a derived demand​
Which diseases can result from exposure to harsh toxins in the environment? Check all the apply. 1.asthma 2.sickle-cell anemia 3.respiratory infections 4.color
The area of the window is
Solve each equation 1: 9v=1 2: 1.37w =0 3: 1 = 7/10 x 4: 12.1 = 12.1 +y 5: 3/5 + z =1