==== Data ==== Data is a subset of encoded information that holds independent meaning. - Data has meaning and is created through **abstraction**. - Data represents a system model’s state variable in the model. - The original sources of data are observations and measurements of state indicators in physical systems. ==== Data Types ==== Modern programming languages generally support the following data types: 1. **Simple Data** - **1.1 Logical Type**: true, false; 0, 1. - **1.2 Value Type** - **1.2.1 Integer**: -1234, … 0 … +1234… - **1.2.2 Real (Float, Double)**: -123.4567 … 0 … +110.9876… - **1.2.3 Complex**: (real + i imaginary) - **1.3 Symbol Type** - **1.3.1 Character**: !, @, $, … A, B, … a, b, … 0, 1, … - **1.3.2 Set**: set element 2. **Composite Data** - **2.1 Array, Vector, Matrix**: Indexed sets of homogeneous simple data. - **2.2 Structure, Record**: Structured sets of heterogeneous data. - **2.3 File**: Sets of homogeneous structures. In a computer, data representation occurs in **variables** or **constants**. The types of data must generally be defined in programming languages. The storage of data in memory is realized based on the definition. The meaning of the information stored in memory is linked to the definition of the data. Data has not only a value but also an **identifier**. - The identifier has a well-defined address in memory. - Ultimately, the **semantics** of information in computers are carried by memory addresses. A simple memory model, where memory addresses and data exist: ^ Address (Hex) ^ Data ^ | 0000 | 01 | | 0001 | 02 | | ... | ... | | 0A07 | AA | | ... | ... | | FFFF | F7 | The memory address itself can also be a variable, which has both an identifier (and value). This is called a **pointer**.