Get startedGet started for free

Introduction to a Computer: Architecture & Execution

1. Introduction to a Computer: Architecture & Execution

Welcome to this course! In this course we will introduce you to details of how a computation works. We'll start exploring how the core components of a computer execute instructions and build from there. This course assumes you have a basic understanding of computer components.

2. Your Instructor: Pritesh Patel

ello, everyone! Over the past 20 years, I’ve had the opportunity to tackle some of the most complex problems across a wide range of industries including logistics, media, retail, energy, manufacturing, and finance. I've tackled these problems using an equally diverse range of technologies from the early days of NLP, Search, data science, and visualizations to the latest breakthroughs in LLMs. These solutions that have driven billions in impact. At the heart of all this lies the foundations of computation—the timeless principles that enable us to navigate diverse domains, adapt to evolving technologies, and solve even the toughest challenges. In this course, you’ll master these foundations, empowering yourself to innovate, excel, and thrive in any field. Let’s get started!

3. Components of a computer

Lets start with an analogy. A computer is like an office: the desk with a worker is like the CPU (central processing unit) where immediate work happens. The filing cabinet is RAM (random access memory) which is quick access to active files with limited capacity. The archive room is like the hard drive that keeps larger capacity and long-term data but is slower to get to, and instructions are like software that guide the worker to complete tasks. Communication tools like the phone is like io (input/output) that allows connection to the outside world. A mouse and keyboard is io. Together, they create an efficient system for completing tasks. To grasp computer science, it's crucial to understand the core brain of the computer and how it executes instructions. So we will focus on the CPU. Let's dive deeper.

4. How the CPU executes

To understand how software and hardware work together, lets look at the computer’s brain, the CPU. The CPU fetches, decodes, and executes instructions through its core components: the Control Unit, Arithmetic Logic Unit (ALU), and registers — all operating in binary, the language of 0s and 1s. Its not important to memorize these components and processes but the animation helps us visualize, generally, how code turns into action. Let’s dive into the more important topic of understanding binary.

5. Binary basics

In binary, every number is built from just 0s and 1s, unlike the decimal system that uses symbols 0 through 9. For example, the decimal number 5 is '101' in binary, and 10 in decimal is '1010' in binary. Don't worry if you don't understand this yet, next we will dive into how to read binary.

6. Binary math - convert to decimal

Let's dive into how to convert binary numbers to decimal. The process is simple: each position in a binary number represents a power of 2, starting from 2? on the right most number. This is similar to the decimal system that we are used to where each position is a power of 10. To illustrate, let's convert the binary number 1010 back to decimal 10. We calculate it by multiplying each digit by the power of 2 corresponding to its position from right to left: The rightmost digit, 0, is 0x2^0. The next digit, 1, is 1x2^1. The next digit, 0, is 0x2^2. The leftmost digit, 1, is 1x2^3. Then you add all these together. So, 1010 in binary equals 1x2^3 + 1x2^1, which is 8 + 2, giving us 10 in decimal. As you can see in the animation, this approach is similar to the decimal system that we are used, where each position uses powers of 10 rather than 2. Whether it’s powers of 2 in binary or 10 in decimal, the concept is the same: it's all about positioning.

7. Let's practice!

Now let's take a look at some exercises that will help solidify our understanding of Binary.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.