0% found this document useful (0 votes)
12 views25 pages

Computer Science Comprehensive Notes

The document provides an overview of computer science concepts, focusing on system software, application software, utility software, and operating system functions. It details the types and features of each software category, as well as the roles of the operating system in memory, security, hardware management, and file management. Additionally, it discusses user interfaces, interrupts, programming languages, and the booting process.

Uploaded by

muqeetahmed1010
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views25 pages

Computer Science Comprehensive Notes

The document provides an overview of computer science concepts, focusing on system software, application software, utility software, and operating system functions. It details the types and features of each software category, as well as the roles of the operating system in memory, security, hardware management, and file management. Additionally, it discusses user interfaces, interrupts, programming languages, and the booting process.

Uploaded by

muqeetahmed1010
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Computer Science Comprehensive Exam

Notes
1. System Software & Application Software
System Software
System software is the backbone of the computer. It is the set of programs that manages and
controls the computer hardware and provides a platform for application software to run. It acts
as an interface between the hardware, the user, and the application software.

Types of System Software:

1. Operating Systems (OS): The core software that manages resources (Windows,
macOS, Linux).
2. Utility Software: Maintenance tools (Antivirus, Disk Defragmenter).
3. Device Drivers: Translators that allow the OS to talk to hardware.
4. Firmware: Permanent software programmed into read-only memory (BIOS).

General Features of System Software:

● Machine-oriented: Written to interact directly with hardware architecture.


● Background Operation: Runs automatically when the computer starts; the user rarely
interacts with it directly.
● Essential: Without it, a computer cannot function properly.

Examples of Typical System Software:

● Windows 11, macOS, Android (Operating Systems).


● NVIDIA GeForce Drivers (Device Drivers).
● Norton 360, WinZip (Utilities).

Application Software
Application software is designed to help users perform specific, productive tasks. If System
Software is the "musician," Application Software is the "sheet music" being played.

Types of Application Software:

1. General Purpose: Software capable of performing many different tasks (e.g., Word
Processors, Spreadsheets).
2. Special Purpose: Software designed for a single, specific task (e.g., Payroll systems,
Hotel booking systems).
3. Customized (Bespoke): Software tailor-made for a specific organization’s unique needs
(e.g., a missile guidance system for the military).

General Features of Application Software:

● User-oriented: Designed with a focus on human interaction.


● Task-specific: Focuses on output (documents, images, calculations).
● Dependent: Runs on top of the System Software.

Examples of Typical Application Software:

● Microsoft Word, Excel (General Purpose).


● Adobe Photoshop (General Purpose).
● School Attendance System (Special Purpose).

2. Utility Software & Security


Utility Software (Utilities)
Utilities are specialized programs designed to maintain, analyze, configure, and optimize the
computer system. They ensure the computer continues to run efficiently.

Malware
Malware (Malicious Software) is designed to damage, disrupt, or gain unauthorized access to a
computer.

● Viruses: Attach to clean files and replicate when the file is opened.
● Worms: Self-replicating programs that spread across networks without human action.
● Trojans: Disguised as legitimate software to trick users into installing them.
● Ransomware: Encrypts user data and demands payment for the decryption key.

Anti-Virus Software
Software designed to detect, prevent, and remove malware. It works in two main ways:

1. Signature Checking: Compares files against a known database of virus "signatures."


2. Heuristic Checking: A smart method used to detect unknown viruses by analyzing
suspicious behavior (e.g., a file trying to modify system files).

Key Concepts in Anti-Virus:

● Quarantine: Instead of deleting an infected file immediately (which might delete


important data), the antivirus isolates the file in a secure area where it cannot run. This
allows the user to decide whether to delete or restore it.
● False Positive: When the antivirus mistakenly flags safe, legitimate software as
malware.
● False Negative: When the antivirus fails to detect a piece of actual malware.

