Data Types: From Reality to the Computer

Common feature: values and operations.

  Type         Values                     Operations
--------------------------------------------------------------------------------------
   whole        -2billion..2billion        + - * / mod < > <= >= == =/=
                                           output input =
   decimal      e-308,e308  ~13 sig fig    + - * /     < > <= >= == =/=
                                           output input =
   logical      true,false                                       == =/=
                                           output input = AND OR NOT
   character    ASCII                                  < > <= >= == =/=
                                           output input =

More Complex Data

Common feature: data and operation descriptions. Together these make the Abstract Data Type (ADT).

Nesting and ADTs: sub-data types

Collected Examples