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.

1
Why do computers use the binary number system?
Easy 1 Mark
What are the only two states a computer circuit can be in?
A Because binary is easier for humans to understand
B Because computers can only recognise two electrical states ON and OFF
C Because binary numbers are always larger than decimal
D Because binary requires less electricity
2
Everything inside a computer is ultimately stored as:
Easy 1 Mark
What is the most basic language all computers understand?
A Decimal numbers
B Hexadecimal codes
C Binary form (0s and 1s)
D ASCII text only
3
What is a number system?
Easy 1 Mark
Think about how different systems use different sets of symbols to count.
A A method to represent numbers using a specific set of digits or symbols
B A type of computer memory
C A programming language
D A unit of data storage
4
What determines the number of digits used in a number system?
Easy 1 Mark
Base 2 uses 2 digits base 10 uses 10 — what property defines this?
A The speed of the computer
B The base or radix of the number system
C The memory size of the computer
D The operating system installed
5
Which four number systems are most important in computing?
Medium 2 Marks
Focus on the actual number systems used by computers not encoding standards.
A Decimal Roman Octal Binary
B Decimal Binary Octal Hexadecimal
C Binary Hexadecimal ASCII Unicode
D Decimal Binary Octal ASCII
6
What is the base of the decimal number system?
Easy 1 Mark
Count how many different digits decimal uses.
A Base 2
B Base 8
C Base 10
D Base 16
7
Which digits are used in the decimal number system?
Easy 1 Mark
This is the everyday counting system humans use.
A 0 and 1 only
B 0 to 7
C 0 to 9
D 0 to 15
8
In decimal number 345 what is the positional value of the digit 3?
Medium 2 Marks
Each position in decimal represents a power of 10.
A 3
B 30
C 300
D 3000
9
What is the base of the binary number system?
Easy 1 Mark
Binary means two — how many digits does it use?
A Base 2
B Base 8
C Base 10
D Base 16
10
What does binary digit 1 represent electrically?
Easy 1 Mark
Think of a light switch — 1 means the circuit is on.
A OFF state
B Neutral state
C ON state
D Unknown state
11
What is the decimal equivalent of binary 1011?
Medium 2 Marks
Multiply each bit by its corresponding power of 2 from right to left.
A 9
B 10
C 11
D 13
12
What is the decimal value of binary 1101?
Hard 3 Marks
Work through each bit position using powers of 2 starting from the rightmost bit.
A 11
B 12
C 13
D 14
13
What is the decimal value of binary 1111?
Hard 3 Marks
All four bits are 1 — add up all four powers of 2.
A 13
B 14
C 15
D 16
14
What is the base of the octal number system?
Easy 1 Mark
Octal comes from the Latin word for eight.
A Base 2
B Base 8
C Base 10
D Base 16
15
Which digits are used in the octal number system?
Easy 1 Mark
The base tells you the highest digit allowed — base 8 goes up to 7.
A 0 and 1 only
B 0 to 7
C 0 to 9
D 0 to 15
16
Why are octal numbers useful in computing?
Medium 2 Marks
Why would a shorter representation of binary be useful?
A They are easier for humans to read than decimal
B One octal digit corresponds to exactly three binary digits providing compact notation
C They are used to represent colours in web design
D They are the native language of all modern processors
17
What is the decimal equivalent of octal 17?
Medium 2 Marks
Multiply each octal digit by its corresponding power of 8.
A 13
B 14
C 15
D 17
18
What is the base of the hexadecimal number system?
Easy 1 Mark
Hex = 6 deci = 10 — add them to get the base.
A Base 2
B Base 8
C Base 10
D Base 16
19
Which symbols does hexadecimal use?
Medium 2 Marks
After digit 9 hexadecimal continues with letters.
A 0-9 only
B 0-7 and A-F
C 0-9 and A-F
D 0-9 and a-z
20
What is the decimal value of hexadecimal digit F?
Easy 1 Mark
Start from A=10 and count up to find the value of F.
A 6
B 14
C 15
D 16
Question Palette
0/50 Answered
Showing 1 - 20 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 12
Medium 6
Hard 2