Professional Documents
Culture Documents
• Data
• Data can be defined as facts, figures or statistics
used for reference.
• Data is a raw materials for data processing.
• Data refers unprocessed information.
• It can be numbers, figures, symbols, images etc.
Data Representation
• Data representation is defined as the methods
used to represent information in computers.
• Different types of data can be stored in
computer system.
• This includes numeric data, texts, executable
files, images, audios, videos etc.
• All types of data stored in the computer are
represented by as a sequence of zeros and
ones.
Binary System
• A binary system is a number system that has just
two unique digits, o and 1 called bits.
• A bit ( short for binary digit) is the smallest unit
of data the computer can process.
Data Types
• A data type is a classification of the type of data
that a variable or object can hold in computer
programming.
• Data types are an important factor in all
computer programming languages , including C+
+, JavaScript, Visual Basic
Examples of data types
• Integers(e.g. 2345,-234,0,78. -9)
• Real number;
• String;( bacd)
• Boolean (True or False)
• Character; ( b)
• Data( 01/12/2003)
• Double (1.797693E08)
• Floating –point number (2.345)
• Long (23456789)
Data Types
Text data is used for data that is made up of
letters only.
For example, password using the word
“STRONG” would be regarded as text.
Alphanumeric data is used for data that is
made up of letter and numbers.
For example, a password of
“STRONG3456”
Data Types
• Real number is any positive or negative number.
• This includes all integers and all rational and
irrational numbers.
• Rational numbers may be expressed by as a
fraction as
• Irrational numbers may be expressed as an
infinite decimal representation ( 2.14159)
• Real numbers are important in computing
because computers calculations involve integers
and floating –point calculations.
Data Types
• A string is any finite sequence of
characters.
• An important characteristic of each
string is its length, which is the
number of characters in it.
• Empty string is a string containing no
character and thus having a length of
zero.
Data Types
• Character is a single visual object used to
represent text, numbers , symbols.
• For example, the letter “B” is a single
character .
• With a computer , one character is equal to
one byte.
• It is sometimes abbreviated as char.
• Characters could be numbers, texts, symbols,
space etc.
Representing data
• All data within a computer are transmitted as
series of electrical signals that are either on or
off.
• For a computer to be able to process any kind
of data , including text, images and sound, it
must be converted into binary form.
Representing Text
• When any key on a keyboard is pressed, it
needs to be converted into binary number
so that it can be processed by the
computer.
• A code where each number represents a
character can be used to convert text into
binary .
• The ASCII code takes each character on
keyboard and assigns it a binary number.
Units of Data Storage
• Bits
• A bit is the smallest unit of measurement used
to quantify computer data.
• It contains a single binary value of 0 or 1
• Bits are often grouped together in 8-bits
cluster called bytes.
• It is the basic unit of data or information in a
digital computers.
Units of Data Storage
• Byte:
• Byte is a group of 8 bits used to represent a
character.
• A byte is considered the basic unit of
measuring memory size in a computer.
• A byte can store or 256 different values.
Units of Data Storage
Binary 1 0 1 1 0 1
digits
Conversion from Binary to Decimal
• Convert 1011012 to base ten (decimal)
number.