go to previous page   go to home page   go to next page hear noise highlighting

Answer:

No — certainly this was not a common use for computers then.


Primitive Data Types

byte short int long float double char boolean

But some 1960's computers did compute with audio data. The programmers invented a way to represent audio with bit patterns and then wrote programs that were consistent with that scheme.

Recall the fourth advantage of binary (from chapter 2): Anything that can be represented with some sort of pattern can be represented with patterns of bits. Music can certainly be represented with patterns of symbols, and so can be represented with patterns of bits. (This is obvious now, but was not quite so obvious in 1960.)

It would be awkward if every time you used data you had to invent your own scheme to represent it with bits. There are types of data that are so fundamental that ways to represent them are built into Java. These are the primitive data types. The eight primitive data types are: byte, short, int, long, float, double, char, and boolean.

Upper and lower case characters are important in these names. So "byte" is the name of a primitive data type, but "BYTE" is not. Computer languages where case is important are called case sensitive. Some languages are not case sensitive, especially old languages that were designed when data entry equipment did not have lower case characters.

In the phrase primitive data type the word primitive means "a fundamental component that is used to create other, larger parts." This word is used frequently in computer science. To solve a large problem, you look for the primitive operations that are needed, then use them to build the solution.


QUESTION 4:

(Trick Question: ) Is Int a primitive data type?


go to previous page   go to home page   go to next page