You can rearrange the buttons in the order you like by Drag and Drop.
Background image copyright: NASA / Icons from Wikipedia

Change Background

What Is A Computer?



This blog post was written for my nephew, Eshan, who asked me to write about this subject.

You wanted me to write something for you about computers and so here is a blog post about them. This post comes after one about secret codes for a reason: computers are here because of secret codes and now they are everywhere. No matter what job they do, or where they are, all computers have a lot in common with each other.

The word computer is not modern. It was first used 400 years ago to describe a person who did maths. Someone who did calculations - or computations as they can be called - was a computer. Today we use the same word to talk about machines that do the same things with numbers.




A computer is a machine that can do maths of different kinds. It can do different sums, depending upon what it is told to do. The sums it is asked to do are called a program, and the person telling it what to do is the programmer. Programmers tell computers what to do by writing down the instructions in a special language that the computer understands.

The difference between a computer and a calculator is that a calculator needs someone to put in the numbers and read the results. A computer doesn’t need an operator. Once it has a program to follow it can get on with it alone without any help.

The idea of a machine that could do maths was thought of a long time ago, in the 1600s, but the first proper ones were made in World War II to do maths to break Germany’s powerful secret codes that were themselves created by machines. The first computers were not very powerful and were enormous: sometimes as big as rooms. At first they were hand-operated mechanical machines, but very soon after electric computers were invented. Ever since then computers have become more powerful and smaller year by year. Nowadays they are everywhere. In phones, in cars, in planes and even in watches. They are still getting smaller and more powerful.

No matter how tiny or fast they are, all computers are made up of the following parts:
The Number Factory
The most important bit of a computer is the number factory where the maths happens. The very first computer machines could only do one set of sums. To change what they could do meant changing the wiring of the machine, which was difficult and took a long time. So someone invented a programmable computer that could do different sums depending upon what instructions it was given. At first these instructions were short and simple but now they can be very long and complicated. For example, the maths needed to make a web browser surf the internet, or to play an audio file, as you are doing now, can be many millions of instructions. This is OK, because modern computers can carry out billions of instructions per second! The part of the computer that does all this work - the number factory - is known as the central processing unit or CPU.
The Memory
A computer reads instructions just like you are reading this blog post, from start to finish, but some instructions are more complicated. They could be like this:
From this line go back to the second paragraph of this blog post, read the first line, and then come straight back to this line without reading anything else inbetween and then carry on reading from here.
Or this:
Carry on reading, but do not read the last paragraph of this blog post if the time is after 3pm in the afternoon and before 10pm at night.
To do this jumping back and forth kind of reading you need a memory. To follow the first instruction I wrote above you would need to remember what I told you to do and then remember how to get back to the line of writing you started from. Every computer is the same, and so needs a memory.
A Language
Every different type of number factory has its own special language called a machine code. So the computer in a mobile phone can’t understand the language of a computer in a car, for example. Instead of having words made of letters, computers have words made of numbers. It would be very difficult and very time-consuming for humans to write instructions in machine code, and so instead they write the instructions in an easier to understand programming language. This is then translated into machine code by an translating program that programmers use called a compiler.


Parts to Put Information In
There has to be a way of giving the computer instructions. Information has to go in somehow to program it. There are lots of ways to do this with modern computers. A home computer will often have a keyboard and a mouse. Games console have gamepads. In a car there will be sensors, such as ones measuring how much air is in the tyres.
Parts to Get Information Out
There is little point in making a computer do a calculation if it doesn’t do something with the results for a purpose. So there will be parts of a computer to do something after it has followed the instructions in the program. You might be able to see information on a display screen, such as on a home computer or smart phone. A printer will write something onto paper. The computer could be connected to speakers so you may hear something after it does its work.

Computers are everywhere. The obvious ones are the personal computers and laptops in our homes, or the smart phones or tablet devices we carry around with us. The less obvious ones are those in modern cars, in shop tills, and now in wristwatches.

The reason computers are everywhere is because they are so useful. We can do incredibly hard mathematics with them, such as programming them to fly rockets in space, or to predict what the weather is going to be tomorrow or to work out how many miles a car has left before it runs out of petrol. We can play complicated games and make imaginary worlds on home computers and gaming consoles. We can talk to each other on phones, or over Skype; write letters and then print them out; or post them up on the internet for people to read.

I hope that gives you a helpful introduction to how computers work. We can talk more about them another time.

If you would like to listen to this blog post please press play on the Audioboom widget below:

0 comments:

Secret Codes

Why Do People Need Secret Codes?

Imagine you have a secret you want to tell your best friend, but nobody else. Perhaps last night you discovered you could fly. If everyone found out they would ask you lots of boring questions like, “What does my house look like from the sky?”, and your Dad would want your help cleaning out the gutters of the house. Yuk. Stuff like that.

If you were alone with your best friend in the same room then sharing the secret would be easy to do, but if he or she was somewhere else, or you were not alone, that would be more tricky. Somehow you would need to send the secret to that person in a way that only they could understand it. How could you do that?


You could make up your own special language that only the two of you could understand, but creating a brand new language would be very hard work and would take up a lot of time and practice; years probably. All that effort just in case one day you need to share a secret. That’s quite extreme.

How Secret Codes Work

A simpler way would be to use your normal language, but wrap up the message in a secret code. That would be a bit like sending a letter in a locked envelope. If you gave your best friend, and only your best friend, the key to unlock the envelope before you sent the message, then only he or she would be able to open it and know its true meaning. This is how all secret codes work.

I’m going to teach you a few new words. A secret code can also be called a cipher. Its pronounced ‘si-fer’. The original message in your language is called the plaintext. The message written in secret code is called the ciphertext. The act of turning a message into the coded message is called encryption; you encrypt the message. The act of turning the coded message back into the normal message is called decryption; you decrypt the coded message. The exact way encryption and decryption works is called the key for that particular code.

An Example: The Caesar Cipher

The best way to explain how this works is to show you. Let’s use a real secret code that was used a long time ago. It’s called the Caesar cipher, and is named after the famous Roman general, Julius Caesar, who used this way of encrypting his important letters, such as commands to his soldiers on the battlefield, so that his enemy wouldn’t understand them if they found them.

Let’s imagine that you want to send your friend the message “I can fly.”. The way this particular cipher works is that it swaps each letter in the message to a different letter in the alphabet to make it look like nonsense. The Caesar cipher transforms each letter into the letter 3 places further up the alphabet. They key to this code is +3. Other types of cipher transform letters in different ways to do the same thing. Our plaintext message is icanfly when written with no spaces inbetween. Now let’s encrypt the message. The table below shows how that transformation works for each letter of the alphabet using the Caesar cipher:
After encryption the message reads “MFDQIOB”.  That doesn’t mean anything to most people, does it? But to your friend, who knows what you have done, it does. When they receive the message they know they need to do the opposite transformation to be able to read it. In this case, they will need to change each letter in the ciphertext to the letter 3 places before it in the alphabet and then put the gaps back in sensible places so that the message makes sense:
So your friend will turn MFDQIOB into icanfly and then understand that you have cracked the ability to fly.

There are lots of ways of turning plaintext into ciphertext and back again. The history of secret codes is interesting on its own, but one of the most wonderful things about it is that nearly 80 years ago some British people who were trying to break some secret codes that they didn’t have the keys for created the World’s first computers to help them. I’ll tell you more about that in my next blog post.

EBHEBH

If you would like to listen to this post then click play on the audioboom widget below:

0 comments: