CresignSys Learn — Lesson 014

Written by

in

Course: From Basic Science to Web Hosting

Module 03 — Computer Fundamentals

What Is a Computer?

Difficulty: Beginner → Intermediate
Prerequisites: Lesson 013 — What Is Binary?
Estimated time: 30 minutes


1. The Big Question

We now know:

Transistor
 ↓
Switch
 ↓
0 / 1
 ↓
Bit
 ↓
Data

But how do billions of these tiny electrical switches become something that can:

  • run Linux,
  • run WordPress,
  • process network traffic,
  • execute PHP,
  • store databases,
  • and serve websites?

The answer is:

A Computer Is a System for Processing Information

A simplified model is:

INPUT
  ↓
PROCESSING
  ↓
MEMORY
  ↓
OUTPUT

But a real computer is more accurately understood as several cooperating subsystems.


2. The Basic Computer Model

A simplified computer contains:

                 COMPUTER
                    │
       ┌────────────┼────────────┐
       ↓            ↓            ↓
     CPU          Memory       I/O
       │            │            │
       └────────────┼────────────┘
                    ↓
                 Storage

The major components are:

CPU
RAM
Storage
Input/Output
Interconnects
Power

3. CPU

CPU means:

Central Processing Unit

The CPU executes instructions.

Conceptually:

Instruction
    ↓
CPU
    ↓
Operation
    ↓
Result

The CPU contains structures such as:

Control logic
Arithmetic logic
Registers
Caches
Execution units

4. The CPU Is Made From Transistors

Remember:

Transistor
 ↓
Logic gate
 ↓
Digital circuit
 ↓
CPU

So the CPU is ultimately a highly complex semiconductor circuit.

Conceptually:

Silicon
 ↓
Transistors
 ↓
Logic gates
 ↓
Functional units
 ↓
CPU

5. What Does the CPU Actually Do?

A CPU repeatedly performs operations according to instructions.

A simplified instruction cycle is:

FETCH
  ↓
DECODE
  ↓
EXECUTE
  ↓
WRITE BACK
  ↓
NEXT INSTRUCTION

This happens extremely rapidly.


6. Fetch

The CPU needs to obtain an instruction.

Conceptually:

Memory
  ↓
Instruction
  ↓
CPU

The CPU uses a special register called the:

Program Counter

It indicates where the next instruction is located in the program’s address space.


7. Decode

The CPU determines what the instruction means.

For example, conceptually:

Instruction
     ↓
Decode
     ↓
ADD

or:

Instruction
     ↓
Decode
     ↓
LOAD

or:

Instruction
     ↓
Decode
     ↓
JUMP

The exact instructions depend on the CPU architecture.


8. Execute

The CPU performs the operation.

For an addition:

5 + 3

Conceptually:

Registers
   ↓
ALU
   ↓
Addition
   ↓
Result = 8

9. ALU

ALU means:

Arithmetic Logic Unit

It performs operations such as:

Addition
Subtraction
AND
OR
XOR
Comparison
Bit operations

Conceptually:

        ┌─────────────┐
Input → │     ALU     │ → Result
        └─────────────┘

10. Registers

Registers are very fast storage locations inside the CPU.

They hold values needed during computation.

Conceptually:

Register A → 5
Register B → 3

        ↓

ALU

        ↓

Register C → 8

Registers are much smaller than main memory but extremely important for CPU execution.


11. Memory

The CPU needs somewhere to store instructions and data.

This is where memory comes in.

A simplified hierarchy:

CPU registers
     ↓
CPU cache
     ↓
RAM
     ↓
SSD / storage

As we move downward:

Capacity generally increases
Access speed generally decreases

There are important architectural nuances, but this is a useful beginner model.


12. RAM

RAM means:

Random Access Memory

RAM is working memory used by the computer while programs are running.

For example:

Linux
 ↓
RAM

Nginx
 ↓
RAM

PHP
 ↓
RAM

WordPress
 ↓
RAM

RAM is generally volatile.

That means its contents normally disappear when power is removed.


13. Storage

Storage keeps data persistently.

Examples:

SSD
Hard disk
Flash storage

Conceptually:

Storage
 ↓
Files
 ↓
Operating system
 ↓
Applications
 ↓
Website
 ↓
Database

Unlike ordinary RAM, persistent storage retains information when power is removed.


14. RAM vs Storage

This distinction is extremely important for server administration.

RAMStorage
Working memoryPersistent data
Usually volatileNon-volatile
Very fastSlower than CPU registers/cache
SmallerUsually larger
Running programs use itFiles are stored here

For example:

WordPress files
      ↓
SSD

Running WordPress/PHP processes
      ↓
RAM

15. Input and Output

A computer also needs to communicate with the outside world.

Examples:

Keyboard
Mouse
Display
USB
Network interface
Disk controller

For a server, the network interface is particularly important.

Internet
   ↓
Network interface
   ↓
Server

16. Interconnects

Computer components need to communicate.

For example:

CPU
 ↕
Memory
 ↕
Storage
 ↕
Network

These connections use electrical signaling and protocols.

At the lowest level:

Transistors
 ↓
Electrical signals
 ↓
Digital interfaces
 ↓
Computer buses/interconnects

17. The Motherboard

In a traditional physical computer, the motherboard provides much of the physical infrastructure connecting components.

Conceptually:

             CPU
              │
       ┌──────┼──────┐
       ↓      ↓      ↓
      RAM   Storage  Network

Modern systems can integrate many of these functions into a smaller number of chips, but the conceptual organization remains useful.


18. Power

None of this works without energy.

