Data Types Assignment: Bool, DINT, Real Explained in Data Science

Verified

Added on  2022/08/10

|3
|326
|23
Homework Assignment
AI Summary
This assignment delves into three fundamental data types: Bool, DINT, and Real. The Bool data type, representing Boolean values, is described as taking either True or False values (1 or 0), and its memory-saving capabilities are highlighted. DINT, or Double Integer, is explained as a 32-bit integer with a range depending on whether it's signed or unsigned. Finally, the Real data type is presented as a single-precision floating-point number used for decimal values, such as in measurements, and its storage and processing differences compared to integers are discussed. The assignment references several sources, including definitions and data type explanations, to support the information provided.
Document Page
1
Data Types
Student’s Name
Institutional Affiliation
Date
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
2
BOOL
A bool or Boolean is a data type that can take either two distinct values, True or False.
In other words, this data type can either take 1 or 0, corresponding to True and False
respectively. It is a basic data type in languages such as C and C++. Bool enables variables to
be packed together thus saving memory space. It is important to note that in many languages,
any non zero value is treated as True, not just 1.
DINT
A short form for Double Integer, is a data type that occupies two words in memory.
The range of the DINT data type depends on whether it is Signed DINT or Unsigned DINT
(+/-). Unsinged DINT has a range of 0 to 4294967295 while signed DINT has a range of -
2147483647 to 2147483647. A DINT is a 32-bit integer and has no decimal point.
Real
The real data type is used to store numerical values that contain decimal numbers. It is
used to single-precision floating-point numbers. Example application of real data type is in
measurements such as distance and temperature. Storage required for real numbers is larger
than that for integers. Processing speed is also lower while handling real data types compared
to integers. The range for REAL data type is -3.4402823e+38 to 3.402823e+38 and requires 4
bytes of storage.
Document Page
3
References
Bool - Definition. (2006, July 9). Retrieved from https://www.thoughtco.com/definition-
of-bool-958287
REAL data type. (n.d.). Retrieved from
https://dcx.sap.com/1200/en/dbreference/real.html
SpectrumControls. (2011, November 15). Defining Tag Data Types. Retrieved from
https://www.webportconnects.com/help/installing_the_webport/defining_data_tag
_types.htm
Teach-ICT AS Level ICT OCR exam board - types of data. (n.d.). Retrieved from
https://www.teach-ict.com/as_a2_ict_new/ocr/AS_G061/311_data_info_knowled
ge/types_of_data/miniweb/pg3.htm#
chevron_up_icon
1 out of 3
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]