Computer science: Chapter – 4
There are two types of softwares:
1. System software: Provides services requires to run a computer system. Such as operating system and
utility software.
2. Application software: Provides services that are required by the user to perform a specific task. Such
as word processor and file manager.
An operating system manages files, memory, multitasking and accounts. Also provides a user interface to
take inputs and give outputs. It provides a platform for application software to run on.
An Operating System:
Managing Files: Keeps files organized and allows creating, opening, saving, deleting, and moving
files.
Providing an Interface: Lets users interact with the computer
Managing Peripherals and Drivers: Controls devices like printers and USB drives using drivers.
Managing Memory: Allocates memory to programs and prevents interference.
Managing Multitasking: Allows multiple programs to run simultaneously.
Providing a Platform for Applications: Allows application software to run.
Providing System Security: Protects the system using passwords and permissions.
Managing User Accounts: Allows multiple users with different access rights.
A utility software manages virus detection, security and backup software.
How the operating system starts the computer:
Operating system data in a storage device needs to be loaded into the RAM. (Booting up)
The BIOS (Basic input and output system)/ Firmwire tells the computer where the storage device is
The operating system is loaded into the RAM via firmwire, then executed.
An interrupt is a signal send to the microprocessor by a device or software to stop what it is doing and
perform a task of a greater importance. An interrupt is generated during an input, timing signal or hardware
fault.
There are two types of programing language:
1. High-level language: English like code which is easily understandable by humans and is very different
from machine code.
2. Low-level language: Code which is very similar to machine code. Used to manipulate specific
hardware. Assembly code is a low-level language
Advantages of High-level language:
Easy to read
Easy to write
Easy to debug
Advantages of Low-level language:
direct manipulation of hardware
How code is translated to machine code:
A compiler translates the whole code at once before executing it, producing an executable file. A compiler
provides an error report for the whole code if errors are detected. A compiler is used to translate the final
program
An interpreter translates and executes the code line-by-line. An interpreter stops execution when an error
is found. An interpreter is mostly used when developing a program.
An assemble translates a low level assembly language program into machine code. Producing an
executing file of machine code.
Advantages of Interpreter:
Easy and quick to debug
Easy to edit and write
Advantages of a compiler:
Creates an executable program
Can be executed without the compiler
Takes less space
integrated development environments (IDEs) is used by programs to write and text programs.
An IEDs includes:
Code Editors: A space where you write and edit your code.
Run-time Environment: Lets you execute or run your program directly from the IDE.
Translator: Converts the code you write into machine-readable language.
Error Diagnosis: Detects syntax or logical errors in your code.
Auto-compilation: Suggests commands, variable names, or functions while you type.
Auto-correct: Fixes common mistakes automatically.
Prettyprint: Formats code neatly with proper indentation and spacing. Making it easier to read