A primitive data type is a computer science term used to describe a piece of data that exists within a computer programming language by default. Typically, the values of these types of data cannot be changed by a computer programmer. For example, if a computer program was a brick wall, primitive data types would be a special type of brick that could not be broken down or further refined. An example of a piece of primitive data is the character “a”; this character means itself and is used to represent more complicated pieces of information by combining it with other pieces of information. While the precise primitive data types that are available in any given computer programming language vary from language to language, integers and characters are basic primitive data types available within most of them.
The “character” is one of the basic primitive data types available within most computer programming languages, and it is sometimes referred to in the shortened form “char.” This data type includes most of the single symbols that can be inputted into a computer with a single keystroke, such as the numeral symbol “5,” punctuation marks such as “.”, and the letter “b.” The term character does not only mean letter, number or punctuation mark, however. Control characters such as delete, tab, and backspace also fall under the primitive data type character.
In general, anything that is a primitive data type is also a value type, which means the data is not very picky. The data does not always have to be recorded in the same way. For instance, it does not usually matter what order the bytes describing the data are recorded in.
One area that some programming languages vary on is their treatment of strings. As a computer science term, a string is a sequence of symbols, such as characters. Some programming languages build in support for strings and treat them as a primitive data type while other languages do not have as basic support for the data type.
Integers are an area where computer hardware can affect the treatment of primitive data types. In computer science terminology, an integer represents one or more mathematical integers. Different central processing units (CPUs) have different limits on how many bytes can be used to represent an integer. At times, this is something that computer programmers keep in mind so that their programs can run on as many different types of CPUs as possible.