Introduction to Computer Science
Discover what computer science studies, how computers process information, and how hardware, software, data, and algorithms work together.
1. What is Computer Science?
Computer science is the study of computation, information, algorithms, and the systems used to process information. It includes programming, data organisation, artificial intelligence, computer networks, security, and much more.
It receives your location and destination, processes map data, calculates possible routes, and presents directions. Computer science helps explain how these steps can be designed efficiently.
2. What does a computer do?
A computer accepts input, processes it according to instructions, may store information, and produces output.
These are functional stages, not always a strict sequence. A computer may store information before, during, or after processing, and some systems continuously receive input and produce output.
Example: Adding two numbers
- Input: You enter 12 and 8.
- Processing: The computer calculates 12 + 8.
- Storage: The values or result may be held in memory.
- Output: The screen displays 20.
3. Hardware and software
Hardware
The physical components of a computer that can be touched.
- CPU
- RAM and storage drives
- Keyboard and mouse
- Monitor and speakers
Software
Programs and instructions that tell hardware what tasks to perform.
- Operating systems
- Web browsers
- Games and editors
- Programming tools
Hardware and software depend on each other. A program provides instructions, while hardware executes those instructions.
| Hardware | Typical role |
|---|---|
| CPU | Executes instructions and performs operations. |
| RAM | Temporarily holds data and instructions in use. |
| SSD or HDD | Stores files and programs persistently. |
| Input device | Supplies data or commands. |
| Output device | Presents information to a user or another system. |
4. Data and information
Data consists of recorded values or observations. Information is data interpreted or organised so that it becomes meaningful in a particular context.
Data: 68, 72, 75, 85
Information: These are four test scores; their average is 75.
The distinction depends on context: information for one task may become raw data for another.
5. What is an algorithm?
An algorithm is a well-defined sequence of steps for solving a problem or completing a task. Algorithms can be written in ordinary language, pseudocode, flowcharts, or programming languages.
Example: Find the larger of two numbers
START
INPUT A, B
IF A > B
DISPLAY A
ELSE IF B > A
DISPLAY B
ELSE
DISPLAY "Both numbers are equal"
END
A good algorithm should have clear instructions and produce the intended result for the inputs it is designed to handle.
6. Programming languages
Programming languages allow people to express instructions in a form that can be translated or executed by a computer system.
| Language | Common uses |
|---|---|
| Python | Automation, data analysis, AI, education. |
| C | Systems programming and embedded software. |
| C++ | Games, performance-intensive software, systems. |
| JavaScript | Interactive websites and web applications. |
| SQL | Querying and managing relational databases. |
SQL is a specialised language for working with databases rather than a general-purpose programming language.
7. Major areas of Computer Science
- Algorithms: Designing and analysing problem-solving methods.
- Programming: Turning solutions into executable instructions.
- Data structures: Organising data for effective use.
- Computer architecture: Understanding how computer components work together.
- Operating systems: Managing hardware and software resources.
- Networks: Connecting devices to exchange data.
- Cybersecurity: Protecting systems and information.
- Artificial intelligence: Building systems that perform tasks associated with intelligent behaviour.
8. Quick knowledge check
Try answering each question before revealing the explanation.
Question 1: Which component executes program instructions?
Question 2: Is a web browser hardware or software?
Question 3: What is an algorithm?
Question 4: What is the difference between RAM and persistent storage?
Key takeaways
- Computer science studies computation, information, algorithms, and computing systems.
- Hardware provides physical components; software provides instructions.
- Computers process data to perform tasks and produce useful results.
- Algorithms describe the steps used to solve problems.
- Programming languages express instructions for computer systems.