1. Home
  2. Explore
  3. Computer Science
  4. Computer Software Introduction

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Computer Software Introduction

Computer Software and Computer System Architecture

Computer System Components

A computer system consists of four essential components:

  • Hardware: The physical equipment of the computer, such as the processor, memory, keyboard, mouse, monitor, and storage devices.

  • Operating system: The system software that manages hardware resources and provides services for other software.

  • Application programs: Software designed to help users perform particular tasks, such as writing documents, browsing the internet, editing images, or playing games.

  • Users: The people or other entities that interact with the computer system and use its programs.

These components work together. Hardware performs the physical operations, software provides instructions, the operating system coordinates the system, and users request tasks or provide input.


Computer Software

Computer software is a collection of programs that provides step-by-step instructions for a computer to perform tasks.

A computer cannot independently decide how to solve a problem. Software tells the computer:

  1. What operation to perform.

  2. Which data to use.

  3. In what order to perform the operations.

  4. How to produce or display the result.

The task performed by software may be simple or complex. Examples include:

  • Adding two numbers.

  • Copying a picture.

  • Modifying an image.

  • Playing a video.

  • Browsing a website.

  • Managing files.

  • Running a business or school management system.

Software is commonly divided into two major types:

  • Application software

  • System software


Types of Software

Application Software

Application software is designed for a specific user-oriented purpose. It directly helps users complete tasks or provides entertainment.

Examples include:

  • Word processors and presentation software.

  • Web browsers.

  • PDF readers.

  • Image-editing programs.

  • Music and video players.

  • Games.

  • Educational software.

  • Business and accounting programs.

Application software is generally used for specialized activities, entertainment, communication, or study.

System Software

System software manages the computer system and its resources. It provides the basic environment in which application software operates.

System software is responsible for:

  • Managing memory and processing resources.

  • Controlling input and output devices.

  • Managing storage.

  • Providing security.

  • Translating programming instructions.

  • Supporting the execution of application programs.

The major categories of system software are:

  1. Operating systems.

  2. Utility programs.

  3. Device drivers.

  4. Language translators.


Main Types of System Software

Operating Systems

An operating system coordinates computer resources and controls the execution of programs. It acts as an intermediary between users, application software, and hardware.

Examples include Windows, macOS, Linux, and UNIX.

Utility Programs

Utility programs perform specialized tasks related to maintaining, protecting, and managing computer resources.

Examples include:

  • Antivirus software.

  • Backup programs.

  • Disk-cleaning tools.

  • File-compression programs.

  • System-monitoring tools.

  • Disk-management programs.

Device Drivers

A device driver allows a particular input or output device to communicate with the rest of the computer system.

For example, a printer driver enables the operating system and applications to send properly formatted instructions to a printer. Drivers may also be needed for:

  • Keyboards.

  • Mice.

  • Scanners.

  • Graphics cards.

  • Sound cards.

  • Network adapters.

Language Translators

A language translator converts instructions written in a programming language into a form that the computer can understand and execute.

Computers ultimately execute machine-level instructions represented by binary values. Translators are therefore needed to convert languages such as Java, PHP, or Python into machine code or an intermediate form that can be processed by the computer.


Operating Systems

Definition and Purpose

An operating system is a program that acts as an interface between users and computer hardware while controlling the execution of programs.

The operating system manages resources such as:

  • The processor.

  • Main memory.

  • Secondary storage.

  • Input devices.

  • Output devices.

  • Communication devices.

Application programs generally do not communicate directly with hardware. Instead, they request services from the operating system, which communicates with the hardware on their behalf.

For example, when an application needs input from a keyboard:

  1. The application requests keyboard input from the operating system.

  2. The operating system communicates with the keyboard and its driver.

  3. The input is collected and delivered to the application.

The same general process applies when software needs to use the CPU, RAM, storage, display, or another device.


Main Parts of an Operating System

Kernel

The kernel is the central part of the operating system. It remains active while the computer is running and performs the core management functions.

The kernel controls:

  • Processor use.

  • Memory allocation.

  • Process execution.

  • Input and output operations.

  • Communication between software and hardware.

  • Security and access control.

