Living in a digital world
In the last three decades, computers have changed our world beyond recognition. And underpinning that technological revolution has been the language that computers speak – the language of computer code.
Code does more than just power our emails or the latest apps on our smartphones. Even a simple shopping trip now relies on code to make it run smoothly.
As with any foreign language, code is pretty much incomprehensible to those of us who don't know it. But with a few basic concepts, we can understand more about how it runs so much of the world around us.
The language of computers
Like human languages, computer code has a structure, vocabulary and rules that make it work.
The language of computers
Presented by Lauren Laverne
The world we live in today is one driven by computers. In almost everything we do, they are behind the scenes – making things happen with greater speed, precision and convenience.
Take music. The way we buy and listen to it is unrecognisable from a decade ago. And it’s not just music – everything has changed. And it’s all because of computers and the language that they speak. Because so much code goes on behind the scenes, it’s easy to think of it as something totally alien. But it’s just a language, which surprisingly makes quite a lot of sense.
Take this record. I can look at it and from its words and visual language, I can understand what it is and who it’s by. But a computer can’t read those. It needs a language it can understand – and that is the language of computer code.
This barcode is a unique number that identifies the record as a specific thing to a computer. A digital noun, if you will. But this noun is just one part of a global language which, when used together, allows you to construct almost anything you can imagine.
And understanding that language is simpler than you think.
Giving objects a digital identity
Computers don’t talk about objects with words, the way we do. Instead, the basic building blocks of the language of computer code are just two numbers – zero and one.
Computers still need to be able to distinguish between millions of different objects and exchange information about them with each other.
Barcodes help bridge this gap – they give physical objects a digital identity.
In a standard barcode, white bars are read as 0s and black bars as 1s. A computer interprets the series of 0s and 1s as a ‘digital noun' that identifies an object, so it can find out information like stock details and cost. And digital nouns also allow computers to do far more complex things.
Giving objects a digital identity
Presented by Lauren Laverne.
To you or me, this is a record. We give physical objects an identity with words. But computers don’t understand words. They use an altogether different language – and barcodes are part of that language.
A barcode names the record using a 13-digit number. Look closely and we can see how it tells the computer what each digit is.
What looks like thick and thin lines is actually a combination of seven vertical bars – some white and some black.
The white bars reflect the light and are recognised as a nought. The black bars don’t reflect the light as much and so these are recognised as ones. This is a way of communicating in binary – the alphabet of computers.
These seven black and white bars produce this sequence of ‘noughts’ and ‘ones’, which a computer recognises as the digit ‘five’. The next set of seven black and white bars is recognised as the digit ‘three’.
Once the computer works out all of the digits, it strings them together to make the 13-digit identification number. It then looks this number up in a database to find out what it is.
By giving items like this record a unique digital identity, computers right across the world can communicate with each other.
Secret language of devices
Computers use digital identities to recognise each other and to exchange information. Sending a series of secret messages to your car from its key fob reveals the ingenious code that locks the door.
Secret language of devices
Presented by Lauren Laverne.
Computers describe objects in the world by giving them a digital identity. But to have real power, the language of computer code needs a more fluid way of naming things in different situations and in conversations between different devices.
The conversation that goes on between your car and its key fob is a great example.
The car and its key fob both share a digital ID. When I press the button, the signal is broadcast in all directions, looking for my car.
Once it’s worked out who it’s talking to, the fob and car shake hands. The fob then sends out an instruction to the car. It’s encrypted with a secret key. The message contains a counter which keeps tabs on the number of times the key fob and car have communicated.
Using the same secret key as the fob, the car decrypts the message. If it finds a counter that matches its own, it carries out my instruction.
All this in a fraction of a second – thanks to a private conversation between my car and my car key.
Now if you take these digital objects and their descriptions and give them instructions, you can get code to do stuff. And that means taking control of things in the real world.
You might find it’s easier than you think…
Coding your way across the road
Code lets computers make decisions and control the world around us. Take traffic lights, which can respond to how many cars are on the road, or a pedestrian pressing a button at a crossing.
Click or tap the hand below to take control of a traffic system.
Powering human conversation with code
Today, computer code lets humans communicate with each other on a global scale. From the world wide web, search engines pull out the information we want in an instant. Slow the process down, and you can see how it happens – watch the video below.
Powering human conversation with code
You might not realise it, but something as everyday as searching the web means that a computer is performing an incredibly complex task – picking through billions of web pages to find the one you’re looking for.
And it’s computer code that makes this possible – code on your phone but also code in the search engine, running on computers that could be thousands of miles away.
Search engines constantly index the web and create something incredible – a vast catalogue of human knowledge.
Without indexes, it just wouldn’t be possible to find anything. Imagine trying to find a recipe in a cookery book without an index. Now imagine trying to find the right recipe from millions of cookery books.
The words that I type on my phone are sent to the search engine for analysis. If a word seems unusual, it checks to see if it’s a misspelling.
The search engine moves to lists of similar words that, from past experience, are more likely to be what I intended. It also uses these lists to work out what I’m after. For example, ‘vegetarian’, ‘vegetable’ and ‘vegan’ are all noted alongside my original word – ‘veggie’.
For each key word, the search engine will look through the indexes and pull out pages that contain them. It then compares the lists for each word to find overlapping pages in both.
These pages are then ranked into order of relevance according to lots of factors. Things like, ‘How often do the search words appear on the page?’, ‘Are they near the top or, even better, in the title?’, ‘Are the words you type in close to each other on the page?’
The different search engines use different programs, but they all attempt to read my mind and present me with what I want.
And in less than a second, what I get is a nice ordered list of the best results from billions of webpages.
The power of computer code, for me, is the ability to change the world with something that comes out of the human imagination.
Just like a novel can create an entire universe through the use of language, computer code can be used to create systems that do truly remarkable things.
Learn more about this topic:
Computer Science: Problem Solved. collection
In this series of short films Dev Griffin looks at the use of technology and computational thinking in daily life and how it might be applied in the future.

How to think like a computer. collection
Explore the principles of computing and computational thinking in these short films for secondary schools.

Are gaming jobs just for coders? document
In this interactive article vloggers and presenters Dan and Phil explore the range of career opportunities available in the gaming industry.
