E EpicCBT
Home Lesson Notes Quiz Center Leaderboard Login
All notes Data Processing · Data Types and Data Representation · SSS1

Data Types and How Data Is Represented in a Computer

7 views

Every piece of information stored or processed by a computer, whether it is a number, a letter, an image, or a sound, must first be represented in a form the computer can understand. This note explores the different types of data and how they are represented inside a computer system, forming a foundation for understanding how computers store and process information.

What Is Data?

Data refers to raw facts and figures that have not yet been processed into meaningful information. Data can take many forms, including numbers, text, images, sound, and video. When data is processed, organized, and given context, it becomes information that can be used to make decisions.

Common Data Types

In computing, data is generally classified into several basic types, each suited to representing a different kind of information.

  • Numeric data represents numbers and can be further divided into integers (whole numbers) and floating-point numbers (numbers with decimal points).
  • Character/text data (string) represents letters, symbols, and words, such as names or sentences.
  • Boolean data represents one of only two possible values: true or false, often used in decision-making within programs.
  • Date/time data represents specific dates and times, useful for scheduling and record-keeping.

The Binary Number System

At the most fundamental level, computers represent all data using the binary number system, which uses only two digits: 0 and 1. Each binary digit is called a bit, the smallest unit of data in a computer. Computers use binary because their electronic circuits operate using two states, typically represented as "on" (1) and "off" (0), corresponding to the presence or absence of an electrical signal.

Bits, Bytes, and Larger Units

Data storage and size are measured using specific units built from bits.

  • Bit: The smallest unit of data, representing a single binary digit (0 or 1).
  • Byte: A group of 8 bits, commonly used to represent a single character.
  • Kilobyte (KB): Approximately 1,024 bytes.
  • Megabyte (MB): Approximately 1,024 kilobytes.
  • Gigabyte (GB): Approximately 1,024 megabytes.
  • Terabyte (TB): Approximately 1,024 gigabytes.

Representing Text (Character Encoding)

Since computers only understand binary numbers, text characters must be converted into binary codes using a system called character encoding. One widely used system is ASCII (American Standard Code for Information Interchange), which assigns a unique binary number to each letter, digit, and symbol. For example, the capital letter 'A' is represented as the number 65 in ASCII, which is written as 01000001 in binary. A more modern and comprehensive encoding system called Unicode supports characters from many more languages and symbol sets used around the world.

Representing Numbers

Numbers are represented in binary using positional place values, just as our familiar decimal system uses place values of ones, tens, and hundreds. In binary, each position represents a power of two rather than a power of ten. For example, the binary number 1011 represents (1×8) + (0×4) + (1×2) + (1×1), which equals 11 in decimal. Computers use special formats, such as two's complement, to represent negative numbers, and floating-point representation to handle numbers with decimal points.

Representing Images and Sound

Images are represented digitally by dividing a picture into a grid of tiny coloured dots called pixels, with each pixel's colour represented by a binary number. Sound is represented by sampling an audio signal at regular intervals and converting each sample into a binary number, a process known as digital audio sampling. The quality of digital images and sound generally improves as more bits are used to represent each pixel or sample, though this also increases the amount of storage space required.

Why Data Representation Matters

Understanding how data is represented is essential for anyone studying computing, as it explains how computers can store, process, and transmit such a wide variety of information using only two digits, 0 and 1. This knowledge underlies everything from simple text messages to complex multimedia files, and it forms the basis for more advanced topics in computer science, including data compression, encryption, and error detection.

Converting Between Number Systems

Computer scientists often need to convert numbers between different systems, including binary (base 2), decimal (base 10), and hexadecimal (base 16). Hexadecimal is frequently used as a more compact way of representing binary values, since each hexadecimal digit corresponds to exactly four binary digits, making long binary strings easier for humans to read and write, especially when working with memory addresses or colour codes in web design.

Data Representation in Practice

Every file on a computer, whether a document, a photograph, a song, or a video, is ultimately stored as a long sequence of binary digits. The specific pattern of these digits, combined with the file format that tells the computer how to interpret them, determines what the file represents and how it can be opened, edited, or played back by different software applications.

Data Compression

Because digital files, especially images, audio, and video, can require enormous amounts of storage space, computer scientists have developed techniques called data compression to reduce file sizes without losing too much important information. Lossless compression reduces file size while allowing the original data to be perfectly reconstructed, making it ideal for text documents and program files where accuracy is essential. Lossy compression, on the other hand, permanently removes some data that is judged to be less noticeable to human senses, allowing for much greater reductions in file size, which is why formats like JPEG for images and MP3 for audio can achieve such small file sizes compared to their uncompressed originals.

Error Detection in Data Transmission

When data is transmitted from one device to another, whether over the internet, a local network, or even a short cable, there is always a small risk that some bits may become corrupted or altered due to electrical interference or other technical issues. To address this, computer systems use error detection techniques, such as parity bits and checksums, which allow the receiving device to check whether the data it received matches what was originally sent. If an error is detected, the system can request that the data be resent, helping to ensure that the information we rely on remains accurate and trustworthy even across imperfect communication channels.

Key Terms to Remember

  • Bit: The smallest unit of data in a computer, representing either 0 or 1.
  • Byte: A group of 8 bits, often used to represent a single character.
  • Binary number system: A number system using only two digits, 0 and 1.
  • ASCII: A character encoding standard that assigns binary codes to letters, digits, and symbols.
  • Pixel: The smallest unit of a digital image, representing a single point of colour.
  • Hexadecimal: A base-16 number system often used as a compact way to represent binary data.

Summary

Data comes in many forms, including numbers, text, images, and sound, and each type must be represented in binary form for a computer to process it. Computers use the binary number system because their electronic circuits operate using two distinct states. Data is measured in units built from bits and bytes, ranging up to kilobytes, megabytes, gigabytes, and beyond. Character encoding systems such as ASCII and Unicode allow text to be represented in binary, while numbers, images, and sound each have their own specific representation methods. Understanding data representation gives us insight into how computers manage the enormous variety of information we rely on every day, from simple text to rich multimedia content.

Test yourself on Data Processing

Word Processing and Data Presentation Quiz (JSS1)

50 questions 30 min JSS1
Start quiz

Data Types and Data Representation Quiz

50 questions 10 min SSS1
Start quiz

Spreadsheet Fundamentals and Formulas Practice Test

50 questions 15 min SSS1
Start quiz

Word Processing and Data Presentation Practice Test

50 questions 15 min SSS1
Start quiz

Data Types and Data Representation Practice Test

50 questions 15 min JSS3
Start quiz

Data Processing Cycle and Number Systems Practice Test

100 questions 25 min JSS2
Start quiz

Track your reading & take quizzes

Create free account