All of a sudden, the complexity of a computer's process is made clear - and it is not so complex! The instructions were simple. The insight was tremendous. In prison, they force religious studies and practices on you. Level has that relief of learning without being shoved full of righteous notions.
Preview the content in this guide
We've included the first few sections as a preview of the content in Computer Science Without A Computer Volume 1. Enjoy!
Table Of Contents
- About this guide
- Our story
- Computers run on numbers
- Computers detect and correct errors
- Computers create trust by protecting information
- Conclusion
- Glossary
About this guide
Computers have changed the world. Computer science, the field of studying and working with computers, is full of opportunities. It offers possibilities for good jobs where you can get paid well to do interesting work, even without a college degree. Some computer science jobs don’t even require high school diplomas. This guide will introduce you to this exciting field by giving you a first taste of how computer scientists think.
You might be wondering how you can learn about computer science without a computer. The English mathematician Ada Lovelace wrote the world’s first computer programs in the 1840s, and she did this a hundred years before the first computer was built. Even today, computer science is often taught around the world without a computer in sight. This is possible because the heart of computer science isn’t the use of a computer, but rather the use of logic to solve problems. You don’t need a computer to learn and practice logic or problem-solving. In fact, it can be better to learn the fundamentals of how computer scientists think before you start programming or working directly with a computer to solve problems.
This guide is not intended to teach you how to write code, work with a database, use a computer, or operate an iPhone. Those are all valuable skills that you can (and should) learn as you continue your journey learning about computer science. If you want to take the very first steps toward exploring how computers work, then this guide is for you. If this guide energizes your brain and makes you want more, then computer science is likely a great fit for you and we encourage you to continue your learning journey.
Our story
This guide is based on decades of work by Tim Bell, Mike Fellows, and Ian Witten. Our group, now based at the University of Canterbury, teaches people around the world about computer science, all without turning on a computer or having internet access. Our strategy, called CS Unplugged, focuses on the fundamentals of logical thinking to teach people to think like computer scientists before they go on to start writing code. We believe that even complex topics like public key encryption can be explained with real-world, simple examples that don’t even need electricity. We’re excited that you’ve joined us to learn the foundations of computer science!
Lesson 1
Computers run on numbers
Imagine you are in a grocery store, buying a can of soup with a credit card. That sounds simple and mundane, but the complexity is staggering since the average grocery store carries over 40,000 different products! A computer system keeps track of inventory and prices. When you check out, a computer makes sure multiple things happen correctly: that you get charged the right price for the right item, that you get charged for the soup (not someone else), and that your financial information is protected during the transaction. In just one grocery store, these crucial processes happen hundreds or thousands of times a day.
If you’ve ever used a smartphone, tablet, modern TV, or a newer cash register, you’ve used a computer. What makes computers special is their ability to handle a lot of data quickly and accurately. By data, we mean numbers. Just like people think in words and images, computers “think” in numbers. It’s in the name – “compute” means calculate, or do math.
Nowadays, computers can do more than math problems. They take the raw material of data – numbers – and instantly process it into information like words, pictures, and videos. How? The key is binary numbers – a way of writing numbers with just 0s and 1s.
Binary numbers are fundamental to computer science. Computer scientists and programmers generally do not write, talk, or program in binary. Still, they have a deep grasp of how computers use and calculate binary numbers. Understanding them will help you understand digital devices – their uses, limits, and patterns. Let’s explore them.
How binary numbers work
The numbers used by computers look different from the numbers people use in everyday life. Typically, we use ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). This system is known as base-10, or decimal, from the Latin word for “ten.”
Computers use a simpler system, with only two digits: 0 and 1. This system is known as base-2, or binary, from the Latin word for “two.” Binary digits can represent every single number that exists.
Here’s a simple card game to help explain this concept. First, use scraps of paper to make five cards. On one side, write a big 1 in the middle of each card. Under it, smaller, write the numbers 1, 2, 4, 8, and 16 – one smaller number per card, as shown below. On the other side of each card, write a big 0 in the middle. Place the cards in front of you, in the order shown below, with the 16 on the left and the 1 on the right. Each of these cards represents one bit. The word “bit” comes from the first two letters of “binary” and the last letter of “digit”: binary digit. The large 1 and 0 numbers are the binary digits, and the smaller numbers at the bottom are there just to help you translate from the normal decimal numbers you’re used to.
Just like decimal numbers, binary numbers are read from left to right but increase in value from right to left. The farthest digit to the right has a value of 1. The second digit from the right has a value of 2. The third digit from the right has a value of 4. The fourth digit from the right has a value of 8. And so on. Moving from right to left, the value of each binary digit doubles. Each digit is either on or off, yes or no, true or false. 1 means the value in that place (1, 2, 4, 8, and so on) is counted, and 0 means it is not counted.
You can represent different numbers by flipping cards so that the correct total of small numbers at the bottom is showing. Turn over other cards you’re not using to show a 0. For example, you get the number 6 from showing 4 + 2, as shown below. So the decimal number 6 is 00110 in bits.
Now, try to write the decimal number 19 in bits. What combination of cards will add up to 19 in binary?
The decimal number 19 is 16 + 2 + 1, or 10011 in binary.
To make even bigger numbers, we need more cards! If you made another card to the left of the one with 16 at the bottom, what would be its value? What if you added three more cards?
Is this what you predicted?
As you’ve seen before, going from right to left, the value of the bits doubles, or multiplies by 2 – that’s why it’s often called base-2! Notice that the smaller numbers below are just an indicator of the place the card is in – the value of each bit comes from its place (how far it is from the right).
Let’s use these extra digits to write some larger numbers in bits. For example, 53. You can do this by starting at the left. We can’t use the 128, since it’s way bigger than 53. 53 is also less than 64, so we will start with 32 and add our way up to 53.
32 + 16 = 48 – almost there!
Adding the 8 would give 56, which is too big, so make the 8 card a 0.
48 + 4 = 52
The 2 would be too big.
52 + 1 = 53
So: 32 + 16 + 4 + 1 = 53
Each of those bits gets a 1, and the others get 0s.
So 53 = 00110101. We’ll leave the extra 0s in the front because computers generally work with 8 bits at a time. Eight bits is called one byte (pronounced like “bite”) of information.
PRACTICE
Try these out! The answers to these practice questions are at the end of the guide so you can check your work. You do not need to send us your answers to the practice questions – they are just for you to work on to make sure you understand the concepts as we go.
- Write these three numbers in binary digits. Use your cards if you like! 5, 14, 23
- What is the largest number you can write with 5 cards (with numbers from 16 down to 1)? What is the smallest? Write them in both binary and decimal.
- Write these three numbers in bits. 182, 96, 207
- What is the largest number you can write with a byte (8 bits)? Write it in binary and decimal. What’s the smallest number?
Hopefully, you found in the practice section that a byte can represent the numbers from 0 (00000000) to 255 (11111111). That’s 256 numbers, using just 1s and 0s. To write larger numbers, we could simply add more bits. Once you practice with binary numbers frequently, you’ll not even need the smaller helper numbers at the bottom. You’ll be able to know what binary digits mean just based on the place of the digit.
So, how exactly do computers use bytes to store words, pictures, and videos? Great question – we’ll answer that right now.