Skip to content
Byte Sized
Academy
Support
Lessons
About
1
Home
/
Lessons
/
Code Bytes
8 lessons
"How Computers Work"
One idea per video, in order. Start at the top and work your way across.
Bits and bytes
2 lessons
· swipe for more
"How Computers Work" · EP1
Bits and bytes
A bit is one binary digit, a 0 or a 1, like a tiny switch that is off or on. Every extra bit doubles the number of patterns, and eight bits make a byte, which has 256 patterns.
"How Computers Work" · EP2
How text is stored
A computer stores text by giving every character its own number from a big table, today called Unicode, and storing that number in bits. In Python, ord() gives a character's number and chr() turns a number back into its character.
Hardware
3 lessons
· swipe for more
"How Computers Work" · EP3
The CPU
The CPU (central processing unit) carries out a program's instructions, one tiny job at a time, like add, compare or move. A clock paces it; each tick is a cycle, and 1 gigahertz means 1 billion cycles every second.
"How Computers Work" · EP4
RAM vs storage
RAM (random access memory) is fast working memory that holds what the computer is using right now and forgets it when the power goes off. Storage is bigger and slower, but it keeps your files with the power off. A Python variable lives in RAM; to keep it, save it to a file in storage.
"How Computers Work" · EP5
The fetch-decode-execute cycle
A CPU runs a program by repeating three steps for every instruction. Fetch grabs the next instruction from memory (RAM), decode works out what it means, and execute does the job. Then it starts again. That loop is the fetch-decode-execute cycle, also called the instruction cycle.
Software layers
3 lessons
· swipe for more
"How Computers Work" · EP6
What an operating system does
An operating system (OS), like Windows, macOS or Linux, is the software that sits between your apps and the hardware. It hands out memory, keeps files on storage, controls devices like the keyboard and screen, and shares the CPU by giving apps tiny turns, so fast they seem to run at once.
"How Computers Work" · EP7
Machine code vs high-level code
A CPU only understands machine code, instructions written as patterns of ones and zeros, each doing one tiny job. People write high-level code like Python instead, which is close to human language and far from the hardware. A translator program turns that code into machine steps the CPU can run.
"How Computers Work" · EP8
What a compiler does
A compiler is a translator program. It reads your whole program and turns it into machine code before it runs, so the translated program can then run again and again with no more translating. If it finds a mistake such as a missing bracket, it stops and reports it, and no program is made. Python checks and translates a whole file first too, before running any of it.
More Code Bytes topics
All topics
8 lessons
"Start Here: What Is Coding?"
The big picture · Thinking like a coder
17 lessons
"Intro to Programming"
What code is · Data · Decisions and loops · Functions and lists · Debugging
5 lessons
"Web Fundamentals"
How the web works · HTML