Data Representation

30 minutes Intermediate 50 Questions
Topic Overview

4. Data Representation Number Systems (Binary, Decimal, Octal, Hexadecimal), Binary Arithmetic, Data Units (Bit, Byte, KB, MB, GB, TB), Character Encoding (ASCII, Unicode),

Complete Topic Overview

4. Data Representation


Introduction to Data Representation


Data representation refers to the method by which information, numbers, text, images, and instructions are stored and processed inside a computer system.

Computers operate using electronic circuits that can only recognize two states:

  • ON (1)
  • OFF (0)

Because of this limitation, computers use the binary number system to represent all types of data. Everything inside a computer—numbers, letters, images, and sounds—is ultimately converted into binary form before processing.

Data representation helps computers convert human-readable information into a form that machines can understand and manipulate.


Number Systems


Introduction to Number Systems


A number system is a method used to represent numbers using a specific set of digits or symbols.

Computers use different number systems for performing calculations and representing data. The most important number systems used in computing include:

  • Decimal Number System
  • Binary Number System
  • Octal Number System
  • Hexadecimal Number System

Each number system is defined by its base (or radix), which determines how many digits are used in that system.


Decimal Number System (Base 10)


The decimal number system is the number system commonly used by humans in everyday life.

It uses ten digits:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Because it contains ten digits, it is called base 10.

In this system, the value of each digit depends on its position. Each position represents a power of 10.

Example:

Decimal number 345

= 3 × 10² + 4 × 10¹ + 5 × 10⁰
= 3 × 100 + 4 × 10 + 5 × 1
= 300 + 40 + 5

Computers convert decimal numbers into binary form before processing them.


Binary Number System (Base 2)


The binary number system is the most important number system in computing because computers operate using binary signals.

Binary uses only two digits:

0 and 1

These digits represent electrical states:

  • 0 = OFF
  • 1 = ON

Since it uses two digits, it is called base 2.

Example:

Binary number 1011

= 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰
= 8 + 0 + 2 + 1
= 11 (decimal)

Binary numbers are used internally by computers to perform calculations and store data.


Octal Number System (Base 8)


The octal number system uses eight digits:

0, 1, 2, 3, 4, 5, 6, 7

Because it contains eight digits, it is called base 8.

Octal numbers are often used as a shorter representation of binary numbers because one octal digit corresponds to three binary digits.

Example:

Octal number 17

= 1 × 8¹ + 7 × 8⁰
= 8 + 7
= 15 (decimal)

Octal notation is sometimes used in programming and digital systems.


Hexadecimal Number System (Base 16)


The hexadecimal number system uses sixteen symbols to represent numbers.

These include:

0–9 and A–F

Where:

  • A = 10
  • B = 11
  • C = 12
  • D = 13
  • E = 14
  • F = 15

Because it contains sixteen symbols, it is called base 16.

Example:

Hexadecimal number 2A

= 2 × 16¹ + A × 16⁰
= 2 × 16 + 10 × 1
= 32 + 10
= 42 (decimal)

Hexadecimal numbers are widely used in:

  • Computer programming
  • Memory addressing
  • Web color codes
  • Debugging systems

Binary Arithmetic


Binary arithmetic refers to performing mathematical operations using binary numbers.

Since binary numbers contain only 0 and 1, arithmetic operations follow simple rules.

The main binary operations include:

  • Binary Addition
  • Binary Subtraction
  • Binary Multiplication
  • Binary Division

Binary Addition


Binary addition follows simple rules similar to decimal addition but uses only two digits.

Rules of binary addition:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10

In binary addition, 10 represents decimal 2, so 0 is written and 1 is carried to the next column.

Example:

  101
+ 011
-----
 1000

Binary addition is widely used in computer processors for performing calculations.


Binary Subtraction


Binary subtraction also follows simple rules.

Rules:

  • 0 − 0 = 0
  • 1 − 0 = 1
  • 1 − 1 = 0
  • 0 − 1 = Borrow from next digit

Example:

 1010
-0011
-----
 0111

Binary subtraction is used in arithmetic logic units (ALU) during computation.


Binary Multiplication


Binary multiplication follows rules similar to decimal multiplication but is simpler because only two digits are involved.

Rules:

  • 0 × 0 = 0
  • 0 × 1 = 0
  • 1 × 0 = 0
  • 1 × 1 = 1

Example:

   101
×   11
-------
   101
+ 1010
-------
  1111

Binary multiplication is used in digital processors for complex calculations.


Binary Division


Binary division is similar to decimal division but performed using binary numbers.

Example:

110 ÷ 10 = 11

Binary division is used in computer arithmetic operations and digital processing.


Data Units


Introduction to Data Units


Computers store and process data in small units of digital information.

These units are based on binary digits (bits) and are used to measure storage capacity and data size.


Bit


A bit (Binary Digit) is the smallest unit of data in a computer system.

It can have only two possible values:

0 or 1

Bits represent electrical signals inside computer circuits.


