Skip to the content

Topics Covered

Applications of Computers Components CPU Input / Output Memory & Storage Programming Languages Files & Folders Software Types Operating Systems
On this page
  1. 1. Basic Applications of a Computer
  2. 2. Components of a Computer System
  3. 3. Central Processing Unit (CPU)
  4. 4. Input and Output Units
  5. 5. Computer Memory and Mass Storage
  6. 6. Programming Languages and Their Applications
  7. 7. Concept of Files and Folders
  8. 8. Software and Types of Software
  9. 9. Operating Systems — Windows and Linux
  10. Key Take-aways from Unit 1

1. Basic Applications of a Computer

DEFINITION

A computer is an electronic device that accepts data (raw facts) as input, processes it according to a set of stored instructions (a program), and produces meaningful information as output. The cycle is summarised as Input → Process → Output (the IPO model), supported by storage.

Major application areas relevant to a statistics student:

EXAMPLE 1

A researcher records the heights of 500 students in a spreadsheet (input), the computer calculates the mean and standard deviation (process), and prints a histogram (output) — a complete IPO cycle.

EXAMPLE 2

An ATM takes your card and PIN (input), checks the balance and debits the account (process), and dispenses cash plus a receipt (output).

2. Components of a Computer System

THE FIVE FUNCTIONAL UNITS
  1. Input unit — feeds data and instructions into the computer.
  2. Memory (storage) unit — holds data, instructions and results.
  3. Arithmetic & Logic Unit (ALU) — performs calculations and comparisons.
  4. Control unit (CU) — directs and coordinates all operations.
  5. Output unit — delivers processed information to the user.

The ALU and CU together form the Central Processing Unit (CPU).

2.1 A simple block diagram

Input Control Unit ALU CPU Output Memory Unit
EXAMPLE 1

When you type 2 + 3 on a calculator: keypad = input unit, the chip's ALU adds, the CU sequences the steps, the register = memory, and the display = output unit.

EXAMPLE 2

In R, the statement mean(c(4, 8, 6)) uses the keyboard (input), RAM holds the vector (memory), the CPU computes the average (ALU + CU), and the console prints 6 (output).

3. Central Processing Unit (CPU)

DEFINITION

The CPU ("the brain of the computer") executes program instructions. It has three parts: the ALU (arithmetic such as +, −, ×, ÷ and logic such as <, >, =), the Control Unit (fetch–decode–execute cycle), and registers (tiny, very fast storage inside the CPU).

CPU speed is measured in gigahertz (GHz) — billions of cycles per second. Modern CPUs are multi-core (several processing units on one chip) enabling parallel computation, which R can exploit through packages like parallel.

4. Input and Output Units

Input devicesOutput devices
Keyboard, mouse, scanner, microphone, webcam, touch screen, barcode reader Monitor, printer, speaker, projector, plotter

Some devices are both input and output — e.g. a touch screen, or a modem (modulates outgoing and demodulates incoming signals).

5. Computer Memory and Mass Storage

5.1 Primary vs Secondary memory

Primary memorySecondary memory
ExamplesRAM, ROM, cacheHard disk (HDD), SSD, USB drive, CD/DVD
Volatile?RAM volatile (lost on power-off); ROM non-volatileNon-volatile (retains data)
SpeedVery fastSlower
PurposeTemporary working store for the CPUPermanent / long-term storage

5.2 Units of memory

1 Byte = 8 bits; 1 KB = 1024 B; 1 MB = 1024 KB; 1 GB = 1024 MB; 1 TB = 1024 GB.

EXAMPLE 1

A dataset of 1,000,000 numeric values stored as 8-byte doubles needs about \(1{,}000{,}000 \times 8 = 8{,}000{,}000\) bytes ≈ 7.63 MB of RAM — comfortably handled by a modern laptop.

EXAMPLE 2

RAM is volatile: if R is holding a large data frame and the power fails, the object is lost unless it was saved to a secondary device with saveRDS() or write.csv().

6. Programming Languages and Their Applications

DEFINITION

A programming language is a formal set of rules for writing instructions a computer can execute. Languages are classified by closeness to hardware:

LanguageTypical application
RStatistics, data analysis, visualisation
PythonGeneral programming, data science, machine learning
C / C++System software, high-performance computing
JavaEnterprise & Android applications
SQLDatabase querying

A compiler translates the whole program at once (C, C++); an interpreter translates and runs line-by-line (R, Python) — which is why you get immediate results in the R console.

7. Concept of Files and Folders

DEFINITION

A file is a named collection of related data stored on a device (e.g. data.csv, report.docx). A folder (directory) is a container that organises files and sub-folders into a tree (hierarchical) structure.

The file extension indicates the type and the program that opens it: .csv (comma-separated data), .xlsx (Excel), .R (R script), .txt (plain text), .docx (Word), .pdf (portable document).

EXAMPLE 1

The path C:\Stats\survey\heights.csv means: drive C → folder Stats → sub-folder survey → file heights.csv.

EXAMPLE 2

In R, the working directory is the default folder for reading/writing files. Check it with getwd() and change it with setwd("C:/Stats/survey") — then read.csv("heights.csv") finds the file without a full path.

8. Software and Types of Software

DEFINITION

Software is the set of programs and associated data that tell the hardware what to do. It is broadly of two kinds:

Software is also classified by licensing:

EXAMPLE 1

Windows is system software (it manages the machine); MS-Excel running on top of it is application software.

EXAMPLE 2

R is open-source application software for statistics; the C compiler that R itself is built with is system software (a language translator).

9. Operating Systems — Windows and Linux

DEFINITION

An operating system (OS) is system software that manages hardware and software resources and provides services to applications. Core functions: process management, memory management, file management, device (I/O) management, security and a user interface.

FeatureWindowsLinux
LicenceProprietary (Microsoft)Open-source (free)
InterfaceMainly graphical (GUI)Powerful command line + GUI
CostPaidFree
Common usePersonal computing, officesServers, data science, supercomputers
Stability / securityGoodVery high; widely used for hosting R/Python pipelines
EXAMPLE 1

R runs identically on Windows and Linux — a script written on a Windows laptop runs unchanged on a Linux server, because R is cross-platform.

EXAMPLE 2

Cloud data-analysis platforms (e.g. RStudio Server, Posit Cloud) typically run on Linux, so familiarity with basic Linux commands (ls, cd, pwd) is useful for analysts.

Key Take-aways from Unit 1