Lesson 01 - Data Representation
Lesson 01 - Data Representation
Computer Programming 1
Number System
• Binary Numbers
These are base 2 numbers represented
by 0 and 1.
Computer Programming 1
Number System
• Hexadecimal Numbers
These are base 16 numbers represented
by 0 to 9 and the letters A to F.
• Octal Numbers
These are base 8 numbers represented
by 0 to 7.
Computer Programming 1
Auxiliary Units
and Power
Representation
Computer Programming 1
Number System
Computer Programming 1
Radix
Conversion
Computer Programming 1
Number System
• Binary to Decimal
• Decimal to Binary
• Binary to Hexadecimal
• Hexadecimal to Binary
• Binary to Octal
• Octal to Binary
Computer Programming 1
Operations on
Binary Numbers
Computer Programming 1
Number System
Computer Programming 1
Number System
Computer Programming 1
Numeric
Representation
Format
Computer Programming 1
Numeric Representation Format
Numeric Data
• Decimal Numbers
– Binary-Coded Decimal (BCD) Code
– Unpacked Decimal Format
– Packed Decimal Format
• Binary Numbers
– Negative Integers
• Absolute Value Representation
• Complement Representation
– Fixed Point
– Floating Point
Character Data
Computer Programming 1
Numeric Representation Format
Computer Programming 1
Numeric Representation Format
Computer Programming 1
Numeric Representation Format
Computer Programming 1
Numeric Representation Format
• Negative Integers
– Absolute Value Representation
Here, the first bit represents the sign,
and the seven other bits represent the
numeric value. The range of numeric values
that can be represented in decimal digits is
from -127 to 127.
Computer Programming 1
Numeric Representation Format
• Negative Integers
– Complement Representation
The complement is the number that
indicates the quantity by which a numeric
value falls short of a specific numeric value.
Computer Programming 1
Numeric Representation Format
• Fixed Point
The fixed point is a data representation
format used mainly when integer type data is
processed, therefore, it is also called integer
type. The range of representable values is
-215 to (215-1) = -32,768 to 32,767.
Computer Programming 1
Numeric Representation Format
• Floating Point
The floating point format is used to
represent real number data type.
Computer Programming 1