Device Drivers

Device drivers allow the operating system to control specific hardware devices. They translate general operating system commands into device-specific instructions.

User Interface

The user interface allows users to interact with the operating system and its programs.

Two common forms are:

  • Character-based interface: Users type commands using text.

  • Graphical user interface: Users interact with windows, icons, menus, pointers, and other visual elements.

System Utilities

System utilities support maintenance and management tasks. Examples include antivirus programs, backup tools, disk cleaners, and performance-monitoring tools.


Functions of an Operating System

Resource Management

The operating system manages the computer’s physical and logical resources, including:

  • Memory management: Allocates and releases memory for programs and data.

  • Processor management: Determines which programs receive processing time.

  • Storage management: Organizes files and controls access to storage devices.

  • Device management: Controls input, output, and communication devices.

Process Management

A process is a program that is currently being executed. The operating system:

  • Starts and stops processes.

  • Allocates processor time.

  • Allows several processes to run apparently at the same time.

  • Coordinates communication between processes.

  • Prevents processes from interfering improperly with one another.

Storage Management

The operating system manages files and directories on secondary storage. It keeps track of where data is stored and provides programs with controlled access to files.

Device Management

The operating system coordinates communication with hardware devices through device drivers. It controls when devices receive requests and how data moves between devices and the rest of the computer.

Performance Monitoring

The operating system monitors system performance, including processor use, memory use, storage activity, and device activity. This helps identify overloads, errors, and inefficient processes.

Job Scheduling

Job scheduling determines the order in which tasks or processes are performed. Because many programs may request the processor simultaneously, the operating system must decide which task receives attention and for how long.

Security

The operating system protects data and resources by:

  • Controlling user access.

  • Authenticating users.

  • Managing permissions.

  • Preventing unauthorized use of files and devices.

  • Isolating processes when necessary.

Startup

During startup, the operating system is loaded into memory and begins controlling the computer’s hardware and software environment.

Running Applications

The operating system loads application programs, provides them with resources, and supervises their execution.

Programs may run in different contexts:

  • Foreground: The program currently visible or directly controlled by the user, such as a PDF reader displayed on the screen.

  • Background: Programs or services that continue running without being the main visible application.


Categories of Operating Systems

Operating systems perform broadly similar functions, but their algorithms and methods may differ depending on the type of device and its requirements.

Embedded Operating Systems

An embedded operating system is designed for a specialized device rather than a general-purpose computer.

Examples include systems used in:

  • Smartphones.

  • Cable television boxes.

  • Smart appliances.

  • Digital cameras.

  • Industrial control devices.

  • Automobile systems.

Embedded systems often have limited memory, processing power, and storage. They are usually designed to perform a specific set of functions efficiently.

Network Operating Systems

A network operating system manages and supports computers, servers, and other devices connected through a network.

It may provide services such as:

  • User and account management.

  • File sharing.

  • Printer sharing.

  • Network security.

  • Communication between computers.

  • Management of multiple servers.

UNIX and related server-oriented systems are examples of operating systems commonly used in networked environments.

Desktop or Standard Operating Systems

A desktop operating system is designed for general-purpose personal computers. It supports many applications and provides users with a broad range of functions.

Examples include:

  • Windows.

  • macOS.

  • UNIX.

  • Linux.

The suitability of an operating system depends on the user’s needs, hardware, available applications, cost, familiarity, and compatibility. A system may be widely used because it is readily available and supported, not necessarily because it is superior in every technical aspect.

Mobile Operating Systems

Mobile operating systems are designed for smartphones and other portable devices. They must support touchscreens, wireless communication, battery efficiency, mobile applications, and compact hardware.

Examples include:

  • Android.

  • iPhone operating systems.

  • BlackBerry operating systems.

  • Symbian.

  • Windows Phone.


Computer Systems

Definition of a Computer System

A computer system is a system that accepts input, processes the input, and produces output through a combination of hardware and software.

The general operation of a computer system is:

  1. Input: Data or instructions enter the system.

  2. Processing: The processor and software manipulate the input.

  3. Output: The system produces a result.

  4. Storage: Data or results may be saved for later use.