Byte


A byte is a group of 8 bits.

One byte is typically used to represent one character, such as a letter or number.

Example:

The letter A is stored as 8 bits in memory.


Kilobyte (KB)


A kilobyte represents approximately 1,024 bytes.

It is commonly used to measure small files such as text documents.


Megabyte (MB)


A megabyte represents approximately 1,024 kilobytes.

It is used to measure:

  • Images
  • Audio files
  • Small software applications

Gigabyte (GB)


A gigabyte represents approximately 1,024 megabytes.

It is commonly used to measure:

  • Hard disk storage
  • Large software programs
  • High-quality videos

Terabyte (TB)


A terabyte represents approximately 1,024 gigabytes.

Modern storage devices such as hard drives and servers may have capacities of several terabytes.


Hierarchy of Data Units


  • Bit
  • Byte = 8 Bits
  • 1 KB = 1,024 Bytes
  • 1 MB = 1,024 KB
  • 1 GB = 1,024 MB
  • 1 TB = 1,024 GB

These units are used to measure computer memory and storage capacity.


Character Encoding


Introduction to Character Encoding


Computers store text characters as binary numbers. Character encoding systems define how characters such as letters, numbers, and symbols are represented using binary codes.

These encoding systems allow computers to correctly store, process, and display text.

Two important character encoding standards are:

  • ASCII
  • Unicode

ASCII (American Standard Code for Information Interchange)


ASCII is one of the earliest character encoding standards used in computers.

It assigns a unique numeric value to each character, including letters, numbers, punctuation marks, and control characters.

ASCII uses 7 bits, allowing representation of 128 characters.

Examples:

  • A = 65
  • B = 66
  • a = 97
  • 0 = 48

ASCII was widely used in early computer systems and programming languages.

However, it is limited because it only supports English characters.


Unicode


Unicode is a modern character encoding standard designed to represent characters from all languages in the world.

Unicode supports thousands of characters, including:

  • English letters
  • Arabic characters
  • Chinese characters
  • Mathematical symbols
  • Emojis

Unicode allows computers to display text from different languages correctly.

The most widely used Unicode encoding today is UTF-8, which is used on the internet and in modern software systems.


Data representation is a fundamental concept in computer science because it defines how information is stored and processed inside digital systems. By using binary numbers, different number systems, data units, and character encoding standards, computers can efficiently represent and manipulate all types of digital information.

41
What does ASCII stand for?
Easy 1 Mark
Focus on the key words: American Standard Information Interchange.
A American Software Code for Information Input
B Automated System for Computer Information Interchange
C American Standard Code for Information Interchange
D Advanced Standard Code for Internet Integration
42
How many bits does ASCII use per character?
Medium 2 Marks
7 bits gives 2 to the power 7 = 128 possible character combinations.
A 4 bits
B 7 bits
C 8 bits
D 16 bits
43
How many characters can ASCII represent in total?
Medium 2 Marks
Calculate 2 to the power of the number of bits ASCII uses.
A 64
B 128
C 256
D 65536
44
What is the ASCII value of the uppercase letter A?
Medium 2 Marks
ASCII values for uppercase English letters begin at 65.
A 48
B 65
C 97
D 255
45
What is the main limitation of ASCII?
Medium 2 Marks
ASCII was developed in America — which language does that suggest it focuses on?
A It uses too many bits per character
B It cannot represent numbers
C It only supports English and cannot represent other language characters
D It is incompatible with modern computers
46
What is Unicode?
Easy 1 Mark
What encoding was designed to overcome ASCIIs language limitation?
A A binary arithmetic operation
B A modern encoding standard representing characters from all world languages
C A file compression algorithm
D A number system with base 16
47
What is the most widely used Unicode encoding today?
Medium 2 Marks
This is the default encoding for most websites and modern applications.
A ASCII-8
B UTF-8
C UTF-16
D Unicode-32
48
Which correctly compares ASCII and Unicode?
Hard 3 Marks
Compare the bit size and language coverage of each standard.
A ASCII supports more characters than Unicode
B ASCII uses 7 bits and 128 characters; Unicode supports thousands of characters from all languages
C Unicode only works on Windows
D Both use exactly 7 bits per character
49
What is data representation in computing?
Easy 1 Mark
Think about how a computer understands any kind of information.
A The physical design of a computer circuits
B The method by which information is stored and processed inside a computer
C The speed at which data travels through a network
D The software used to display images on screen
50
Computers can only recognise two electrical states. These are:
Easy 1 Mark
Think about a light switch — it can only be in one of two positions.
A High and Low voltage only
B ON (1) and OFF (0)
C Positive and Negative charge
D Fast and Slow signals
Question Palette
0/50 Answered
Showing 41 - 50 of 50
Instructions:
  • Click on an option to select your answer
  • Use the hint button if you need help
  • Track your progress with the question palette
  • Submit your answers to see results
Difficulty Distribution
Easy 4
Medium 5
Hard 1