0% found this document useful (0 votes)
5 views3 pages

Lesson 3

Data representation in computer systems involves converting information into binary form (0s and 1s) for processing. Common number systems include binary, decimal, octal, and hexadecimal, each serving different purposes in data representation. ASCII and Unicode are coding systems that represent text characters, with Unicode supporting a wider range of symbols from various languages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Lesson 3

Data representation in computer systems involves converting information into binary form (0s and 1s) for processing. Common number systems include binary, decimal, octal, and hexadecimal, each serving different purposes in data representation. ASCII and Unicode are coding systems that represent text characters, with Unicode supporting a wider range of symbols from various languages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lesson 3: Data Representation Methods in Computer Systems

3.1 Introduction to Data Representation


Data representation refers to the method of representing information in a
computer system using codes and number systems. Computers handle data in
binary form, which consists of 0s and 1s. Different coding systems and number
systems are used to represent text, images, and sounds in a format the computer
can process.
Why is data representation important?
• The computer cannot understand human language directly, so it needs
data to be converted into a binary form before processing.
• Numbers, characters, and even multimedia like images and sound are all
converted into specific codes that computers can interpret.

3.2 Number Systems


A number system is a way of representing numbers using a specific set of
digits and a base value. The most commonly used number systems in computer
systems are:
• Binary (Base 2): Uses only 0 and 1. This is the foundational number
system used by computers.
• Decimal (Base 10): Uses digits from 0 to 9. This is the number system
humans commonly use.
• Octal (Base 8): Uses digits from 0 to 7.
• Hexadecimal (Base 16): Uses digits from 0 to 9 and letters A to F (where
A=10, B=11, up to F=15).
Binary Number System
The binary system uses only two digits: 0 and 1. Each binary digit (bit)
represents an “off” (0) or “on” (1) state in an electrical circuit. Binary is the
foundation of all data representation in computers.
For example:
• Binary 101 represents the decimal number 5 because:

ISURU M. SAMARANAYAKA (BSC.CYBER SECURITY) 1


o 1×22+0×21+1×20=4+0+1=51 \times 2^2 + 0 \times 2^1 + 1 \times
2^0 = 4 + 0 + 1 = 51×22+0×21+1×20=4+0+1=5
Octal Number System
The octal system uses digits from 0 to 7. Each octal digit is represented using
three binary digits.
For example:
• Octal 25 represents the binary number 010101.
Hexadecimal Number System
The hexadecimal system is widely used in programming to represent large
binary numbers in a more compact form. It uses 16 symbols: digits 0-9 and
letters A-F.
For example:
• Hexadecimal 1A3 represents the binary number 000110100011.

3.3 Converting Between Number Systems


Binary to Decimal Conversion
To convert a binary number to decimal, multiply each bit by the corresponding
power of 2 and sum the results.
Example: Convert binary 1101 to decimal:
• 1×23+1×22+0×21+1×20=8+4+0+1=131 \times 2^3 + 1 \times 2^2 + 0
\times 2^1 + 1 \times 2^0 = 8 + 4 + 0 + 1 =
131×23+1×22+0×21+1×20=8+4+0+1=13
Decimal to Binary Conversion
To convert a decimal number to binary, divide the number by 2 repeatedly and
record the remainders.
Example: Convert decimal 10 to binary:
• 10 ÷ 2 = 5 remainder 0
• 5 ÷ 2 = 2 remainder 1
• 2 ÷ 2 = 1 remainder 0
• 1 ÷ 2 = 0 remainder 1
ISURU M. SAMARANAYAKA (BSC.CYBER SECURITY) 2
• Binary representation of 10 is 1010.
Hexadecimal to Binary Conversion
Each hexadecimal digit is represented by a group of four binary digits. For
example, hexadecimal B4 translates to binary 10110100.

3.4 ASCII and Unicode


ASCII (American Standard Code for Information Interchange) is a 7-bit
code used to represent text in computers. Each character is assigned a unique
binary number. For example:
• 'A' is represented as 1000001 in binary.
Unicode is a more comprehensive system that allows for the representation of
characters from all world languages. Unicode uses up to 16 bits, making it
capable of encoding 65,536 unique characters, allowing for the representation of
complex symbols, including those from languages like Sinhala, Tamil, and
Chinese

Summary
• Computers represent data using binary numbers (0s and 1s).
• Various number systems, such as binary, decimal, octal, and hexadecimal,
are used for data representation.
• ASCII and Unicode are standard coding systems used to represent
characters.

ISURU M. SAMARANAYAKA (BSC.CYBER SECURITY) 3

You might also like