Primitive Data

2. Data Types


Answer:

Not easy to say, without knowing more.

Data Types

You would like to see the rest of the paper, or know where it came from. Without knowing the context, it is hard to say what MIX means. It could be 1009 in Roman numerals, or it could be the English word "mix" (which itself has several meanings), or it could be the last name of the old-time radio hero Tom Mix. It could be part of a label on a music CD, "MTV Dance MIX", or part of a label on a bottle, "BLOODY MARY MIX". Or maybe you are looking at it upside down and it should be "XIW". Of course, it might not be English at all. Without knowing the context, a string of letters has little meaning.

Computer memory stores arbitrary bit patterns.

As with a string of letters, the meaning of a string of bits depends on how it is used. The scheme being used for a particular string of bits is its data type.

Data Type


For example

0000000001100111

is a pattern of 16 bits that might be found somewhere in computer memory. What does it represent?

Without knowing more about how the above pattern is being used, it is impossible to say what it represents. The type short  is one of Java's data types. If the pattern is regarded as data type short, then it represents the value 103 (one hundred and three). If the pattern is regarded as data type char , then it represents the character 'g'.

Question 2:

What does the following 16 bit pattern represent?

    0000000000000000