The power system converts electrical energy into appropriate voltage/current rails for the components.

Conceptually:

Electrical supply
      ↓
Power supply
      ↓
Voltage regulation
      ↓
CPU / RAM / SSD / Network

19. Computer Hardware vs Software

This distinction is essential.

Hardware

Physical components:

CPU
RAM
SSD
Motherboard
Network interface

Software

Instructions and data:

Operating system
Applications
Libraries
Configuration
Website
Database

So:

Hardware
   +
Software
   ↓
Computer system

20. What Is an Operating System?

The hardware needs software that manages resources and provides useful abstractions.

That software is the:

Operating System

Examples:

Linux
Windows
macOS
Android

For your web hosting environment, the important one is:

Linux


21. What Does Linux Do?

Linux manages hardware resources and provides interfaces for applications.

Conceptually:

Applications
      ↓
System calls
      ↓
Linux kernel
      ↓
Hardware

For example:

Nginx
 ↓
Linux
 ↓
Network hardware

22. What Is the Kernel?

The kernel is the central privileged part of an operating system.

It manages resources such as:

CPU
Memory
Processes
Devices
Networking
Filesystems

Conceptually:

Applications
      ↓
Kernel
      ↓
Hardware

23. What Is a Process?

When you start a program, the operating system creates a running execution context called a process.

For example:

Nginx program
      ↓
Nginx processes

Similarly:

PHP program
      ↓
PHP-FPM processes

A process has things such as:

Code
Memory
State
Resources
Identifiers

24. What Is a Program?

A program is a set of instructions and associated data that can be executed by a computer.

Conceptually:

Program
 ↓
Machine instructions
 ↓
CPU
 ↓
Execution

25. What Is a File?

A file is a persistent representation of data managed by a filesystem.

Examples:

index.html
style.css
wp-config.php
image.jpg
database backup

On Linux:

/storage/websites/

is simply part of the filesystem hierarchy.


26. What Is a Filesystem?

A filesystem organizes persistent data into structures such as:

Directories
Files
Metadata
Permissions

Conceptually:

Disk
 ↓
Filesystem
 ↓
Directories
 ↓
Files

For example:

/storage/websites/templates.cresignsys.com/public/

can be understood as a path through the Linux filesystem.


27. What Is a Server?

A server is not necessarily a special type of physical machine.

A server is fundamentally a system that provides a service to clients.

For example:

Web server
DNS server
Database server
Mail server
File server

Your computer can technically act as a server.


28. What Makes a Computer a Web Server?

Install web-server software.

For example:

Computer
   ↓
Linux
   ↓
Nginx
   ↓
Web service

Nginx listens for network requests and sends appropriate responses.


29. Client and Server

Suppose you open:

https://templates.cresignsys.com

Your browser is the:

CLIENT

Your hosting machine is the:

SERVER

Conceptually:

Browser
   │
   │ Request
   ↓
Internet
   │
   ↓
Server
   │
   │ Response
   ↓
Browser

30. The Web Server Stack

Your website can involve several software layers:

Internet
   ↓
Network interface
   ↓
Linux
   ↓
Nginx
   ↓
PHP-FPM
   ↓
WordPress
   ↓
MySQL

Each component has a different responsibility.


31. Nginx

Nginx is web-server/reverse-proxy software.

It can:

Receive HTTP/HTTPS requests
Serve static files
Proxy requests
Handle TLS
Route requests
Manage connections

32. PHP

WordPress is primarily written in PHP.

Conceptually:

Browser
 ↓
Nginx
 ↓
PHP-FPM
 ↓
WordPress PHP code
 ↓
Response

33. MySQL

WordPress needs a database.

Conceptually:

WordPress
    ↓
Database query
    ↓
MySQL
    ↓
Data
    ↓
WordPress

The database can contain:

Posts
Pages
Users
Settings
Metadata
Plugins' data

34. Your Hosting Stack

The system you are building can therefore be visualized as:

PHYSICAL / CLOUD INFRASTRUCTURE
             ↓
        Virtual Machine
             ↓
           Ubuntu
             ↓
          Linux Kernel
             ↓
         File System
             ↓
           Nginx
          /     \
       HTTPS    HTTP
         ↓
      PHP-FPM
         ↓
     WordPress
         ↓
       MySQL
         ↓
       Website

35. The Complete Journey

You have now travelled from basic physics to a real web-hosting architecture:

Matter
 ↓
Atom
 ↓
Electron
 ↓
Electric charge
 ↓
Electric field
 ↓
Voltage
 ↓
Current
 ↓
Circuit
 ↓
Semiconductor
 ↓
Transistor
 ↓
Logic
 ↓
Binary
 ↓
CPU
 ↓
Computer
 ↓
Operating System
 ↓
Linux
 ↓
Networking
 ↓
Internet
 ↓
HTTP/HTTPS
 ↓
Nginx
 ↓
PHP
 ↓
WordPress
 ↓
MySQL
 ↓
Website
 ↓
Web Hosting

This is the CresignSys Learn technology path.


36. Next Level

The next lesson should not jump directly to web hosting yet.

We should understand the layer immediately above the computer hardware:

Lesson 015 — What Is an Operating System?

We will go deeply into:

Computer hardware
       ↓
Boot process
       ↓
Firmware
       ↓
Bootloader
       ↓
Linux kernel
       ↓
Operating system
       ↓
Processes
       ↓
Memory
       ↓
Filesystems
       ↓
Users
       ↓
Permissions
       ↓
Services
       ↓
Commands

Then we will connect it directly to the commands you are already using on your Ubuntu web-hosting server.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *