Select Page

### DATATYPES

In the digital world, logic is the dictating force in order for 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 datatypes.

In general, the following datatypes are applicable:

#### Decimal data

Decimal data is used in the everyday applications; it is based on a 210-number 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 on a 22-number system and consists out of 0s and 1s.

#### Octa-decimal data

Its used for more advanced sets and combinations of data transition. It is based on a 28-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 216-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.

#### 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 -215 (-32768) to 215-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 –231 (-2147483648) to 231 –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 216 –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 232 –1 (4294967295). The acronym for this datatype is UDINT.

#### Real values:

Real values refer to numbers that has negative values (-) and decimal points. It can also be a natural number, being 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 “Time span”. The input appears as Time span literal. The length of the data element is 32-bit. The value range for variables of this type stretches from 0 to 232 –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 double word is in short 32-bits.