Any Computer Science student will start their course by learning about logic gates: what they are, how they work and why they’re indispensable inside computing devices. What’s special about logic gates in your tablet? In this pair of articles, we’ll take an in-depth look at the technology behind the magic.
Our story starts from the user, and drills downwards. What you see on your tablet screen is the result of many components inside working together to visualise software. You usually interact with a program – which is a series of specific instructions for the Operating System to interpret. Your Operating System is the software that runs everything else on your tablet. For example, the operating system ‘Android’ – what is found in an Android tablet, the most popular tablet devices – converts user input in a program to what the machine actually does inside.
At the heart of your tablet is the Central Processing Unit, or CPU. This is an extremely highly-tuned brain that is very good at completing specific, usually mathematical, tasks. CPUs in most devices, from tablets to laptops, only understand one, very simple, language. This language is called ‘machine code’, and it’s virtually unreadable by humans. In fact, it has been said that the US Patents Office cannot determine if a program written in machine code is original or not, so complex is the language. Most programmers, who write programs for computers, write in more ‘human-readable’ code languages which are then compiled by a program designed to ‘translate’ it in to machine code.
At the heart of the Operating System is something called the ‘kernel’. The kernel interprets between user commands in applications, such as clicking ‘send’ on an e-mail, and the CPU. A CPU would not be able to understand ‘click here and send my e-mail’, unless the kernel was there to translate that in to machine code. The kernel contains libraries which help it to do the translating, as well as containing things like drivers, which allow it to translate between things it wouldn’t normally understand. Without drivers, for example, the kernel would not understand whatever code the movement of a plug-in mouse would provide.
The kernel speaks to the hardware through a number of abstraction layers. These are layers designed to help code move quickly between the user interaction with the operating system, and the CPU’s execution of the relevant code. They also make it easier to build applications for users, as each abstraction layer ‘hides’ or ‘summarises’ some of the more complicated things that machine code does at the basic level. The programmer can then use these ‘summaries’ to write programs, which are translated back as they pass from the Operating System to the CPU.
In the next article, we’ll take a look at CPU architecture in computing devices including tablets; how they are designed, and what role logic gates have to play in how they work.