Computer's basic data types
Common simple data types in programming are: Boolean, integer, long, float, double, char and string. Each one of these data types will use specific amount of operating system memory in a computer. Boolean data type contains values of True or False, 1 or 0. It takes only one byte. One byte is one of the smallest amount of memory, it consist of 8 bits, representing sequence of 0s and 1s. integer data type represent whole negative and positive numbers, long data type is another data type that represents whole numbers, but the range of long data type is larger than range of integer data type. Float and double a data types that represent numbers with floating point, precision of double data type is greater than precision of float data type. Car data type will only hold a single character. String data type is a collection of characters.
Each data type represent different amount of memory that can be allocated, depending on their byte size.
I had listed here basic data types, more complex data types include arrays, dictionaries, lists. I will cover these later.
Comments
Post a Comment