**DATATYPES AND DATATYPES - SETS**

**DATATYPES**

In the digital world, logic is the dictating force in order for the performance to exist. The language at which data is being put in transit is being done so via the values being stored into the relevant data types.

In general, the following data types are applicable:

**Decimal data**

Decimal data is used in the everyday applications; it is based on a 2^10 system, since there are 10 different basic numbers, from 0 to 9. These everyday applications are based upon mathematical principles and not logic.

**Binary data**

Binary data is the very foundation of logic calculations. These logic calculations are based on a very special set of mathematics, called Boolean algebra. The variables of this Boolean mathematics are called Boolean values. This mathematics is based upon logic. Binary data is based op a 2^2 number system and consists out of 0s and 1s.

**Octa-decimal data**

It is used for more advanced sets and combinations of data transition. It is based on a 2^8 number system and ranges from 0 to 7. The variables are 0,1,2,3,4,5,6,7.

**Hexa-decimal data**

Is used for more advanced data transition. It is based on a 2^16 number system and ranges from 0 to f. The variables are 0,1,2,3,4,5,6,7,8,9, a, b, c, d, e, f.

Now a summary;

**DATATYPES- SETS**

Datatype-sets refer to the combination of datatype basic values, to form larger data values.

The following datatype-sets will be used in this exercise.

**Decimal datatype sets:**

**Integers:**

Integers refer to decimal data in the mathematical world that doesn’t contain numbers with decimal points. It is the “whole number”, on the range of -2^15 (-32768) to 2^15-1 (32767). The length of the data element is **16-bit**.

The acronym for this datatype is **INT**.

**Double-Integers:**

Double-Integers refer to decimal data in the mathematical world that doesn’t contain numbers with decimal points. It is a “whole number”.

The length of the data element is **32-bit**. The range of values for variables of this data type is from –2^31 (-2147483648) to 2^31 –1 (2147483647). The acronym for this datatype is **DINT**.

**Unsigned-integers:**

Unsigned-Integers refer to decimal data in the mathematical world that doesn’t contain numbers with decimal points. It is a “whole number”.The length of the data element is 16 bit.

The value range for variables of this type stretches from 0 to 2^16 –1 (65535). The acronym for this datatype is **UINT**.

**Unsigned-double-integers:**

Unsigned double integers refer to decimal data in the mathematical world that doesn’t contain numbers with decimal points. It is a “whole number”. The length of the data element is **32-bit**.

The value range for variables of this type stretches from 0 to 2^32 –1 (4294967295). The acronym for this datatype is **UDINT**.

**Real values:**

Real values refer to numbers that have negative values (-) and decimal points. It can also be a natural number, is expressed in a real number. The length of the data element is **32-bit**.

The value range for variables of this data type reaches from 8.43E-37 to 3.36E+38. The acronym for this datatype is **REAL**.

**TIME:**

TIME stands for the data type “Timespan”. The input appears as Timespan literal. The length of the data element is **32-bit**. The value range for variables of this type stretches from 0 to 2^32 –1 (4294967295).

The unit for the data type TIME is 1ms. This unit can also be displayed in seconds (s) and minutes (M).

**Binary datatype sets:**

**Boolean bit**

**BOOL** stands for the data type “Boolean”. The length of the data elements is **1-bit** (in the memory contained in 1 byte). The range of values for variables of this type is **0** (FALSE) and **1** (TRUE), OFF and ON, Activated and De-activated.

**Boolean byte**

**BYTE** stands for the data type “Bit sequence 8”. The length of the data element is 8 bit. A byte is in short **8-bits**. Also known as a half-word.

**Boolean word**

**WORD** stands for the data type “Bit sequence 16”. The length of the data element is 16 bit. A word is in short **16-bits**.

**Boolean double word**

**DOUBLE WORD** stands for the data type “Bit sequence 32”. The length of the data element is 32 bit. A doubleword is in short **32-bits**.

**Decimal Values:**

Decimal Values are the most commonly used numbering system in a holistic sense. It is therefore necessary to understand this numbering system very clearly. It is also important to understand Adroit’s applicable agents, and how it interacts with decimal values.

The following is a simplified summary of the basic (and primitive) agents and how it interacts with decimal values:

**Numbering Formatting in Adroit**

Now that we know the numbering systems, and the different types of decimal numbers; Formatting of numbering system for display purposes on a mimic or picture is a necessity. The following is a simplified summary;