The input and output devices depend on the purpose and available resources of the system.

Examples include:

  • A typical computer may use a keyboard and mouse for input and a monitor for output.

  • A presentation system may use a keyboard for input and a projector for output.

  • A smartwatch may receive input through a touchscreen or sensors and provide output through its display or vibration.

  • A calculator accepts numerical input, processes it, and displays the result.

Therefore, a system does not need to resemble a traditional desktop computer to qualify as a computer system.


Top-Level Structure of a Computer System

A computer system has four major structural elements:

  1. Processor.

  2. Main memory.

  3. Input/output modules.

  4. System bus.

The diagram represents the processor, memory, and input/output components connected through communication pathways.

Processor

The processor, also called the central processing unit, controls computer operations and performs data-processing functions.

It:

  • Performs arithmetic calculations.

  • Performs logical comparisons.

  • Executes program instructions.

  • Controls the sequence of operations.

  • Communicates with memory and input/output devices.

Processors such as Intel and AMD processors are examples of CPUs. The best processor depends on the intended use of the computer. A processor suitable for ordinary office work may not be ideal for gaming, scientific calculations, video editing, or other specialized tasks.

Main Memory

Main memory stores the programs and data that the processor is actively using. It is also called primary memory.

The main memory generally associated with active program execution is RAM, or random-access memory. RAM is volatile, meaning its contents are normally lost when the computer is turned off.

Main memory is faster than secondary storage, but it usually has less capacity. When a program is opened, the operating system transfers the required program instructions and data from secondary storage into main memory so that the processor can access them more quickly.

Input/Output Modules

Input/output modules manage communication between the computer and the external environment.

They may connect the computer to:

  • Keyboards.

  • Mice.

  • Joysticks.

  • Scanners.

  • Monitors.

  • Projectors.

  • Printers.

  • Secondary storage devices.

  • Communication equipment.

Input/output modules act as an organized connection between external devices and the processor or memory.

System Bus

The system bus is a communication pathway that transfers data, instructions, and control information between the processor, main memory, and input/output modules.

It allows communication such as:

  • Processor to main memory.

  • Main memory to processor.

  • Input/output device to processor.

  • Processor to an output device.

  • Memory to an input/output module.

The system bus can be compared to a transportation route within the computer: it carries information from one component to another.


Input/Output Buffers

Meaning of a Buffer

A buffer is a small temporary memory area that stores data while it waits to be transferred or processed.

Input/output modules use buffers because the system bus or processor may be busy when an input arrives.

For example:

  1. A user types a name using the keyboard.

  2. The input/output module receives the characters.

  3. The system bus is temporarily busy handling another operation.

  4. The characters are stored in a buffer.

  5. When the bus becomes available, the buffered data is sent to the processor or main memory.

Without a buffer, data could be lost whenever an input device produces information faster than the computer can immediately process it.

Buffers are usually:

  • Small in size.

  • Temporary in purpose.

  • Used to handle differences in timing or speed between devices.


Memory Organization

Secondary Memory

Secondary memory is long-term, nonvolatile storage. It retains data even when the computer is turned off.

Examples include:

  • Hard disk drives.

  • Solid-state drives.

  • External storage devices.

Secondary memory stores:

  • The operating system.

  • Installed applications.

  • Documents.

  • Images.

  • Videos.

  • Music.

  • User data.

  • Saved projects.

Secondary memory normally has a much larger capacity than RAM, but it is slower for active processing.

RAM and Active Programs

When the user starts a program, the operating system copies the necessary program instructions and data from secondary storage into RAM.

For example, if a user opens a web browser and a PDF reader:

  • The browser’s instructions are loaded into RAM.

  • The PDF reader’s instructions are loaded into RAM.

  • The data required by both programs is also placed in RAM.

  • The operating system and other active data remain available in RAM as well.

The processor works primarily with the instructions and data available in main memory. RAM is used because it provides faster access than secondary storage.

Relationship Between Capacity and Speed

Computer memory exists in a hierarchy. In general:

  • Large-capacity memory is usually slower.

  • Small-capacity memory is usually faster.

  • The processor needs very fast memory to operate efficiently.

