Review: how
information is stored/represented
in computer programs
- Computer programs
store
information in
their
variables
- Principle of
information representation:
-
Information =
code +
context
|
-
Information in
a computer program are
stored in:
-
Applying the
principle of
information representation
to computer programs:
- The
value
(always stored as
a binary nunber) of a
variable is the
code
- The
data type
of the
variable is the
context
used to interpret
the value (= code)
|
- In this webpage, I will
give an overview of
the codes used inside
the computer
- We will discuss the
various codes used later
|
Overview
of the
information categories/data types
used in a computer system
Overview of
the codes used in each
data type
- Data types are
designed to
represent some
category of
information
effectively and
efficiently
- Therefore:
-
Today's computers
(always) use the following
encoding methods for
the
corresponding
data type:
|
Computer codes and
encoding/decoding methods
- Computer code:
- Encoding/decoding method:
- Encoding/decoding method = the
procedure that is
used to
construct/interpret
a computer code (= binary number)
|
- There are 2 types of
codes:
-
"Committee based"
code:
developed by an
agreement
-
Mathematical
code:
the codes are
constructed using
Math operations
|
|
Preview on the discussion on
data types
❮
❯