How Computers Work: The Software Story Behind the Magic – Part 2

Ibrahim WaelIbrahim Wael
14 min read

Introduction: Bridging Hardware and Software

In Part 1, we explored the tangible components that constitute a computer's hardware. We delved into the roles of the Central Processing Unit (CPU), memory (RAM and storage), and input/output devices. These physical elements work in unison to process data and execute tasks. The CPU, often termed the "brain" of the computer, performs calculations and follows instructions, while memory stores data temporarily or permanently, and input/output devices facilitate interaction with the user.

and if you don’t read “How Computers Work: The Hardware Story Behind the Magic - Part 1” can read it from here

What Is Software Really?

Most people think software is just "apps and programs" - something you download, install, and click on. But software is far more than what you see on the screen.

Software exists at many levels:

  • Low-level software talks directly to hardware

  • Operating systems manage resources and provide services

  • Applications perform tasks for users

  • Drivers translate between the OS and specific hardware

Think of software as a series of translators, each speaking to the layer below and above it.

A Brief Journey Through Software History

  • 1940s: Computers were programmed directly in machine language (just 1s and 0s)

  • 1957: IBM introduced FORTRAN, the first high-level programming language

  • 1962: COBOL made programming more business-friendly

  • 1970s: Unix OS introduced, along with C and C++ languages

  • 1980: Bill Gates introduced DOS

  • 1980s: Richard Stallman's GNU project led to Linux

  • 1985: First Windows OS launched

  • 2000s-Present: Web, mobile, and cloud software explosion

Today, software powers everything from smartphones to smart fridges, AI systems, and quantum computers.

Types of Software

  1. System Software

    A system software helps the user and the hardware device to function and interact with each other. Basically, it is a type of software which is used to manage the department of a computer hardware to provide the very basic functionalities that are required by the user.

    • Operating Systems
      It is a collection of software that handles resources and provides general services for the other applications that run over them.

      • Examples: Windows, Linux, macOS

      • Manages hardware, user interface, resources.

    • Device Drivers
      It is a type of software that controls the hardware device which is attached to the system.

      • Allow the OS to communicate with hardware components.
    • Firmware
      It is the permanent software that is embedded into a read-only memory. It is a set of instructions permanently stored on a hardware device. It provides essential information regarding how the device interacts with other hardware.

      • Low-level software embedded in hardware (e.g., BIOS).
    • Utilities

      • This software is designed to aid in analyzing, optimizing, configuring and maintaining a computer system. It supports the computer infrastructure.
  1. Programming Language Translators

    Convert high-level programming code into machine-level instructions (e.g., compilers, interpreters).

  2. Application Software

    Programs that perform specific user tasks (e.g., web browsers, games, office apps).

Software Life cycle

The Software Development Life Cycle is a structured process that software developers follow to build high-quality software efficiently and predictably. It breaks down software creation into clear stages from the initial idea to the finished product and ongoing maintenance.

THE SOFTWARE DEVELOPMENT LIFE CYCLE :

1. Planning : This is where the project starts. The team defines the purpose of the software, sets goals, estimates time and cost, and decides what resources are needed. It’s like creating a roadmap before a journey.

2. Analysis : In this stage, the team gathers detailed requirements by talking to users and stakeholders. They find out exactly what the software must do and document these needs clearly to avoid misunderstandings later.

3. Design : Based on the requirements, the software’s structure is designed. This includes planning how different parts will work together, what technologies to use, and preparing diagrams or blueprints. It’s like designing a building before construction.

4. Implementation : Here, programmers write the actual code to build the software. Developers turn the designs and plans into a working product by creating features and functionalities.

5. Testing : After coding, the software is tested thoroughly to find and fix bugs, errors, and security issues. This step ensures the software works as intended and is reliable.

6. Maintenance : Once the software is released, it needs ongoing support. This stage involves fixing issues found by users, updating features, and improving performance over time to keep the software useful and secure.

Software development life-cycle (SDLC) | by Artjoms Prokopiško | Medium

This cycle helps create software that meets user needs, stays reliable, and can evolve with changing requirements.

The Role of Operating Systems

An operating system (OS) is the layer of software that sits directly on top of hardware and provides a “home base” for all other programs. Think of it as the manager or conductor that allocates system resources, keeps processes from colliding, and offers a standard set of services that applications rely on. Without an OS, each program would need to know exactly how to talk to every piece of hardware—and every program would have to reinvent basic functionality like displaying text or reading from disk. Instead, the OS handles these details, letting applications simply request services through well-defined interfaces.

Operating System Overview

An operating system ensures that multiple applications can share a single processor by scheduling when each program gets CPU time, seamlessly switching between them so your software appears to run simultaneously.

CPU Management (Process Scheduling)

The OS decides which program gets to use the CPU and for how long. It rapidly switches between programs (thousands of times per second) making it appear that multiple programs run simultaneously.
Example: When you're listening to music while browsing the web, the OS gives tiny time slices to each program - a few milliseconds to the music player, then to the browser, then back to the music player.

Memory Management

The OS allocates RAM to different programs and keeps track of what's stored where. It uses virtual memory to make programs think they have more RAM than physically available.
Example: If you open too many browser tabs, the OS might move some data to the hard drive temporarily, freeing up RAM for active programs.

Memory Management in Operating System | GeeksforGeeks

Hardware Communication

When programs need to use hardware, they ask the OS, which uses device drivers to communicate with specific components.
Example: When you save a file, your word processor asks the OS to write data. The OS uses the hard drive's driver to translate this request into the specific commands that drive needs.

Security and Protection

The OS controls which programs can access which hardware resources, preventing malicious software from damaging your system.

Resource Optimization

The OS monitors system performance and adjusts hardware settings (like CPU speed and device power states) to balance performance with energy consumption.

CPU Schedule - process statue.

If we don't fully understand the OS part, we will discuss it in depth in a separate upcoming blog.

Let's take a look at the journey of a computer from the time you press the power button to the moment it starts working.

How Your Computer Starts Up

When you press the power button, your computer goes through several steps to wake up and become ready to use. Think of it like waking up in the morning - there's a process your body follows, and computers have their own wake-up routine too.

Step 1: Getting Power

First, electricity flows to all the parts inside your computer. The power supply makes sure each component gets the right amount of power - just like how your heart pumps blood to different parts of your body.

Step 2: Checking Everything Works

Your computer has a built-in program that immediately checks if all the important parts are working properly. This is like doing a quick health check:

  • Is the memory (RAM) working?

  • Is the keyboard connected?

  • Is the hard drive there?

  • Can it see the screen?

If something is broken, your computer might beep to tell you there's a problem.

Step 3: Finding the Operating System

Once everything checks out, your computer looks for its "brain" - the operating system (like Windows, Mac, or Linux). It searches through connected storage devices to find where this software is stored.

Step 4: Loading the Operating System

When it finds the operating system, your computer loads it into memory. Think of this like loading a recipe into your mind before you start cooking. The operating system is the master program that controls everything else.

Step 5: Starting Everything Up

Finally, the operating system starts all the programs you see:

  • The desktop

  • Background programs

  • System services that keep things running smoothly

Now that we know the importance of OS and the big role it plays in modern computers, let's talk about translation from writing codes into machine language.

Programming Languages and Software Development

Compiler, Assembler, and Loader: The Translation Team

These three components work together to transform human-readable code into executable programs. Think of them as a translation chain that converts your programming ideas into instructions the computer can actually execute.

Compiler: The High-Level Translator

Compiler is system software which sits in the category of programming language translators. Any application programmer writes the source code,which is also known as a human readable code, in a High Level Languageusing an editor. Acomputer processor only understands the binary language, i.e., of 1’s and 0’s i.e., into the digital form. So, there is requirement of such intermediary software which would help a computer processor to understand into its own language.

Compiler - HPC Wiki

Assembler: The Assembly Language Translator

An assembler is a program that converts assembly language (human-readable machine instructions) into actual machine code (binary numbers).

Input: Assembly language code

MOV AX, 5     ; Move value 5 into register AX
ADD AX, 3     ; Add 3 to the value in AX
INT 21h       ; Call system interrupt

Output: Machine code (binary)

10110000 00000101  ; MOV AX, 5
00000100 00000011  ; ADD AX, 3
11001101 00100001  ; INT 21h

Two-Pass Assembly Process:

  1. First Pass: Identifies all labels and their addresses

  2. Second Pass: Generates actual machine code with correct addresses

Loader: The Program Launcher

A Loader is a program that receives the input of object code from linker and loads it to the main memory and makes it ready for final execution by the computer. The main function of a loader is to allocate the memory area for a program. In addition to this it also loads supporting libraries in operating system. Loading mechanism provides three types of approaches, Absolute Loading, Relocatable Loading, Direct runtime loading.

Linker : A Linker is a program that combines object files which are produced by the compiler or an assembler, and other parts of codes to invent an executable file.

User Interfaces

What is User Interface (UI)?

User Interface is everything you see, touch, and interact with when using a device or software. It's the visual and interactive layer that sits between you and the underlying system.

Types of User Interfaces

Command Line Interface (CLI)

  • Text-based interaction

  • Users type commands to perform tasks

  • Example: Windows Command Prompt, Terminal on Mac/Linux

  • Powerful but requires learning specific commands

Graphical User Interface (GUI)

  • Visual elements like windows, icons, and menus

  • Point-and-click interaction

  • Example: Windows desktop, macOS Finder

  • More intuitive for most users

Command Line Interface (CLI) | EECS 280 Tutorials

so How GUI Work

  • When your app wants a window or button, it asks a GUI toolkit (like Qt, GTK, or the Windows API) to create it. You don’t draw pixels yourself—just say “make a button here” and “show this text.”

  • The operating system’s window manager reserves space on the screen for each window and keeps track of which one is on top.

  • Whenever you click or type, the OS puts that event into a queue. Your app’s code checks the queue, sees “mouse click,” and decides what to do (e.g., run a function).

  • To redraw something—say, a button changing color—the app tells the OS “paint this rectangle” or “draw this icon.” The OS passes that to the graphics driver, which updates the screen.

  • Modern systems often use a compositor: each app draws offscreen, and the compositor blends all windows together before sending the final image to your monitor.

  • Behind the scenes, the graphics card handles the heavy lifting of turning those “draw” commands into pixels, so everything looks smooth and fast.

“When the driver finally writes pixels to the framebuffer, each pixel’s color is specified by three values red, green, and blue (RGB), which the monitor’s hardware then mixes to produce the exact shade you see.”

and we mention RGB In part 1 blog.

Software Architecture Intro

After we know the important of software to manage hardware and how it works, we need to gave a brief about software architecture

When you build a house, you don't just start putting up walls randomly. You need a blueprint - a plan that shows where each room goes, how they connect, and how the whole structure will work together. Software is exactly the same.

Software Architecture is the blueprint for building computer programs. It's the high-level plan that determines how different parts of software work together to create a functioning application.

Software architecture is the fundamental organization of a software system. It defines:

  • Components: The main building blocks of your software

  • Relationships: How these components connect and communicate

  • Structure: How everything is organized and arranged

  • Principles: The rules and guidelines that govern the design

We won't go into details as we will be blogging about this topic in the future.

Common Software Architecture Patterns

  1. Layered Architecture (Most Common)

Think of this like a building with different floors, where each floor has a specific purpose:

┌─────────────────────┐
│  User Interface     │ ← What users see and interact with
├─────────────────────┤
│  Business Logic     │ ← Rules and calculations
├─────────────────────┤
│  Data Access        │ ← How data is stored and retrieved
├─────────────────────┤
│  Database           │ ← Where data is actually stored
└─────────────────────┘

Example: E-commerce website

  1. Model-View-Controller (MVC)

Separates an application into three interconnected parts:

┌─────────┐    ┌──────────┐    ┌─────────┐
│  VIEW   │◄───┤CONTROLLER├───►│  MODEL  │
│(Display)│    │ (Logic)  │    │ (Data)  │
└─────────┘    └──────────┘    └─────────┘

Example: Social media app

  • Model: User profiles, posts, friend connections

  • View: Timeline display, profile pages, comment sections

  • Controller: Handle likes, post creation, friend requests

Benefits: Changes to display don't affect data, easy to test Popular in: Web applications, mobile apps

  1. Microservices Architecture

    Instead of one big application, break it into many small, independent services:

┌─────────────┐  ┌─────────────┐  ┌─────────────┐
│   User      │  │   Order     │  │   Payment   │
│  Service    │  │  Service    │  │   Service   │
└─────────────┘  └─────────────┘  └─────────────┘
       │                │                │
       └────────────────┼────────────────┘
                        │
              ┌─────────────┐
              │   Product   │
              │   Service   │
              └─────────────┘

Example: Netflix

  • User Service: Handle logins, profiles, preferences

  • Content Service: Manage movies, shows, metadata

  • Recommendation Service: Suggest what to watch

  • Streaming Service: Deliver video content

Benefits: Teams can work independently, easy to scale specific parts Challenges: More complex to manage, network communication overhead

  1. Event-Driven Architecture

    Components communicate by sending and receiving events (messages about things that happened):

Event: "User made a purchase"
│
├─► Inventory Service (reduce stock)
├─► Email Service (send confirmation)
├─► Analytics Service (record sale)
└─► Shipping Service (prepare order)

Benefits: Highly flexible, components don't need to know about each other Use cases: Real-time systems, complex workflows

Software in Action: Real-World Applications

We've explored hardware components, how software manages them, user interfaces, and software architecture. Now let's see how all these pieces come together in the real world. Software isn't just abstract code - it's the driving force behind almost everything we interact with daily.

From the moment you wake up to when you go to sleep, software is working behind the scenes, making modern life possible. Let's explore how software transforms various industries and everyday experiences.

Software in Your Daily Life

  • Web Browsers like (Chrome, Firefox, Safari).

  • Mobile Apps like (e.g., social media, navigation, games).

  • Enterprise Systems (ERP/CRM)

  • Smart Home & IoT Devices

  • Cloud Services & SaaS

Software 101: A Complete Guide to Different Types of Software - Goodcore

Conclusion

Software may be invisible, but it’s the mastermind behind everything your computer does. From the moment you press the power button, layers of code spring into action—booting up your system, interpreting your commands, and translating them into signals your hardware can understand.

Whether you're browsing social media, editing a document, or asking your smart speaker to play music, software is the invisible force making it all happen—bridging the gap between your intent and your machine's capabilities.

Understanding how software works gives you a deeper appreciation for the digital world we live in—and maybe even inspires you to create some software magic of your own.

Next time, we’ll dive into the world of Internet and Networking—exploring how computers connect and communicate globally, making the web and online services possible.

Stay curious. The magic continues. 💻✨

References

Operating-System-Final.pdf

PowerPoint Presentation

What is a Computer Software? | GeeksforGeeks

Software - Wikipedia

Operating System Overview

https://chatgpt.com

0
Subscribe to my newsletter

Read articles from Ibrahim Wael directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ibrahim Wael
Ibrahim Wael