A hard disk may store a very large amount of information but cannot provide data to the CPU as quickly as registers or cache memory. RAM is faster than secondary storage, while processor registers are faster and smaller than RAM.


Processor Registers

Definition

A processor register is a small, high-speed storage location inside the processor.

Registers hold information that the processor is currently using. They are:

  • Faster than main memory.

  • Smaller in capacity than main memory.

  • Located inside or closely associated with the processor.

  • Used to hold instructions, addresses, data, and status information.

Registers help maintain a balance between the processor and memory. A processor can execute a very large number of instructions in a short time, so it needs extremely fast storage for immediate operations.

Registers are commonly described by the number of bits they can hold:

  • An 8-bit register holds 888 bits.

  • A 32-bit register holds 323232 bits.

  • Since 888 bits equal 111 byte, an 8-bit register holds 111 byte.

Types of Processor Registers

Processor registers are divided into two broad categories:

  1. User-visible registers.

  2. Control and status registers.

User-Visible Registers

User-visible registers can be accessed or manipulated by machine instructions. They support normal program operations and may hold data, addresses, or condition information.

The main types are:

  • General-purpose registers.

  • Data registers.

  • Address registers.

  • Condition-code registers.

Control and Status Registers

Control and status registers are used by the processor to control execution and record the current state of the computer. They are generally managed automatically by the processor rather than directly manipulated by ordinary user programs.


User-Visible Registers

General-Purpose Registers

General-purpose registers can store a variety of information, including:

  • Data values.

  • Addresses.

  • Variables.

  • Temporary results.

  • Intermediate calculation values.

They are flexible and can be used for many different instructions.

Data Registers

Data registers hold data values used during processing.

They may store:

  • Integers.

  • Characters.

  • Small data items.

  • Floating-point values, depending on the processor architecture.

For example, when the processor adds two numbers, the numbers or intermediate results may be placed in data registers.

Address Registers

Address registers store memory addresses. They help the processor locate instructions and data in memory.

Examples include:

  • Index registers.

  • Segment pointers.

  • Stack pointers.

Condition-Code Registers

Condition-code registers are also called flag registers. They contain individual bits that describe the result or status of an operation.

A flag may indicate conditions such as:

  • A result being zero.

  • A result being negative.

  • An arithmetic carry occurring.

  • An arithmetic overflow occurring.

  • A comparison being true or false.

Programs can use these flags to make decisions, such as whether to follow the true or false branch of a conditional statement.


Index Registers

An index register helps calculate an effective memory address by combining a base address with an offset.

The general idea is:

Effective address=Base address+Index or offset\text{Effective address} = \text{Base address} + \text{Index or offset}Effective address=Base address+Index or offset

Large memory addresses can be difficult to handle repeatedly. Instead, a program can store a common base address and use a smaller index value to identify a particular location relative to that base.

This approach is useful for:

  • Accessing elements of an array.

  • Processing a sequence of records.

  • Moving through a block of memory.

  • Locating data at regular positions.

The index value acts like a shortened reference to a location, while the base address supplies the common part of the full address.

Segment Pointers

A segment pointer is associated with segmented memory organization. In this approach, memory is divided into segments, which are variable-length blocks.

A segment pointer helps identify the segment containing a particular instruction or data item. The detailed operation of segmented memory depends on the processor architecture.

Stack Pointers

A stack pointer stores the address of the top or most recently added item in a stack.

A stack is used to manage information such as:

  • Function calls.

  • Return addresses.

  • Local variables.

  • Temporary values.

  • Program execution states.

The stack pointer changes as items are placed onto or removed from the stack. It enables the processor to keep track of the most recent stack activity.


Control and Status Registers

Control and status registers help the processor manage instruction execution and communicate with memory and input/output devices.

Program Counter

The program counter, also called the instruction counter, stores the address of the next instruction to be fetched and executed.

Its operation can be summarized as follows:

  1. The program counter identifies the next instruction.

  2. The instruction is fetched from memory.

  3. The program counter is updated to identify the following instruction.

  4. The processor continues execution.

Normally, the counter advances sequentially. However, a jump, branch, function call, or conditional statement can change it to a different address.