Disk Maintenance
● Disk Defragmenter:
○ The Problem: Over time, files get split up (fragmented) and saved in gaps all over
the hard drive.
○ The Solution: Defragmentation reorganizes these scattered parts so files are
stored in contiguous (side-by-side) blocks.
○ Benefit: Increases read/write speed because the read head doesn't have to move
as much.
○ Note: SSDs do not need defragmentation (it damages them).
● Disk Cleanup (The "Opposite"): While defrag organizes data, Disk Cleanup removes
unnecessary files (temporary internet files, trash, old updates) to free up storage space.

Back-Up Utilities
Backup software creates copies of important files to restore in case of data loss.

● File History (Windows): Automatically backs up versions of files to an external drive at


set intervals, allowing you to "go back in time".
● Time Machine (macOS): Similar to File History; takes snapshots of the system so you
can restore the entire OS or specific files from a specific date.

Screensavers
Historically, screensavers were a technical necessity. On old CRT (Cathode Ray Tube) and
early Plasma monitors, if an image stayed still for too long, the phosphors would physically burn
into the glass, leaving a permanent "ghost image" (known as burn-in).

● The Function: A screensaver is a program that fills the screen with moving images or
patterns when the computer is idle.
● Modern Use: Today’s LCD and LED monitors don't really suffer from burn-in.
Screensavers are now used for:
○ Security: Automatically locking the workstation so a password is required to
return.
○ Power Management: Though technically, "turning the screen off" is better for
power, screensavers can signal the PC to enter a low-power state.
○ Background Tasks: Some screensavers run virus scans or distributed
computing tasks (like searching for signals in space) while the user is away.

3. Operating System (OS) Functions & Management


The Operating System (OS) is the critical software that manages all hardware and software
resources.

I. Memory Management
This is one of the most complex tasks of the OS. It manages the computer's primary memory
(RAM).

● Allocation: The OS decides exactly which block of RAM is assigned to which program.
When you open "Chrome," the OS finds free space and assigns it.
● Protection: It ensures that one program cannot access the memory of another program.
(e.g., A game cannot accidentally overwrite the memory used by your Word document).
● Virtual Memory: When RAM is full, the OS moves inactive data to the hard drive
(paging) to free up RAM for active tasks. This trick makes the computer feel like it has
more RAM than it actually does.
● Deallocation: When you close a program, the OS marks that memory space as "free"
so it can be used again.

II. Security Management


The OS is responsible for internal security and access control.

● User Authentication: Verifies who is using the computer (Passwords, Biometrics like
Fingerprint/FaceID).
● Access Rights: Checks if the logged-in user has permission to open a specific file.
(e.g., A "Guest" user cannot open "Admin" folders).
● Encryption: Many modern OSs encrypt data on the disk so that if the hard drive is
stolen, the data cannot be read without the password.
● Firewall Services: Monitors incoming and outgoing network traffic to block unauthorized
access.

III. Hardware & Peripheral Management


The OS acts as the bridge between software and hardware.

● Device Drivers: The OS uses drivers to translate commands into signals the hardware
understands.
● I/O Control: It manages inputs (Keyboard, Mouse) and outputs (Monitor, Printer).
● Interrupt Handling: The OS catches signals from hardware (like a mouse click) and
tells the CPU to process them immediately.

IV. File Management


The OS organizes how data is stored on the disk.

● Directory Structure: It maintains the hierarchy of Folders and Sub-folders.


● File Allocation Table (FAT) / NTFS: The OS keeps a "map" of where every file is
located on the hard drive sectors.
● Naming Conventions: Enforces rules for file naming (e.g., cannot use special
characters like ? or * in filenames).
● Access Control: Determines who can Read, Write, or Delete a file.

V. Multitasking (Process Management)


Multitasking allows the computer to run multiple programs effectively.

● The Illusion: On a single-core CPU, true simultaneous processing is impossible. The


CPU can only process one instruction at a time.
● Time Slicing (Scheduling): The OS slices CPU time into tiny fractions (milliseconds). It
gives 5ms to Spotify, 5ms to Word, 5ms to Chrome. It switches so fast (billions of times
a second) that it appears simultaneous to the human eye.
● Process States: The OS tracks if a program is "Running," "Waiting" (for input), or
"Ready" (waiting for CPU time).

VI. User Account Management


● Administrator: A "Super User" with full control. Can install software, change system
settings, and access all files.
● Standard User: Restricted access. Can use software but cannot make system-changing
decisions (prevents accidental damage or malware installation).

4. Interfaces & Descriptors

HCI: How We Talk to Computers


HCI (Human-Computer Interaction) is the study and design of how people and computers
work together. The most visible part of this is the User Interface (UI).

1. CLI (Command Line Interface)


This is the "old school" hacker-style interface where the user interacts solely by typing text
commands.

● How it works: You type a specific command (e.g., dir or ls), and the computer
executes it immediately.
● Advantages: It is text-based and much faster for experts who know the commands; it
also uses very little RAM/processing power.
● Disadvantages: It has a steep learning curve; you must memorize commands and
syntax, and one typo can cause an error.

2. GUI (Graphical User Interface)


This is what most people use today. It uses visual elements to represent tasks.

● WIMP: This is the standard framework for a GUI, standing for Windows, Icons, Menus,
and Pointers.
○ Windows: Areas of the screen dedicated to different programs.
○ Icons: Small pictures representing files or apps.
○ Menus: Lists of options or commands.
○ Pointer: An on-screen symbol (arrow) that moves with your mouse to select
items.
● Advantages: Extremely intuitive and beginner-friendly; no need to memorize
commands.
● Disadvantages: Uses significantly more system resources (RAM/CPU) to render the
graphics.

Feature CLI (Command Line) GUI (Graphical)

Ease of Use Hard; requires memorization. Easy; visual and intuitive.


Speed Faster for experts. Slower for complex tasks.

Resources Low RAM/CPU usage. High RAM/CPU usage.

Customization High (scripting/automation). Limited by the visual layout.

3. Post-WIMP Interfaces
We are now moving beyond the mouse and keyboard. Post-WIMP refers to interfaces that use
more "natural" human actions.

● Touchscreen: Using fingers to pinch, swipe, and tap.


● Haptic/Gestures: Using body movements (like on a VR headset or gaming console).
● Voice Recognition: Interacting through spoken commands (like Siri or Alexa).

Device Drivers & Descriptors


