CM-01: From the Foundations of Computing to Generative AI
Core Theme: For seventy years, humans learned the computer's language — coding. Today, the computer has learned the human's natural language. This transition has broken the greatest technical barrier in the history of administration, and arguably in human history itself.
1. The Physical Reality of a Computer: One and Zero
To grasp the real power of artificial intelligence, even a reader with no technical background can — and should — understand the basic physical mechanism by which a computer actually works. It is far easier than most people fear.
Picture yourself walking into a shop to buy a smartphone or a laptop. Without realizing it, you are already interrogating the seller about technical specifications:
- "How is the display? How is the camera?" — The camera is an input device; the display is an output device.
- "How much memory (RAM) does it have? How big is the hard disk (storage)?" — Temporary memory and permanent memory.
- "Is the processor an Intel? A Core i7?" — The brain of the computer: the Central Processing Unit.
Figure 2.1: The fundamental architecture of a computer (Von Neumann Architecture) — Input Devices, the Central Processing Unit (CPU), Primary Memory (RAM/ROM), Persistent Storage (SSD/Storage), and Output Devices.
The System Anatomy and Hardware Components of Figure 2.1:
- Input Devices & Input Bus: Keyboards, scanners, cameras, and biometric readers convert human commands or physical data into electrical signals and feed them into the system.
- The Central Processing Unit (CPU): The computer's principal engine for calculation and instruction execution (the Arithmetic Logic Unit and the Control Unit). It runs the Fetch → Decode → Execute cycle continuously, billions of times per second.
- Primary Memory (RAM & ROM): * RAM (Random Access Memory): High-speed memory that temporarily holds running programs. When the power goes, its contents vanish (it is volatile). * ROM (Read-Only Memory): The chip that permanently stores the elementary instructions needed to boot the machine.
- Secondary Storage (SSD / HDD): The vault where files, databases, and the operating system itself are kept permanently.
- Data, Address & Control Buses: The electrical highways moving billions of bytes per second between the CPU, memory, and storage.
- Output Devices: The display and printers, through which results return to the human.
The limitation of this classical model is that the CPU executes instructions step by step — sequential processing. This is precisely why AI demands something radically different: parallel chips (GPUs) capable of performing hundreds of thousands of calculations simultaneously.
2. The Operating System: The First Bridge Between Human and Silicon
An ordinary person cannot converse with a computer in ones and zeros. We do not know how, and it would be unbearably tedious. So a specialized, deeply complex piece of software was created to make this hardware useful to ordinary humans: the Operating System (OS).
Figure 2.2: The fundamental layers of an operating system — Physical Hardware, the OS Kernel, System Libraries (APIs), Command Interfaces (Shells), and User Applications.
The Operating System Layers of Figure 2.2:
- Physical Hardware: Motherboard, CPU, RAM, SSD/HDD, keyboard, and screen.
- The OS Kernel: * Process Manager: Divides CPU time among the hundreds of programs running at once. * Memory Manager: Guarantees that different applications use RAM without colliding into one another. * File System: Organizes the raw data on storage media into the folders and files we recognize. * Device Drivers: The controller software through which the kernel deals directly with hardware chips. * System Call Interface (Syscalls): The protective wall through which user applications request services from the kernel safely — so that no application can directly destroy the hardware.
- System Libraries & APIs: Standard POSIX or C runtime libraries that give software developers common facilities.
- Shell & Command Interfaces: The Bash/Zsh terminals (CLI) or the Windows/desktop GUI environment through which the user issues commands.
- User Applications: The Chrome, Word, Excel, and enterprise or government software systems we use every day.
This is why you check for Windows when buying a computer, and for Android or Apple iOS when buying a phone.
Figure 2.3: Windows NT Architecture and Android Architecture — how two operating systems, one desktop and one mobile, manage the abstraction barrier between hardware and software.
Figure 2.3: Windows NT versus Android Architecture:
- Windows NT Architecture (Desktop):
- User applications (Win32, UWP, Web Apps).
- Win32 Subsystem & APIs (
kernel32.dll,user32.dll,ntdll.dll). - Windows NT Kernel & Executive (Process Manager, Virtual Memory, I/O Manager).
- Hardware Abstraction Layer (HAL): the protective stratum that frees the kernel from the differences between x86/x64 motherboards.
- Android Architecture (Mobile):
- User applications (Kotlin / Java apps).
- Java API Framework (Activity Manager, Window Manager, Content Providers).
- Android Runtime (ART) and native C/C++ libraries (
Bionic libc,SurfaceFlinger,Vulkan). - Hardware Abstraction Layer (HAL modules: Camera, Audio, Sensors).
- The Linux Kernel (Binder IPC, power management drivers) and ARM SoC hardware.
The engineering lesson: A phone and a computer run in two completely different operating environments. This is exactly why digital services — government services, education platforms, business applications — must be built platform-neutral, on the web and on open APIs, rather than welded to any single device family.
3. Programming Languages, Compilers, and the 70-Year Code Barrier
An operating system alone cannot make a computer perform the specific tasks an office needs. To calculate the monthly salaries of public employees, register land titles, or compute pensions, someone must give the computer a step-by-step series of instructions — an algorithm.
For this, programming languages were born: Fortran, COBOL, C, C++, Java, Python, and the rest.
Figure 2.4: The programming language — the abstraction barrier between human logic and the computer's binary signals (0 and 1).
The policies, concepts, and reasoning inside a human mind mean nothing, directly, to a silicon chip. To bridge that gap, humanity used programming languages with rigid grammar (syntax) and problem-solving structures (loops, functions).
Figure 2.5: The step-by-step process of a compiler — from source code to machine code (binaries).
The Compiler Pipeline Stages of Figure 2.5:
- Source Code Input: The text a human writes in a language such as C++, Java, or Python.
- Lexical Analysis (Lexer / Tokenizer): Every character of the code is examined; words, punctuation, and commands are separated into tokens.
- Parsing: The grammar is checked against the rules; syntax errors are surfaced.
- The Abstract Syntax Tree (AST) and Intermediate Code: The logical flow of the program is structured like the branches of a tree.
- Code Generation: Finally, executable binary machine code — the 0s and 1s the hardware can run directly — is produced.
Note
The 70-Year Bottleneck: From 1950 until 2022 — more than seventy years — the greatest barrier in the computing world was this: to make a computer do anything, you had to learn the computer's language. Coding. One misplaced semicolon, one wrong character, and the entire program failed. Failing that, you had to pay a handsome salary to a software engineer who knew coding, so that he or she could explain your need to the machine on your behalf. That is the rigid technical wall that has now come crashing down.
4. The Historic Revolution: From Code to Conversation
With ChatGPT's arrival in late 2022, it was precisely this 70-year barrier that broke.
Figure 2.6: From Code to Conversation — the human's natural language replaces complex coding languages as the computer's new operating interface.
To talk to a computer now, you do not need to learn C++ or Python. You can explain what you want in your own mother tongue — in Sinhala, in Tamil, or in English.
Generative AI has brought the computer to the point of understanding natural human language. Computing power that was once confined to programmers has, in this way, landed directly in the hands of the school student, the teacher, the parent, the farmer, and the Grama Niladhari — the village officer who is the Sri Lankan state's front line.
5. Traditional AI versus Generative AI
Here we must grasp a fundamental distinction: "AI" and "Generative AI" are not one thing. They are two.
Figure 2.7: Traditional AI versus Generative AI — classifying and predicting from existing data (Analytical AI) versus generating entirely new content and reasoning (Generative AI).
The Technical Foundation and the Distinction in Figure 2.7:
- Shared Foundation Stack: Both traditional AI and generative AI are built on machine learning, deep learning networks, and large datasets.
- Traditional / Analytical AI:
* Primary purpose: Read existing data, analyze it, and return a classification or a prediction.
* Core capabilities:
- Data Analysis & Forecasting: Predicting next month's tax revenue, the coming harvest, or the number of dengue patients.
- Classification & Pattern Matching: Detecting fraudulent documents, filtering email as spam, matching driving-license photographs.
- Content Tagging: Applying stable classification tags to files and reports.
- Output: A specific value, a label, or a probability (e.g., "the probability that this transaction is fraudulent is 92%").
- Generative AI:
* Primary purpose: Synthesizing the patterns in its training data to create net-new original content that never previously existed in the world — synthesis engines, not lookup engines.
* Core capabilities:
- Code & Text Synthesis: Drafting circulars, legal opinions, and computer software from scratch.
- Audio & Image Generation: Voiceovers, illustrations, and video generation.
- Logic & Process Synthesis: Automatically composing multi-step plans and reasoning chains to solve a problem.
Figure 2.8: The Complete Capability Map of Generative AI — A Revolution Across 12 Domains
Generative AI is not merely a tool that drafts an office letter. Figure 2.8 maps its vast network of capabilities across 12 major domains that are transforming global industries and public governance alike:
Figure 2.8: The full scope of Generative AI — a comprehensive capability map across 12 major domains spanning global industry and public governance.
- Text, Knowledge & Translation: * Autonomous Multi-Document Research: Reading thousands of circulars, reports, and cabinet decisions in varied formats at once, and producing accurate syntheses. * Cross-Cultural Translation & Locality: Transmitting meaning while preserving cultural and local nuance — rather than translating word by word. * Style Shaping & Voice Transfer: Instantly recasting the same fact into the legal register of a gazette or the plain, warm language an ordinary villager understands.
- Visual & Creative Media: * Scene-Integrated Generation: Composing public-awareness visuals with correct lighting and perspective. * Long-form Video Production: Producing educational video while maintaining character and environment continuity. * 3D & VR Environment Creation: Generating three-dimensional virtual models of city plans or archaeological sites from a text query. * Interactive Presentation Experiences: Lecture visuals that adapt in real time to the audience's responses.
- Agentic & Executive Operations: * End-to-End Task Ownership: Completing procurement or payment workflows automatically through computer APIs, without human intervention. * Multi-Platform Coordination: Working across websites, databases, and email simultaneously to finish a task. * Self-Improving Workflows: When something goes wrong, analyzing the failure automatically and correcting its own prompt. * Persistent Memory & Long-Horizon Planning: Steering a months-long project step by step while remembering everything about it. * Self-Verification & Auto-Judging: Running an internal audit on its own output before handing the result to the human officer. * Inter-Agent Collaboration (MAGS): A finance AI, a legal AI, and an administrative AI negotiating among themselves to resolve a file.
- Code & Technical Artifacts: * Full-Stack Dev Agents: Writing software, testing it, and releasing it to the cloud automatically. * AI-Native Architecture Design: Designing systems so that computing resources are used at maximum efficiency. * Bug Detection & Patching: Finding security holes and patching them immediately. * Legacy Code Revitalization: Restructuring decades-old COBOL or Java systems into modern cloud systems without breakage. * Intent-Driven Infrastructure: Creating entire cloud server networks automatically from a plain sentence in English or Sinhala.
- Business, Policy & Strategy: * Hyper-Personalized Sequences: Sending every citizen official notifications matched to their own circumstances. * Risk Simulation & Stress-Testing: Pre-testing government decisions against hundreds of thousands of alternative scenarios — economic crises, currency shocks, port strikes. * Proactive Compliance & Legal Auditing: Monitoring new gazettes and legal amendments live, and updating institutional regulations automatically. * Supply Chain Optimization: Rerouting fuel, medicine, and food distribution in real time as disasters unfold.
- Advanced Science & Material Discovery: * Generative Molecular Synthesis: Designing new drugs and proteins. * Material Lattice Design: Creating new materials for efficient solar cells and batteries. * Automated Hypothesis Generation: Reading millions of research papers and proposing new scientific discoveries. * Hyper-Local Climate Simulation: Predicting floods or cyclonic conditions with high precision.
- Education & Personalized Mentorship: * Socratic Tutoring: Digital tutors that guide each student personally, at the student's own pace and line of thought. * Automated Curriculum Creation: Composing textbooks and exercises adapted to the local environment. * AI Grading & Early Intervention: Identifying learning weaknesses and intervening before a student ever fails an exam. * Immersive VR Learning: Learning by virtually experiencing historical events or outer space.
- Healthcare & Precision Medicine: * Medical Imaging Diagnosis: Recognizing disease indicators in X-ray and MRI scans within seconds. * Personalized Treatment Plans: Determining drug dosage based on a patient's genetic data and history. * Clinical Scribe Automation: The medical record writing itself while the doctor talks with the patient. * Patient Symptom Triage: Managing emergency-room queues by severity, at speed.
- Embodied AI & Physical Robotics: * Zero-Shot Motor Control: Robots navigating and handling objects independently, even in environments never seen before. * Visuomotor Policy Generation: Converting camera data into motor movements for delicate surgery or assembly. * Sim-to-Real Mastery: Training robots in virtual worlds and releasing them into the real one. * Humanoid Coordination: Deploying human-form robots for heavy lifting in factories and warehouses.
- Cybersecurity & Synthetic Defense:
- Generative Red Teaming: AI safely attacking state systems on purpose, to find their weaknesses before criminals do.
- Polymorphic Defense: Continuously and automatically mutating system code and keys so attackers cannot land a blow.
- Deepfake Detection & Provenance: Scientifically identifying forged voice recordings, videos, and documents.
- Threat Intelligence Synthesis: Combing the dark web and warning of attacks against critical infrastructure in advance.
- Finance & Economic Simulation:
- Black Swan Stress-Testing: Testing a national economy's resilience against massive global financial collapses or sanctions.
- Hyper-Personalized Wealth Architecture: Shaping pensions and social safety nets to each citizen's income.
- Automated Regulatory Synthesis: Updating internal rules the moment international financial regulations (FATF, IMF) change.
- Entertainment, Culture & Spatial Reality:
- 3D Preservation via NeRF: Preserving historic sites as complete 3D environments from a handful of photographs.
- Interactive Narrative Engines: Public communication that adapts live to the citizen's questions.
- Voice & Persona Cloning: Preserving the emotional depth of historical voices for future generations.
6. AI's Great Transition: From Generative to Agentic to Embodied
Figure 2.9 shows the great paradigm shift now underway: artificial intelligence moving from simple content creation toward operating the physical world.
Figure 2.9: The 3 phases of the AI transition — Generative AI (Creating), Agentic AI (Doing), and Embodied AI (Moving).
The Paradigm Transition Stages of Figure 2.9:
- Phase One: The Generative Stage — Creating (Early Stage): * Focus: Generating text, images, music, video, and basic code; shaping new ideas; acting as an assistant. * Mode of operation: Full operational control remains in human hands. The human gives one prompt; the AI gives one answer.
- Phase Two: The Agentic Stage — Doing (Current Frontier): * Focus: Making decisions, composing multi-step plans, and completing tasks independently. * Mode of operation: When an officer says, "Check this permit application and prepare it for approval," the AI agent checks the database on its own, computes the fees, produces an audit note, and presents the file for the officer's signature.
- Phase Three: The Embodied Stage — Moving (Future Horizon): * Focus: Sensing, moving, and manipulating objects in the real physical world (physical robotics). * Mode of operation: Humanoid robots, disaster-response drones, and autonomous city-cleaning systems — AI joining physical labor.
Note
🌐 Related reading: For the full analysis of the real timeline from the 2017 Transformer architecture to 2035 — AI's evolution from narrow intelligence toward superintelligence — read Idasara Academy's published article The Gen AI Evolutionary Journey: 2017 to 2035.
7. The 5 Layers of the AI Ecosystem: Where Is Sri Lanka's Real Role?
As NVIDIA's CEO Jensen Huang points out, artificial intelligence runs on five essential foundational layers (The 5 Layers of AI — From Energy to Intelligence):
Figure 2.10: The 5 layers of an AI system — Energy, Infrastructure, Silicon Chips (GPUs), Foundation Models, and Applications.
The Deep Engineering Anatomy of Figure 2.10:
- Layer 1: Energy and the Power Grid (Foundation & Primary Bottleneck): * This is the primary limiting factor of the entire AI system. * Processing real-time intelligence demands enormous electrical current and heat dissipation. Without continuous, stable, and increasingly renewable energy, an AI data center cannot operate.
- Layer 2: Data Centers and Infrastructure (AI Factories): * Land, liquid-immersion cooling systems, and high-speed optical interconnects moving terabits of data.
- Layer 3: Microchips and GPUs (Compute Power): * AI's main engine — tensor chips performing massively parallel computation, such as NVIDIA's H100 and B200 (Blackwell).
- Layer 4: Foundation Models (The Brain of the System): * The cognitive brain of the stack — LLMs pre-trained on trillions of tokens (ChatGPT, Gemini, Claude, DeepSeek).
- Layer 5: Applications (Where Economic Value Is Generated): * The only layer where technology becomes economic value — health, agriculture, transport, manufacturing, and citizen services.
🇱🇰 A Reality Check for Sri Lanka
As Sri Lankans, we must recognize where our country's real capability lies:
- Layer 3 (chip fabrication): Building $20-billion state-of-the-art fabs is not something Sri Lanka can do at this moment.
- Layer 4 (training frontier models from scratch): Spending hundreds of millions of dollars to pre-train models from zero is not our priority either.
- Our real opportunity is Layer 5 — Applications. Using the world's most powerful models to eliminate file backlogs in the public service, accelerate land registration, and deliver dignified service to the citizen — that, we can do one hundred percent. Strengthening green energy (Layer 1) and local edge data centers (Layer 2) is likewise essential to our digital sovereignty.
The world's powers may build the chips and the models. But applications for the learning gap in our own schools, the land dispute at the Divisional Secretariat, the accounts of the small family business, or the harvest problem in the farmer's field — those can be built only by us. To take the finest models on Earth and solve Sri Lanka's problems with a Product Engineering mindset is nothing less than a national duty.
In the next module, we explore the Transformer brain inside these models — tokenization, and how the mathematics you met in school connects directly to AI.