Instruction Register

The instruction register stores the instruction currently being executed.

The processor uses the instruction register to:

  • Hold the fetched instruction.

  • Decode the instruction.

  • Determine what operation must be performed.

  • Identify the required operands or resources.

Memory Address Register

The memory address register stores the address in memory that the processor intends to access.

It identifies the location for operations such as:

  • Reading an instruction.

  • Reading data.

  • Writing data.

Memory Buffer Register

The memory buffer register temporarily stores data being transferred between the processor and main memory.

It may contain:

  • Data read from memory.

  • Data waiting to be written to memory.

  • An instruction being transferred into the processor.

Input/Output Address Register

The input/output address register identifies the input/output device or port involved in a transfer.

It allows the processor and operating system to specify which device should receive data or provide data.

Input/Output Buffer Register

The input/output buffer register temporarily holds data being transferred between the processor and an input/output device.

It supports communication with devices such as keyboards, mice, printers, and scanners.

Program Status Word

A processor may combine important status information into a program status word. This information can include:

  • Condition flags.

  • Execution state.

  • Interrupt status.

  • Privilege or operating mode.

  • Other control information.

The program status word helps the processor record and manage the current state of program execution.


Instruction Execution

Programs and Instructions

A program consists of a sequence of instructions stored in memory. When the program runs, the processor processes those instructions according to their order and control flow.

For example, a program containing 500500500 instructions may be loaded into main memory. The processor does not execute all instructions simultaneously. It repeatedly fetches and processes instructions as part of an instruction cycle.

Basic Instruction Cycle

The basic instruction cycle consists of four stages:

  1. Fetch: Obtain the next instruction from memory.

  2. Decode: Interpret the instruction and determine what operation it specifies.

  3. Execute: Perform the operation.

  4. Repeat: Continue with the next instruction until the program ends or another control operation occurs.

Fetch

The program counter identifies the address of the next instruction. The processor retrieves that instruction from main memory and places it in the instruction register.

Decode

The processor interprets the instruction. It determines:

  • Which operation is required.

  • Which data is needed.

  • Where the data is located.

  • Which registers or devices are involved.

“Decode” can also refer to translating programming instructions from a human-readable language into machine-understandable instructions. At execution time, the processor decodes the machine-level instruction stored in the instruction register.

Execute

The processor performs the operation specified by the instruction. The operation may involve:

  • Arithmetic.

  • Logical comparison.

  • Moving data.

  • Reading from memory.

  • Writing to memory.

  • Communicating with an input/output device.

  • Changing the sequence of execution.

Repeat

After execution, the processor checks whether more instructions remain. If execution should continue, it fetches the next instruction. If a branch or conditional operation occurs, the next instruction may be located somewhere else in memory.

Execution ends when:

  • The final instruction is completed.

  • A termination instruction is reached.

  • The program encounters an appropriate exit condition.

  • The operating system stops the program.

Sequential and Conditional Execution

Instructions are often executed sequentially:

  • Instruction 1.

  • Instruction 2.

  • Instruction 3.

  • Instruction 4.

However, programs commonly contain conditions, loops, and jumps. For example, an if-else statement may cause the processor to skip from one instruction to another rather than executing every instruction in between.

Thus, the processor follows the program’s control flow rather than always executing memory locations in simple numerical order.


Integrated View of Computer Operation

The major components work together during program execution:

  1. A program is stored in secondary memory.

  2. The operating system loads the required program and data into RAM.

  3. The program counter identifies the first instruction.

  4. The processor fetches the instruction through the system bus.

  5. The instruction is placed in the instruction register.

  6. The processor decodes and executes the instruction.

  7. Data may be read from or written to registers, RAM, secondary storage, or input/output devices.

  8. Buffers temporarily hold information when a device or communication pathway is busy.

  9. The program counter identifies the next instruction.

  10. The fetch-decode-execute cycle continues until the program finishes.

The processor, memory, input/output modules, and system bus form the basic hardware structure, while the operating system coordinates access to these components. Registers provide the processor with extremely fast temporary storage, and the instruction cycle explains how programs are carried out one instruction at a time.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent