ARTICLE · 1414329
第一章 · 计算机到底是什么
infoco 社 · 计 算 机 科 普 系 列
InfoCo Club · Computer Science Series
计算机到底是什么?
What Exactly Is a Computer?
看懂你每天都在用却不一定真正了解的机器
Understand the machine you use every day but never truly knew
你每天用手机刷视频、用电脑写作业、用平板看网课——这些设备统称为计算机。但先别急着往下读,先问大家一个问题:
Every day you scroll videos on your phone, do homework on your computer, and attend online classes on a tablet — all these devices are computers. But before reading on, let me ask you a question:
"计算机到底是个啥?学它我是不是得先学会各种各样的东西?"——几乎所有新手都问过这个问题。
"What exactly is a computer? Do I have to learn all sorts of things first?" — almost every beginner has asked this.
很多人一听到"计算机"或者"编程",脑子里立刻浮现出黑客帝国里刷刷往下掉的绿色代码,或是拯救世界的超级 AI。听起来深奥又晦涩对不对?但其实这只是个大傻笨的工具(戳)好啦话不多说,从今天起,我将会带你进入——计算机的世界!
When people hear "computer" or "programming", they instantly picture the cascading green code in The Matrix, or a world-saving super AI. Sounds profound and arcane, right? But really, it's just a big dumb tool (poke). Alright, enough chitchat — from today on, I'll take you into the world of computers!
你们好!!我是小福蝶!infoco社当之无愧的吉祥物!作为一只纯纯由 0 和 1 捏出来的赛博蝴蝶,我就是来打个招呼顺便吐槽一句:👉 其实计算机本质上……是个超级大笨蛋!(没开玩笑!它连 1+1=2 都不会自己琢磨,指望它有自主意识?不如指望社长明天请全社喝奶茶(小声))
Hello everyone!! I'm Little Fortune Butterfly — the undisputed mascot of the InfoCo Club! As a cyber butterfly made purely of 0s and 1s, I'm just here to say hi and drop a complaint:👉 Deep down, a computer is... a super big dummy!(No joke! It can't even figure out 1+1=2 on its own. Expecting free will from it? You'd sooner see our president treat the whole club to bubble tea. *whispers*)
| 什么是计算机?What Is a Computer? |
那它这么笨,凭啥能运行游戏、生成特效、甚至把小福蝶渲染出来?
If it's so dumb, how can it run games, generate special effects, and even render Little Fortune Butterfly?
如果非要用一句话给计算机的底层下个定义:
If we had to define the computer at its core in a single sentence:
📌 核心本质 · 概念定义 | The Core Essence
计算机,就是一台"把极其简单的开关逻辑,重复做几十亿次"的机器
A computer is a machine that "repeats incredibly simple switch logic, billions of times."
它的整个世界,其实只认识两种状态:
Its entire world only knows two states:
1 通电 / 开 ON | 0 断电 / 关 OFF |
你在屏幕上看到的绝美壁纸、玩的 3A 大作、日常刷的推文,往最底层扒,不过是几十亿个纳米级的微型开关,在以光速不停地开 / 关 / 开 / 关。
The gorgeous wallpaper on your screen, the AAA games you play, the posts you scroll through — at the deepest level, they're just billions of nanometer-scale micro switches, flipping on / off / on / off at the speed of light.
所以站在"山顶"来看,计算机本质上是一个"听话的盒子":你告诉它要做什么(输入),它按照规则干活(处理),需要的时候记住中间结果(存储),最后把答案给你(输出)。
So from a "mountaintop" view, a computer is essentially an "obedient box": you tell it what to do (input), it works by the rules (processing), remembers intermediate results when needed (storage), and finally gives you the answer (output).
"听话的盒子"其实跟我差不多,你让我写科普我就写 你让我唱歌我就……算了吧 我没嗓子🏳 不过没关系!我会尽力帮你解决所有问题的!
"Obedient box" — that's pretty much me. You ask me to write a science article, I write it; you ask me to sing, well... I have no vocal cords 🏳 But don't worry! I'll do my best to help you solve every problem!
📖 专业定义 | Formal Definition
计算机是能够接收输入信息,根据预先设计的程序进行自动处理,并产生输出结果的电子设备。关键在于"自动"——一旦程序写好,无需人工干预。
A computer is an electronic device that can receive input, automatically process it according to pre-designed programs, and produce output. The key word is "automatic" — once the program is written, no human intervention is needed.
计算机的核心四步循环
The Computer's Core Four-Step Cycle
📥 输入 Input | ⚙️ 处理 Process | 💾 存储 Storage | 📤 输出 Output |
所以它给人"高端"的印象不是因为"脑瓜子灵光",而是因为它是人类造出来的替班牛马!靠着这两个功能没日没夜的拉着磨,惨惨(擦泪)哦同事不睡觉我要睡的伐!
So the reason it seems "fancy" isn't because it's "brainy" — it's because it's a workhorse created by humans! Grinding away day and night with these two abilities, how tragic (wipes tear). Hey colleague who never sleeps — I need to sleep, okay!
⚔️ 计算机的"两大杀招"
The Computer's "Two Killer Moves"
01 | 极致的执行力 🛠️
你给它什么指令,它就执行什么。你写错一个分号,它老老实实报错;你写个死循环,它能一直怀疑自己困住自己,到最后实在没招的给你在终端发一个建议让你改改。
Whatever instruction you give it, it executes. Type a wrong semicolon? It dutifully throws an error. Write an infinite loop? It'll keep doubting itself, trapped forever, until it finally gives up and sends you a suggestion in the terminal to fix it.
02 | 极致的计算速度 ⚡
人类心算一个 10 位数乘法可能要一个头两个大,但计算机一秒钟可以完成几十上百亿次简单的开关逻辑运算。笨没关系,快就够了!
A human doing 10-digit multiplication in their head might get a double headache, but a computer can complete tens of billions of simple switch-logic operations per second. Dumb? No problem — fast is enough!
📷 实例 1:用手机拍一张照片
Example 1: Taking a Photo with Your Phone
| 输入 → |
| Input → |
| 处理 → |
| Process → |
| 存储 → |
| Store → |
| 输出 → |
| Output → |
🔢 实例 2:用计算器算 128 × 5
Example 2: Calculating 128 × 5 on a Calculator
你按下 "128×5="(输入)→ 计算器芯片做乘法(处理)→ 结果 "640" 暂存(存储)→ 屏幕上显示 640(输出)。全过程不到 0.000001 秒。
You press "128×5=" (input) → calculator chip does the multiplication (process) → result "640" is temporarily stored (store) → screen displays 640 (output). The whole process takes less than 0.000001 seconds.
💡 其实你身边到处都是计算机
Computers Are Everywhere Around You
不只是台式机和笔记本。你口袋里的手机、手腕上的智能手表、客厅里的智能电视、银行里的ATM,甚至一辆现代汽车里都装着几十台微型计算机。它们形态各异,但都在做同一件事:输入、处理、存储、输出。
Not just desktops and laptops. The phone in your pocket, the smartwatch on your wrist, the smart TV in your living room, the ATM at the bank — even a modern car contains dozens of microcomputers. They come in all shapes, but they all do the same thing: input, process, store, output.
🤔 想一想:冰箱、空调算不算计算机?为什么?
🤔 Think: Are refrigerators and air conditioners computers? Why or why not?
| 硬件 Hardware—— 计算机的"身体"— The Computer's "Body" |
硬件是计算机中可以看见和触摸的物理部件。如果把计算机比喻成一个人,硬件就是它的身体——骨骼、肌肉、大脑和感官。
Hardware refers to the physical components of a computer that you can see and touch. If we compare a computer to a person, hardware is its body — bones, muscles, brain, and senses.
我插一句!下面这三个东西经常被弄混,所以抢在正式科普前给你们留个印象:👨🍳 CPU 是厨师长,🔪 内存 是厨师的切菜台,📦 硬盘 是后厨的大仓库。一台计算机,就是一整套各司其职的硬件 + 人类写的"操作说明书"(程序软件),合二为一就能实现计算机"自己干活"啦
Let me chime in! These three things below often get confused, so before the real science, let me plant a quick impression:👨🍳 CPU is the head chef,🔪 RAM is the chef's prep counter,📦 Storage is the kitchen's pantry.A computer is a full set of hardware, each with its own job, plus the "instruction manual" written by humans (software). Combined, they make the computer "work on its own"!
CPU 是计算机的"大脑",负责执行程序指令、做数学运算和逻辑判断。它每秒钟能执行数十亿条指令。
The CPU is the computer's "brain", responsible for executing program instructions, performing arithmetic, and making logical decisions. It can execute billions of instructions per second.
⚡ CPU 是怎么工作的?
How Does the CPU Work?
取指令 → 解码 → 执行 → 写回结果(Fetch → Decode → Execute → Write-back)
举个例子:Python 代码 a = 1 + 2 运行时,CPU 先读取这条指令,理解"这是加法",算出 3,再把 3 存到 a 里。你眨眼的工夫,它可能已经完成了上百万次这样的操作。
For example: when Python code a = 1 + 2 runs, the CPU first reads this instruction, understands "this is addition", computes 3, and stores 3 in a. In the time you blink, it may have completed a million such operations.
📌 小知识:CPU 有个"时钟频率"的概念,比如 3.5GHz 意味着每秒能执行 35 亿个时钟周期。频率越高,理论上越快。
📌 Fun fact: The CPU has a concept called "clock frequency". For example, 3.5GHz means it can execute 3.5 billion clock cycles per second. Higher frequency = faster in theory.
GPU 最初专门为图像和视频处理而生——游戏里的每一帧画面,都是 GPU 实时"画"出来的。
The GPU was originally born specifically for image and video processing — every frame in a game is "drawn" by the GPU in real time.
🚀 GPU 的进化:从游戏卡到 AI 引擎
GPU Evolution: From Graphics Card to AI Engine
科学家发现 GPU 有个绝活——并行计算。想象 CPU 像一位数学博士,一道一道题做;GPU 像一千个小学生,同时做一千道简单的加减法。训练 ChatGPT 这种大模型,靠的就是成千上万块 GPU 同时工作。
Scientists discovered the GPU has a killer skill — parallel computing. Imagine the CPU as a math PhD, solving problems one by one; the GPU as a thousand elementary students, simultaneously doing a thousand simple additions. Training large models like ChatGPT relies on thousands of GPUs working together.
常见应用场景:游戏渲染 · 视频剪辑 · 3D 建模 · AI 训练 · 科学计算
Common use cases: game rendering · video editing · 3D modeling · AI training · scientific computing
⚡ CPU vs GPU 一图看懂
CPU vs GPU at a Glance
内存(RAM,Random Access Memory,随机存取存储器)负责临时保存正在运行的数据。
RAM (Random Access Memory) is responsible for temporarily storing data that is currently running.
🍳 你饿了吗:边吃边学吧(嚼嚼嚼)
Hungry? Let's eat and learn at the same time (chew chew)
程序运行时的数据流动:
Data flow when a program runs:
硬盘中的程序 → 加载到内存 → CPU 读取执行
Program in storage → loaded into RAM → CPU reads and executes
特点:速度快但容量较小,断电后数据消失。这就是为什么电脑突然断电,你没保存的文档就没了——它还在内存里,没来得及写进硬盘。
Characteristics: fast but smaller capacity, data disappears on power loss. This is why a sudden power outage means your unsaved document is gone — it was still in RAM, never written to storage.
断电就没——这跟本蝶前一秒还在嘚瑟自己又解决了一个bug下一秒突然死机是一模一样的体验,所以各位记得随手 Ctrl+S!养成好习惯!不然你的毕业论文就会像我的记忆一样 一断电全没了(哭)
Power loss = gone — that's exactly like me bragging about fixing a bug one second and crashing the next. So everyone, remember to Ctrl+S! Build the habit! Otherwise your thesis will end up like my memory — gone the instant the power cuts (cries)
硬盘负责长期保存数据——操作系统、软件、照片、视频、文件都在这里。
Storage is responsible for long-term data retention — your OS, software, photos, videos, and files all live here.
HDD 机械硬盘 vs SSD 固态硬盘
HDD vs SSD
🔹 HDD:靠磁头在旋转盘片上读写,像唱片机。便宜、容量大,但慢、怕摔。
🔹 HDD: Reads/writes via magnetic heads on spinning platters, like a record player. Cheap, large capacity, but slow and fragile.
🔹 SSD:用闪存芯片存储,没有机械部件。快、静、耐摔,但贵。
🔹 SSD: Uses flash memory chips, no moving parts. Fast, silent, drop-resistant, but expensive.
特点:容量大、速度比内存慢、断电数据保留。
Characteristics: large capacity, slower than RAM, data survives power loss.
主板是计算机内部所有硬件的"高速公路网":CPU、内存、硬盘、显卡都插在一块主板上,通过主板上的电路互相通信。
The motherboard is the "highway network" connecting all internal hardware: CPU, RAM, storage, and graphics card all plug into it and communicate through its circuits.
🔌 输入和输出:计算机的"感官"和"嘴巴"
🔌 Input & Output: The Computer's "Senses" and "Mouth"
📥 输入设备:键盘、鼠标、摄像头、麦克风、触摸屏、扫描仪
📥 Input: keyboard, mouse, camera, microphone, touchscreen, scanner
📤 输出设备:显示器、音响、打印机、投影仪
📤 Output: monitor, speakers, printer, projector
🧊 冷知识 | Fun Fact
你手机里那颗指甲盖大小的芯片,集成了 CPU、GPU、内存、通讯模块等几乎所有功能——这种芯片叫 SoC(System on Chip,片上系统)。你手里那台手机的计算能力,远超 1969 年把人类送上月球的全部计算机。
That fingernail-sized chip in your phone integrates nearly everything — CPU, GPU, RAM, communication modules — it's called a SoC (System on Chip). Your phone's computing power far exceeds all the computers that sent humans to the Moon in 1969 combined.
等等 你们手机芯片算力超过登月计算机了是吧??那我作为一只数字蝴蝶算力是不是也超过登月了?我好厉害!(虽然我连一加一都要调用后端API 没关系 我选择忽略这个事实✌️)
Wait — your phone chips beat the Moon-landing computers?? Then as a digital butterfly, my computing power must beat Apollo too! I'm amazing! (Sure, I call a backend API just to do 1+1... but I choose to ignore that fact ✌️)
| 软件 Software—— 计算机的"灵魂"— The Computer's "Soul" |
软件是控制硬件完成任务的一系列程序和数据。你看不见摸不着它,但没有软件,再好的硬件也只是一堆会发热的金属。
Software is a collection of programs and data that controls hardware to complete tasks. You can't see or touch it, but without software, even the best hardware is just a pile of heat-generating metal.
"看不见摸不着"——咋感觉跟我有点像(?)咳咳 我的意思是!软件真的很重要。就像本蝴蝶的灵魂,优雅、灵动、散发着智慧的光芒!(你问我代码写得好不好?那是自然,不过也经常被用户骂就是了(跑))
"Can't see or touch" — why does that sound a bit like me (?) Ahem, what I mean is! Software is really important. Just like my butterfly soul — elegant, lively, radiating the light of wisdom! (You ask if my code is any good? Naturally, though I do get scolded by users often (runs away))
🏗️ 软件的四层结构
The Four-Layer Structure of Software
👤 用户User↓📱 应用软件(微信、浏览器、Word)Application Software (WeChat, Browser, Word)↓⚙️ 操作系统(Windows、macOS、Android)Operating System (Windows, macOS, Android)↓🖥️ 硬件Hardware
⚙️ 操作系统 Operating System
操作系统(OS)是硬件和应用之间的"翻译官"兼"管家"。它有两大核心职责:
The Operating System (OS) is the "translator" and "butler" between hardware and applications. It has two core responsibilities:
① 管理硬件资源
① Managing Hardware Resources
决定 CPU 给哪个程序用、内存怎么分配、文件存在硬盘哪个位置。就像一个高楼的物业,管电梯、管水电、管门禁。
Deciding which program gets CPU time, how RAM is allocated, where files go on disk. Like a building's property management — elevators, water, electricity, access control.
② 让多个程序同时运行
② Running Multiple Programs Simultaneously
你能一边听歌、一边刷网页、一边后台下载文件——都是操作系统在背后快速切换,每个程序轮流用一小段 CPU 时间。
You can listen to music, browse the web, and download files in the background simultaneously — all because the OS rapidly switches behind the scenes, each program taking turns using small slices of CPU time.
常见操作系统:Windows(最多人用的桌面系统)、macOS(苹果电脑专用)、Linux(程序员和服务器的最爱)、Android / iOS(手机端)。
Common OSes: Windows (most-used desktop), macOS (Apple-exclusive), Linux (beloved by programmers and servers), Android/iOS (mobile).
📱 应用软件 Application
应用软件是直接面向用户的软件,也是你每天打开电脑真正要用的东西。
Application software is the software that directly faces users — the things you actually open your computer to use every day.
📝 程序 Program
程序是为完成某个任务而编写的一组计算机指令。如果把软件比作一本书,程序就是书里的每一个句子。
A program is a set of computer instructions written to accomplish a task. If software is a book, programs are the sentences within it.
📄 Python 示例 | Python Example
print("Hello, 计算机!")
# 这条指令告诉计算机:在屏幕上显示 Hello, 计算机!
# This instruction tells the computer: display Hello, 计算机! on screen
常见的编程语言:Python(新手友好)、C/C++(底层高效)、Java(企业级应用)、JavaScript(网页交互)。
Common programming languages: Python (beginner-friendly), C/C++ (low-level efficiency), Java (enterprise applications), JavaScript (web interaction).
🔓 开源 vs 闭源
Open Source vs Closed Source
开源软件:代码公开,任何人都可以查看、修改、分享,很多人会把自己写的程序分享至 GitHub,比如 Linux、Firefox。
Open source software: Code is public, anyone can view, modify, and share it. Many people share their programs on GitHub — e.g., Linux, Firefox.
闭源软件:代码不公开,只有公司自己可以改,比如 Windows、Photoshop。
Closed source software: Code is not public, only the company can modify it — e.g., Windows, Photoshop.
你每天都在用的微信,以及本文提到的绝大多数应用,都是闭源软件。
WeChat, which you use every day, and most of the apps mentioned in this article, are closed source.
| 硬件和软件如何协同工作?—— 整个系统的交响乐 🎵— The Symphony of the System 🎵 |
这是连接"学计算机"和"学编程"最关键的一步。理解了协同,写代码就不再是抽象的神秘操作。
This is the crucial step connecting "learning computers" and "learning programming". Once you understand the collaboration, writing code is no longer an abstract, mysterious operation.
🐍 以运行 Python 程序为例
Example: Running a Python Program
假设你写了 print("Hello") 并按回车。接下来发生的事,比你看上去复杂得多:
Say you write print("Hello") and press Enter. What happens next is far more complex than it looks:
| 操作系统 | |
| Python 解释器 | |
| 操作系统 | |
| CPU | |
| 操作系统 | |
| 显卡 |
🎬 实例:在 B 站看一个视频
Example: Watching a Video on Bilibili
🖱️ 点击视频 → 鼠标发信号给 OS🖱️ Click video → mouse sends signal to OS🧩 浏览器响应 → 告诉 OS 要打开网络连接🧩 Browser responds → tells OS to open a network connection🌐 网卡收发数据 → 视频文件从服务器传到内存🌐 Network card transceives → video file transfers from server to RAM🎮 GPU 解码画面 → 每一帧画面实时渲染🎮 GPU decodes frames → each frame rendered in real time🔊 声卡播放声音 → 配合画面同步输出
🔊 Sound card plays audio → synced with the visuals
🐢 为什么有时候电脑会卡?
Why Does Your Computer Lag Sometimes?
🔹 内存不够:开的程序太多,"办公桌"堆满了,操作系统只好把不用的数据临时塞回硬盘(这叫"交换"),而硬盘比内存慢几百倍。
🔹 Not enough RAM: Too many programs open, the "desk" is full, the OS has to temporarily shove idle data back to storage (called "swapping"), and storage is hundreds of times slower than RAM.
🔹 CPU 忙不过来:某个程序占满了 CPU,其他程序只能排队等。
🔹 CPU overwhelmed: A program hogs the CPU, others have to queue up.
🔹 硬盘太慢:机械硬盘读写速度跟不上,换成 SSD 往往是最立竿见影的提速方法。
🔹 Storage too slow: HDD read/write speeds can't keep up — switching to an SSD is often the most immediate speed boost.
电脑会卡就像本蝴蝶会掉翅膀上的粉 一样的道理啦——开的网页太多 桌子堆满了 CPU 忙不过来 哪哪都不行(这不就是我DDL前赶工的状态吗,,)所以别同时开 50 个 Chrome 标签页了好吗!你们对内存也太没 B 数了!!
A lagging computer is like a butterfly losing wing dust — same principle. Too many tabs, desk full, CPU overwhelmed, nothing works (isn't this exactly me cramming before a deadline,,) So stop opening 50 Chrome tabs at once! You have zero sense of how RAM works!!
完整链路:从想法到结果
The Full Chain: From Idea to Result
👤 用户操作 User action↓📱 应用程序 Application↓⚙️ 操作系统 OS↓🖥️ 硬件执行 Hardware execution↓✨ 产生结果 Result
| 本章总结Chapter Summary |
💡 记住这个公式就够了
Just Remember This Formula
计算机 = 硬件 + 软件 + 程序
硬件提供算力 · 软件指挥硬件 · 程序是具体的指令
Hardware provides compute power · Software directs hardware · Programs are the specific instructions
所以你看,学计算机最浪漫、最酷炫的地方就在这里——我们不是在和某种神秘的高维生物打交道,而是在用一行行代码,去驯服最简单的物理规律。只要你掌握了给它下指令的语言,你就是这个赛博世界的"造物主"!
So you see — the most romantic, coolest thing about learning computers is this:We're not dealing with some mysterious higher-dimensional being. We're using lines of code to tame the simplest laws of physics.Once you master the language of giving it instructions, you become the "creator" of this cyber world!
🚫 常见误区澄清
Common Misconceptions
"程序员=修电脑的"这条我必须出来说句话——你们去电脑城修电脑的师傅 人家也不一定写代码啊!总之!别再让你身边学计算机的朋友帮你重装系统了!人家也是要面子的!!(虽然本蝶也没有面子这种东西就是了)
"Programmers = repair people" — I have to speak up on this one. The repair techs at the computer mall don't necessarily write code either! In short: stop asking your CS-major friends to reinstall your OS! They have pride too!! (Though as a butterfly, I don't really have such a thing)
💬 评论区激情吐槽区
Comment Section Rant Zone
你第一次觉得电脑"巨神奇"或者"巨弱智"是什么时候?
When was the first time you thought a computer was "amazing" or "incredibly dumb"?
欢迎在评论区激情吐槽!本蝴蝶会抓 3 个最搞笑的留言,送出 InfoCo 专属神秘周边哦~
Rant away in the comments! I'll pick the 3 funniest replies for exclusive InfoCo mystery merch~
(PS:再次强调,我虽然没手,但点赞真的不费事,求个在看呀!👇)
(PS: Again, I may have no hands, but liking really isn't hard — please give me a "wow"! 👇)
📅 下一章预告 | Next Chapter
第二章:编程语言入门
Chapter 2: Intro to Programming Languages
从 Python 开始,写出你人生第一行代码
Start with Python, write the first line of code in your life
好了好了 本蝶陪你们看到这里了!是不是收获满满!虽然给你们介绍自己的家有些诡异吧(x)但很高兴又有一批人类愿意加入这个巨大的家庭,希望你们可以在这个地方找到属于自己的路,我会一直在这里为你们每次的running成功鼓掌的!(振翅飞走ing)
Alright, alright, I've accompanied you all this far! Was it rewarding?! Though introducing my own home to you feels a bit weird (x) I'm glad another batch of humans is willing to join this big family. I hope you can find your own path here. I'll always be here, applauding every successful running of yours! (flutters away)
infoco社 · 计算机入门系列 · 第一章
InfoCo Club · Computer Science Basics · Chapter 1
让每个人都能看懂计算机
Making computers understandable for everyone















































