● Device Drivers: Small programs that act as a "manual" for the OS, telling it how to
operate a specific piece of hardware (e.g., a Printer Driver tells Windows how to print to
an HP printer).
● Descriptors (Device Descriptors):
○ Definition: When you plug in a device (like a USB drive), it sends a "Descriptor"
to the OS. This is a data structure (a small block of information) that tells the OS
what the device is.
○ Function: It contains the Device ID, Vendor ID, and capabilities (e.g., "I am a
Logitech Mouse, I have 3 buttons and a scroll wheel").
○ Why it matters: Without the descriptor, the OS wouldn't know which driver to load
for the device.

5. Buffers, Spooling & Booting


Buffers & Spooling
● Buffer: A temporary storage area in memory. It holds data when it is being moved
between two devices that work at different speeds.
○ Example: The CPU is fast, the Printer is slow. The CPU sends the document to a
buffer and goes back to work. The Printer slowly pulls data from the buffer.
● Spooling: The process of placing data into a buffer (e.g., "Print Spooler").

The Booting Process (Starting Up)


Booting is the sequence of events that occurs from the moment you press the power button until
the Operating System (OS) is ready for user input. It’s essentially the computer "pulling itself up
by its own bootstraps."

1. Power On & BIOS/Firmware: When electricity hits the motherboard, the CPU looks at a
specific address in the ROM (specifically an EEPROM chip) to find the BIOS (Basic
Input Output System). BIOS is a type of firmware—permanent software programmed
into hardware.
2. POST (Power-On Self-Test): The BIOS runs a diagnostic test to ensure hardware like
RAM, the keyboard, and disk drives are connected and functioning.
3. CMOS Check: The BIOS consults the CMOS chip, which is powered by a small battery
to store system configuration settings (like the date, time, and boot order) even when the
PC is off.
4. The Bootstrap Loader: This is a small program within the BIOS. Its sole job is to locate
the Operating System on the hard drive (or SSD) and load the kernel into the RAM.
5. OS Takes Control: Once the kernel is in RAM, the OS takes over, initializes device
drivers, and presents the login screen.

Hardware Components in Booting


● BIOS (Basic Input Output System): The startup firmware stored in EEPROM.
● Firmware: Software that is permanently etched into a hardware chip.
● EEPROM (Electrically Erasable Programmable Read-Only Memory): The type of
chip where BIOS is stored. It is "Read-Only" but can be updated (flashed) electronically.
● CMOS Chip: A small volatile memory chip powered by a coin battery. It remembers the
date, time, and system settings even when the PC is unplugged.

6. Interrupts
What is an Interrupt?
An interrupt is a signal sent to the CPU telling it to stop its current task and attend to a more
urgent task.

How are Interrupts Caused?

1. Hardware: A printer runs out of paper; a key is pressed on the keyboard.


2. Software: A program crashes (division by zero error); a program requests a file.
3. Timing: The system clock signals that it’s time to switch to the next task (multitasking).

Servicing an Interrupt (The ISR Cycle)


When an interrupt happens, the CPU follows these steps:
1. Pause: Completes the current instruction but pauses the program.
2. Save: The Program Counter (PC) (which holds the address of the next instruction) is
saved to a stack in memory so the CPU knows where to return later.
3. Identify: The CPU checks the Interrupt Priority. (e.g., "Power Failure" > "Keyboard
Press") .
4. Execute ISR: The CPU runs the Interrupt Service Routine (ISR), which is the code
that handles the specific event.
5. Restore: Once the ISR is done, the CPU reloads the saved Program Counter.
6. Resume: The original program continues as if nothing happened.

How Interrupts Help Multitasking: Interrupts are the mechanism that allows the OS to switch
tasks efficiently. The system timer sends an interrupt every few milliseconds, forcing the CPU to
pause Program A and switch to Program B.

7. Programming Languages, Translators & IDEs


Levels of Language
1. Machine Code (1st Gen):
○ The only language the computer understands.
○ Binary instructions (1s and 0s).
○ Extremely difficult for humans to read/write.
2. Low-Level Language / Assembly (2nd Gen):
○ Uses Mnemonics (short codes) instead of binary.
○ Specific to the processor architecture.
○ Must be translated by an Assembler.
○ Common Assembly Instructions:
■ LDA: Load Data to Accumulator.
■ ADD: Add value to Accumulator.
■ STO: Store Accumulator value to Memory.
3. High-Level Language (3rd Gen):
○ Close to human language (English-like).
○ Portable (works on different computers).
○ Examples: Python, Java, C++.
○ Must be translated by a Compiler or Interpreter.

Comparison:

● Low-Level Advantages: Direct control of hardware, very memory efficient, executes


extremely fast.
● Low-Level Disadvantages: Hard to learn, code is long and complex, hard to debug.
● High-Level Advantages: Easy to learn/debug, writes code quickly, portable.
● High-Level Disadvantages: Slower execution (due to translation layers).

Translators
Software that converts source code into machine code.

1. Assembler:
○ Translates Assembly $\rightarrow$ Machine Code.
2. Compiler:
○ Translates the High-Level source code $\rightarrow$ Machine Code all at once.
○ Creates an executable file (.exe).
○ Pros: Fast execution (don't need to translate again), code is hidden from user.
○ Cons: Harder to debug (lists all errors at the end).
3. Interpreter:
○ Translates High-Level code $\rightarrow$ Machine Code line-by-line while
running.
○ Pros: Great for debugging (stops immediately at error), easy to test small parts.
○ Cons: Slower execution (translates every time you run it).

The IDE Components (Integrated Development Environment)


An IDE isn't just one program; it’s a "toolbox" for programmers. Here is how that toolbox works:

Code Editor

This is the specialized "Word Processor" for programmers. Unlike a standard text editor (like
Notepad), a Code Editor is "language-aware."

● Line Numbering: Crucial for finding errors reported by the compiler.


● Syntax Highlighting: It colors different parts of the code (e.g., variables in blue, strings
in orange, keywords in purple) so the human eye can spot mistakes instantly.

A Runtime Environment with a Debugger

● Runtime Environment: This is a "sandbox" provided by the IDE that allows you to run
your program to see if it works without having to exit the IDE or install extra software.
● Debugger: This is the most powerful tool for a programmer. It allows you to:
○ Breakpoints: Tell the program to "freeze" at a specific line so you can see
what’s happening.
○ Variable Watch: Look inside the computer's "brain" to see exactly what value a
variable holds at that exact moment.
○ Stepping: Move through the code one single line at a time to find exactly where
it logic goes wrong.

Error Diagnostics

When your code fails, the IDE doesn't just say "it's broken." It provides a diagnostic report.

● Syntax Errors: It identifies "grammar" mistakes in the code (e.g., a missing colon).
● Logical/Runtime Errors: It points out why a program crashed (e.g., trying to divide by
zero).
● Underlining: Most modern IDEs use "wavy red lines" (like a spell-checker) to show
errors before you even try to run the code.

Auto-Correction & Auto-Completion


● Auto-Completion (IntelliSense): As you type pri..., the IDE suggests print().
This prevents typos and speeds up coding because you don't have to remember every
exact command name.
● Auto-Correction: If you open a bracket ( but forget to close it ), the IDE will often insert
the closing bracket ) for you automatically.

Auto-Documenter

In professional coding, you must explain what your code does (Comments). An Auto-
Documenter scans your code, looks for your comments, and automatically generates a
professional PDF or Website "Manual" for your software. It saves weeks of manual writing.

PrettyPrinting

This is the "makeup" for your code. If your code is messy (no spaces, bad indentation),
PrettyPrinting automatically reformats it.

● Indentation: It ensures all if statements and loops are tucked in properly so the
structure is visually clear.
● Spacing: It adds standard spacing around operators (e.g., changing x=5+y to x = 5 +
y).

Report Window

Located at the bottom of the IDE, this is the communication hub.

● Output: It shows what your program prints out.


● Console: It allows you to type input into your program.
● Build Logs: It shows the history of the Compiler. If the compilation failed, the Report
Window lists every single error, the line number it occurred on, and a description of the
"crime."

Tool Purpose "Extreme Knowledge" Tip

Screensaver Prevent Burn-in / Modern monitors use them for


Security security/locking, not hardware
protection.
Debugger Find logic bugs Use "Stepping" to execute code line-by-
line.

PrettyPrinting Readability Standardizes indentation so other


programmers can read your work.

Auto- Documentation Uses comments (like # or //) to build a


Documenter technical manual.

Report Window Feedback The "Output" or "Console" area where


errors are listed.
IGCSE Computer Science: Chapter 4 —
The Complete Guide
1. System Software & Application Software
System Software refers to the programs that control and manage the operations of the
computer hardware. It provides a platform for application software to run. Unlike application
software, it is "computer-centric" and often runs in the background without user intervention. It
includes the Operating System, utility programs, and library files. Without system software, the
hardware has no instructions on how to start up or manage its own resources (like the CPU or
RAM).

Types of System Software: The primary type is the Operating System (OS), followed by
Utility Programs (for maintenance), Library Programs (shared code), and Translators
(Compilers, Interpreters, Assemblers).

Application Software is "user-centric." These are programs designed to allow the end-user to
perform specific tasks, such as writing a report, editing a photo, or browsing the internet. It
interacts with the System Software to access the hardware.

Types of Application Software: These are categorized by their purpose: General-purpose


(used by many, like Word), Special-purpose (for one specific task, like a finger-print scanner),
and Bespoke (custom-made for a specific company).

General Features of System Software: * It interacts directly with the hardware.

● It provides the User Interface.


● It is essential for the computer to function.
● It manages memory and processes.

General Features of Application Software:


● It runs "on top" of the OS.
● It performs specific user-related tasks.
● The computer can function without it.
● It often has a Graphical User Interface (GUI) tailored to its specific task.

Examples of Typical Application Software: Word processors (Microsoft Word), Spreadsheets


(Excel), Web Browsers (Chrome), and Media Players (VLC). Examples of Typical System
Software: Operating Systems (Windows 11, Linux), Compilers (GCC), and Disk formatters.
2. Utility Software (Maintenance Tools)
Utility Software is a subset of system software designed to analyze, configure, optimize, or
maintain a computer. While the OS manages the "now," utilities manage the "health" of the
system.

Malware (Malicious Software): Programs designed to damage or disrupt a computer system.


This includes viruses, worms, and trojans. Antivirus software is the utility used to combat this.

● Anti-Virus Software: Scans files for "signatures" of known viruses and deletes or
isolates them.
● Heuristic Checking: A modern technique where the software looks for suspicious
behavior (e.g., a file trying to rewrite the BIOS) rather than just a known signature. This
catches new, unknown viruses.
● Quarantine: Moving a suspicious file to a secure, hidden area of the disk so it cannot
run or infect other files.
● False Positive/Negative: A False Positive is when a safe file is flagged as a virus. A
False Negative is when a real virus goes undetected.

Disk Defragmenter: On Hard Disk Drives (HDDs), files become "fragmented" (scattered across
different physical sectors). This utility rearranges the blocks of data so that files are stored in
contiguous sectors, reducing the movement of the read/write head and speeding up the system.

● Disk Formatting: (The "opposite" logic). This prepares a disk for use by creating a file
system but wipes all existing data.

Back-Up Software: Creates copies of data so it can be restored if the original is lost.

● File History (Windows): Periodically snapshots files to an external drive.


● Time Machine (macOS): An incremental backup system that allows users to "travel
back in time" to see previous versions of files.

Screensavers: Originally used to prevent "phosphor burn-in" on CRT monitors. In modern CS,
they are mostly used for security (locking the session) or aesthetic energy-saving.
3. Device Drivers & Descriptors
Device Drivers: Every piece of hardware (printer, GPU, mouse) needs a driver. It is a piece of
system software that acts as a translator between the OS and the hardware. Because the OS
doesn't know the specific internal commands of every printer ever made, the driver provides
those specific instructions.

Descriptors: A file descriptor is an abstract indicator (usually an integer) used by the OS to


access a file or an input/output resource. When a program opens a file, the OS gives it a
"handle" or index number so it can keep track of where the program is reading from.

4. The Operating System (The Boss)


The Operating System (OS) is the software that manages the hardware and software
resources.

User Interfaces:

● HCI (Human-Computer Interaction): The broad study of how humans talk to machines.
● CLI (Command Line Interface): Users type text commands. It uses very little memory
and is fast for experts but hard for beginners to learn.
● GUI (Graphical User Interface): Uses visual elements.
○ WIMP: Windows, Icons, Menus, Pointers. Standard for desktops.
○ Post-WIMP: Interfaces for touchscreens/VR, using haptics, swiping, and
pinching instead of a mouse.

Core Functions of the OS:

1. Memory Management: Assigns data to specific RAM addresses and prevents programs
from overwriting each other.
2. Security Management: Handles logins, passwords, and file permissions.
3. Hardware/Peripheral Management: Uses drivers to talk to devices and manages
Buffers (temporary storage areas that allow slow devices like printers to keep up with
fast CPUs).
4. File Management: Creates the folder structure and manages the naming, moving, and
deleting of files.
5. Multitasking: A CPU with one core can technically only do one thing at a time.
However, the OS switches between tasks so quickly (millions of times per second) that it
creates the illusion of simultaneous execution.
6. User Account Management: Manages different users. The Administrator has
"elevated privileges" to change system settings that a standard user cannot.
5. Starting up the Computer (The Boot Process)
1. Power On: The CPU sends a signal to the BIOS (Basic Input/Output System) stored on
the ROM (specifically an EEPROM chip).
2. POST: The BIOS runs a Power-On Self-Test to check hardware.
3. CMOS: The BIOS checks the CMOS Chip for settings (like boot order and system time).
4. Bootstrap Loader: The BIOS runs a small program called the Bootstrap Loader,
which locates the OS on the hard drive.
5. Firmware: This is the permanent software (like BIOS) programmed into a hardware
device.
6. Load to RAM: The OS is moved from the storage drive into RAM, and the computer is
ready.

6. Interrupts (How the CPU Handles Emergencies)


An Interrupt is a signal sent to the processor from a device or software that requires immediate
attention.

How it works:

1. An interrupt is caused (e.g., printer is out of paper, or a "Divide by Zero" error in code).
2. The CPU finishes its current Fetch-Execute cycle.
3. It checks the Interrupt Priority.
4. If it needs to be serviced, the CPU saves its current state (the contents of the Program
Counter and other registers are pushed to a "Stack").
5. The CPU loads the ISR (Interrupt Service Routine), which is a specific program that
handles that specific interrupt.
6. Once finished, the CPU "pops" the saved values back into the registers and resumes
exactly where it left off. How it helps Multitasking: Interrupts allow the CPU to stop a
task to handle a more urgent one, or to switch between programs efficiently.

7. Programming Languages & Translators


High-Level Languages (HLL): (Python, Java). English-like, easy to debug, and Portable (runs
on different hardware). Low-Level Languages (LLL): * Machine Code: Pure binary (1s and
0s). What the CPU actually understands.

● Assembly Language: Uses Mnemonics (short text codes).


○ LDA (Load Accumulator)
○ ADD (Addition)
○ STO (Store value)

Translators:

What do you need to know about Compilers?


A compiler is a translator program that converts source code written in a high-level language like
Java, C++, etc. to equivalent machine language in one go.

It converts the entire program to executable object code if the entire program is Error-free Code.
However, if there are errors in the program the compiler highlights them at the end of the execution
of the entire program, and then the errors must be removed for successful compilation of source
code.

It converts the source program to object code (combination of binary numbers) which can be stored
and we can run it each time we need to execute the program. Therefore, it eliminates recompilation.

At the same time, due to the generation of the intermediate file, it takes up a lot of memory as
compared to other language processors. Compilation as a whole process is done in the following
phases - lexical analyzer, semantic analyzer, syntax analyzer, intermediate code generator, code
optimizer, symbol table, and error handling.

Examples of Compilers are- Clang, GCC, javac, etc.

Advantages of Compiler
● It produces an executable file that can run without the need for source code.
● It is relatively faster than other language processors.
● Using a compiler is more secure because the actual source program can be hidden which
makes it private and secure.
● The machine code of the executable file is native to the machine which makes the compiler
well optimized.

Disadvantages of Compiler
● Debugging (removing errors) is relatively tough.
● It requires a lot of memory for producing an Object File.
● The source code needs to be recompiled every time there is a change in the code.
● After the removal of errors in our code, it needs to be recompiled.

What do you need to know about Assembler?

It is a translator program that converts assembly language or low-level programming language to


machine code.

It was the first interface through which communication between machines and humans became
possible.

Assembly language or low-level language is where we use mnemonics (instructions, in place of


machine language. Assembly language is dependent on the machine which implies that the
mnemonics are also dependent on the architecture of machines.

Assembler works in two different phases over the given input-first phase and second phase.

Examples of assemblers are- GNU, GAS, etc.

Advantages of Assembler
● It is a very fast translating system software.
● It is as efficient as the machine language.
● Developing assemblers for translating is easier as compared to compiler and interpreter.
● Assemblers are used in computer forensics, brute force hacking, etc. where it is important to
determine exactly what is going on.

Disadvantages of Assembler
● Lower-level machine language is difficult to understand and code.
● It changes with the architecture of machines.
● It is difficult to debug.
● We have to write different assembly codes for 8-bit, 16-bit, 32-bit, and 64-bit machines which
is a tedious task and difficult to maintain.

What do you need to know about Interpreter?

It converts source programs written in High-Level Programming language into machine code line by
line, which means it executes one single line at a time into machine language.

If there is an error in the program the interpreter terminates its translation process and proceeds for
execution only when the error is removed. This process continues till the interpreter reaches the end
of the program.

In the case of an interpreter, each line is converted and executed simultaneously. As a result, it
requires less memory space as compared to the compiler.

Examples of Interpreters: Python Interpreter, Ruby Interpreter, LISP, APL, etc.

Advantages of Interpreter
● It is easy to find and debug errors from the code/source program.
● As there is no Intermediate object Code, there is less memory consumption.
● Interpreters give execution control to programmers as they can see their code running line
by line.
● It can be easily used between different platforms.
● An interpreter is good for fast debugging.

Disadvantages of Interpreter
● It takes time to convert and execute the instructions line by line.
● It is not good for large programs.
● It is less secure for privacy because we need to share the actual program.
● To run the code on another machine, it is required that the interpreter be installed on the
machine.

Difference Between Compiler, Interpreter,


Assembler
Assembler vs Compiler

Criteria Compiler Assembler

Compiler converts
program written in a The assembler converts
Definition high-level language assembly code into
to machine-level machine code.
language.

Debugging is easy in
Debugging is tough as
Debugging the case of the
compared to the compiler.
compiler.

The compiler is more The assembler is less intelligent


Competency intelligent than the as compared to the
assembler. compiler.

Phases A compiler works in the An assembler works in two


following phases: phases over the given
lexical analyzer,
semantic analyzer,
syntax analyzer,
intermediate code input: the first phase and
generator, code the second phase.
optimizer, symbol
table, and error
handle.

The compiler scans the Assembler converts code into


entire program object code then it converts
Conversion method
before converting it object code into machine
into machine code. code.

Examples of compilers
Examples of assemblers are
Examples are Clang, GCC,
GNU, GAS, etc.
javac, etc.

Compiler vs Interpreter

Interpreter
Criteria Compiler
It translates a High-Level It translates a High-Level language
Translation language into machine into machine code line by line.
code at once.

Requirement
of A translator Program is
A translator Program is not
Translato required each time for
required for execution.
r execution.
Program

Object File It creates and stores an object It does not create an object
Creation file. program.

An interpreter takes relatively


Memory consumption is more
Memory less memory than the
in the case of the compiler.
compiler.

Debugging of code is relatively Debugging is easy, compared to


Debugging
harder. the compiler.

A compiler is relatively costlier


Cost Less costly.
than an interpreter.

More useful in the case of Interpreter is more vulnerable to


Security
security. threats.
Execution
Execution time is less. Execution time is higher.
time

Suitability Suitable for large programs. Suitable for small programs.

Why is a Compiler better than Assembler and


Interpreter?
The most widely used language translator among the three is a compiler. Compilers are preferred
over assemblers and interpreters because of various reasons:

● Compilers translate and execute the code faster than assemblers and interpreters.
● The compiler converts the code into an Object file which can be used whenever we need to
execute the program, therefore it eliminates the need to re-compile.
● All the errors are found and displayed together at the end.

Summing Up
All three of the language processors are used to convert programming languages into equivalent
machine code. Compilers and interpreters convert High-Level languages whereas an Assembler is
used to convert Low-Level language.

Find out the difference between high-level and low-level programming languages here.

Nowadays, most of the languages like Java and C++ are converted using a compiler whereas
Python uses an interpreter. The use of an assembler is very rare and it is mostly only used by
computer experts and hackers.

8. The IDE (Integrated Development Environment)


An IDE is a "suite" of tools for programmers.
● Code Editor: Where you type the code.
● Runtime Environment: Where the code is executed for testing.
● Debugger: Tools like Error Diagnostics and break-points to find bugs.
● Auto-Completion/Correction: Predicts what you are typing to save time.
● Auto-Documenter: Automatically creates a summary of variables and functions used.
● PrettyPrinting: Uses colors (Syntax Highlighting) and indentation to make code
readable.
● Report Window: Shows the status of the compilation and lists errors.

Main IGCSE Exam Questions to Practice:


1. Describe the process of a "defragmentation" utility. (4 marks)
2. Compare a Compiler and an Interpreter. Give two advantages of each. (6 marks)
3. Explain the role of the Program Counter when an interrupt is serviced. (3 marks)
4. State three functions of an Operating System. (3 marks)
5. Explain why a programmer would use High-Level languages instead of Low-Level.
(4 marks)

You might also like