Tag Archive: tablets


Logic Gates In Your Tablet -Part 2

We’ve seen that nearly all computer systems including one adopted on tablets – work by translating user actions in the application layer, or the Operating System, into what the Central Processing Unit or CPU does. Most of this translation happens because applications are written in higher-level programming languages that are designed to be human-readable, whereas CPUs can only understand machine (‘assembly’) code. The translation is performed through a number of layers, and happens mostly at the kernel, which is the ‘heart’ of any Operating System.

So how does the CPU in your tablet unit work? We’ve said that the CPU only understands machine code. Would you like to see some? Here it is:

[  op  |        target address        ]

2                 1024               decimal

000010 00000 00000 00000 10000 000000   binary

What on earth does that mean? Actually, very few people would be able to understand it. The 1s and 0s on the bottom line are the instructions to feed to CPU. In the line above – what we might call an abstraction layer – we’ve converted it in to a human decimal number, and in the line above that (another abstraction layer, perhaps), we’ve explained what each of those numbers refers to.

So what’s actually inside your CPU? This is where ‘logic gates’ come in. A CPU will perform operations based on a 1 or a 0. We could think of that as being ‘open’ or ‘closed’. In the example above – that is target address (CPUs contain many millions of logic gates) – we’ve told a particular set of logic gates to be ‘closed, closed, closed, closed, open, closed’. This will correspond to a particular function that the CPU could do, for example managing where some memory is being stored.

These logic gates don’t contain the whole story. Each gate is constructed out of a number of transistors. These tiny components in your tablet are very similar to switches; with only a tiny input of electricity, they can switch between open and closed, or between 1 and 0. The best bit for the people who discovered them (Shockley, Bardeen and Brattain, in 1947 -for which they were awarded the Nobel Prize in Physics, in 1956) is that once a transistor is in one state, it stays like that until it’s changed, with no extra required energy (known as the hysteresis effect). So, despite the fact that the tiny CPU (which could be only a few millimetres across in your tablet) contains millions upon millions of these things, the whole affair can run on relatively small voltages. That means your tablet uses its battery more efficiently, and you get a longer battery life.

So, that was a whirlwind tour through the role of logic gates in your tablet PC. Along the way, we’ve taken a look at some serious Computer Science concepts; including abstraction, machine code, and the role of the kernel. The most amazing thing is that these concepts are ubiquitous. Whether you go with iPad or Lenovo’s Android tablet and it’ll run in the same way. So what makes the difference? These real come in the kinds of applications and programs that run in the Operating System layer, as well as the way the Operating System kernel communicates with the hardware layers below it. If you’d like to know more, take a look at some of the CS courses on iTunes U, which go in to far more detail on all of the concepts we’ve introduced here.

Logic Gates In Your Tablet – Part 1

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.

Follow

Get every new post delivered to your Inbox.

Join 45 other followers

%d bloggers like this: