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.

21
What is the decimal equivalent of hexadecimal 2A?
Hard 3 Marks
Remember A=10 then multiply each digit by its power of 16.
A 22
B 32
C 40
D 42
22
What is the decimal value of hexadecimal digit B?
Medium 2 Marks
Count from A=10 upward to find B.
A 10
B 11
C 12
D 13
23
Which of these is NOT a use of hexadecimal?
Medium 2 Marks
Think about where hex notation actually appears in computing contexts.
A Computer programming
B Memory addressing
C Web colour codes
D Measuring file sizes in bytes
24
What is the result of binary addition 1 + 1?
Easy 1 Mark
Think of it like decimal 9+1 — write 0 and carry 1.
A 1
B 2
C 10
D 11
25
What is the result of binary addition 0 + 1?
Easy 1 Mark
Binary 0+1 follows the same rule as decimal 0+1.
A 0
B 1
C 10
D 11
26
What is the result of binary addition 101 + 011?
Medium 2 Marks
Apply binary addition rules column by column from right to left.
A 110
B 111
C 1000
D 1001
27
Binary addition is used in computer processors for:
Easy 1 Mark
Which component of the CPU handles all arithmetic operations?
A Storing files on a hard disk
B Displaying colours on screen
C Performing arithmetic calculations
D Sending data over a network
28
What is the result of 1 - 1 in binary subtraction?
Easy 1 Mark
Same as decimal — any number minus itself equals zero.
A 1
B 0
C 10
D 11
29
In binary subtraction what happens when you compute 0 - 1?
Medium 2 Marks
What do you do in decimal subtraction when a column digit is too small?
A Result is 0
B Result is -1
C You borrow from the next higher digit
D The operation is undefined
30
What is 1010 - 0011 in binary?
Hard 3 Marks
Convert to decimal: 10-3=7 then convert 7 back to binary to verify.
A 0110
B 0111
C 1000
D 1001
31
Binary subtraction is used in which component of the CPU?
Medium 2 Marks
Which part of the CPU performs all arithmetic and logic operations?
A Monitor control unit
B Hard disk controller
C Arithmetic Logic Unit (ALU)
D Network interface card
32
What is the result of 1 × 1 in binary multiplication?
Easy 1 Mark
Binary multiplication rules are simpler than decimal — only four rules exist.
A 0
B 1
C 10
D 11
33
What is 1 × 0 in binary multiplication?
Easy 1 Mark
Multiplying by zero always gives zero in any number system.
A 1
B 0
C 10
D Undefined
34
What is 110 ÷ 10 in binary?
Hard 3 Marks
Convert to decimal divide then convert back to binary to verify.
A 10
B 11
C 100
D 111
35
What is a bit?
Easy 1 Mark
Bit stands for Binary digIT — the smallest possible piece of data.
A A group of 8 bytes
B The smallest unit of data with value 0 or 1
C A unit equal to 1024 bytes
D A type of storage device
36
How many bits make one byte?
Easy 1 Mark
This is one of the most fundamental facts in computing.
A 4 bits
B 6 bits
C 8 bits
D 16 bits
37
How many bytes are in one Kilobyte (KB)?
Easy 1 Mark
Computer storage uses powers of 2 — 2 to the power 10 = 1024.
A 100 bytes
B 512 bytes
C 1000 bytes
D 1024 bytes
38
What is the correct hierarchy from smallest to largest data unit?
Medium 2 Marks
Start from the smallest piece of data and work upward.
A Byte Bit KB MB GB TB
B Bit Byte KB MB GB TB
C KB MB GB TB Bit Byte
D Bit KB Byte MB GB TB
39
A Terabyte (TB) is equal to approximately:
Medium 2 Marks
TB is the next step up from GB in the data unit hierarchy.
A 1024 KB
B 1024 MB
C 1024 GB
D 1024 TB
40
What is the purpose of character encoding?
Easy 1 Mark
How does a computer know what binary pattern represents the letter A?
A To compress files into archives
B To define how characters like letters and symbols are stored as binary
C To convert decimal to binary
D To manage memory allocation
Question Palette
0/50 Answered
Showing 21 - 40 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 10
Medium 7
Hard 3