61
What is the minimum value stored by signed TINYINT?
Answer & Solution
Answer: Option
B
Solution:
This question is about understanding how MySQL stores numbers.
TINYINT is a data type in MySQL that represents small integers.
Signed means that the number can be positive or negative.
A TINYINT takes up 1 byte of storage space. Since it's signed, one bit is used for the sign, leaving 7 bits for the value.
With 7 bits, you can represent 27 = 128 different values.
Since it's signed, you have half positive and half negative values, plus zero.
So, the minimum value you can store in a signed TINYINT is -128.
Therefore, the correct answer is Option B: -128.
TINYINT is a data type in MySQL that represents small integers.
Signed means that the number can be positive or negative.
A TINYINT takes up 1 byte of storage space. Since it's signed, one bit is used for the sign, leaving 7 bits for the value.
With 7 bits, you can represent 27 = 128 different values.
Since it's signed, you have half positive and half negative values, plus zero.
So, the minimum value you can store in a signed TINYINT is -128.
Therefore, the correct answer is Option B: -128.