Chapter 3 Binary Data to Computations
Now that we are familiar with transistors and binary data, we will next discuss how computers process and store data.
3.0.1 CPU - Central Processing Unit
The CPU is often called the brain of the computer. It has some confusing additional names, because it is such an important and prominent part of the computer, as it performs and orchestrates computational tasks “Central Processing Unit” (2021).
It is sometimes called a processor or microprocessor (but technically these terms include both the CPU and other elements). The CPU is often what people are referring to when they describe a “computer chip” (which again technically includes other elements) “Central Processing Unit” (2021).
The CPU is made up of several components, a few that are particularly important (two of which we have discussed):
- Arithmetic Logic Unit (ALU)
- Registers
- Control Unit (CU)
A group of these components together is called a core. Multiple cores together are also referred to as CPUs. As you can see describing this can get kinda tricky.
The component that we haven’t yet discussed, the Control Unit, coordinates the ALU and the data stored in the registers, so that the ALU can perform the operations on the right data stored in the registers at the right time (Bräunl 2008).
Modern computers now have multiple cores. What does this mean?
This means that there are multiple groups of the above components that can each process data within the same computer. A dual core CPU is a chip with two cores. A quad-core CPU is a chip with 4 cores and so on. This allows modern computers to perform multiple tasks at the same time instead of sequentially, such as 4 tasks simultaneously on a current typical laptop (with 4 cores). This makes our computers much faster than they used to be (“Central Processing Unit” 2021).
In addition to the main CPU or CPUs or cores (chose your favorite name), computers may be equipped with specialized processors called GPUs which stands for graphics processing units that are especially efficient at tasks involving images (gaming et al. n.d.). Thus often tasks that involve images are done using the GPU(s) and not the CPU(s). This frees up the CPU(s) to continue on the tasks not involving images more efficiently. Note however, that GPU processors are also “generally programmable” (meaning they can work with different types of data) and can also be used to perform tasks that don’t involve images (gaming et al. n.d.). It’s also really good at doing something called parallel processing, which means dividing up a single task into multiple pieces that can be run simultaneously and thus allowing for running a task more efficiently overall. People also use GPU graphics cards which can add additional GPUs for more computational power (gaming et al. n.d.).
Hyper-threading is also an option for improving processing. This technology started in 2002 by Intel (“Hyper-Threading - Wikipedia” n.d.). The idea is that while part of the same core is idle or waiting for a given task, another part of the same core can work to perform another task. This isn’t as efficient as a having another core or CPU, but it does improve efficiency (“What Is Hyper-threading HP® Tech Takes” n.d.; “Hyper-Threading - Wikipedia” n.d.). So many modern computer chips actually use all three efficiency boosters (having multiple cores, having GPUs, and using hyper-threading). Thus a chip with 4 cores that also has hyper-threading can work on 8 tasks simultaneously. Since it is now much easier to produce chips with multiple cores and because there are some security concerns with hyper-threading, the field seems to be moving away from hyper-threading [(“What Is Hyper-threading HP® Tech Takes” n.d.; “Hyper-Threading - Wikipedia” n.d.).
3.0.2 Memory or RAM - short-term memory
OK, so we have already talked about how data can be stored in the registers within the CPU. This data or memory is used directly by the CPU during operations or tasks. However, our CPUs need additional quick access to instructional data to tell the CPU what to do to perform the operations and what data to use. This is also the data in a file that we are working with at a particular moment in time (“What Is RAM (Random-Access Memory)?” n.d.). This bring us to RAM, which stands for Random Access Memory. It is often simply referred to as memory. Ram is similarly made out of transistors and capacitors like the registers within the CPU, but it is located nearby but outside of the CPU (“What Is RAM (Random-Access Memory)?” n.d.; “How RAM Works” 2000). This type of memory is that it is temporary. Data is stored in RAM for only a short time, while your computer is running a task on it, but then it disappears. Due to the fact that what is stored disappears, this type of memory is also called volatile. This is why when you are working on a file, but forget to save it, you might lose your work (“What Is RAM (Random-Access Memory)?” n.d.; “How RAM Works” 2000).
For more information about how RAM works, check out this website (“How RAM Works” 2000).
3.0.3 Storage - long-term memory
We can also store data that we aren’t directly using when our computer is performing operations. So for example, our excel files and word files that aren’t currently in use. This type of memory is called storage and is sometimes referred to as long-term or non-volatile memory because electricity is not required to preserve this data. This type of memory is stored using hard disk drives (HDDs) also called hard drives or more recently solid-state drives (SSDs). The reason accessing this memory is slower than accessing data stored in RAM is that it is located further away from the CPU and data needs to be transferred from the storage to the CPU along a wire when a user wants to perform operations on such data. In addition the right data needs to be found out of all of your files, which also takes some time. Furthermore, the way in which data is retrieved from HDDs and SSDs is slower than that of RAM. This type of storage allows for much larger data capacity than RAM and it is also cheaper (“What Is a Hard Drive?” n.d.; “How a Hard Drive Works - ExtremeTech” n.d.).
Hard disk drives store memory using magnetic methods (“How a Hard Drive Works - ExtremeTech” n.d.), while solid-state drives store memory using chips that have guess what??
They are made of yet again the important basic building block of computers - tiny bees! Oops, I mean transistors yet again, just like the CPU chip! See, those transistors are really important.
SSDs allow for much faster reading and writing of files, as well as increased reliability. However, they are more expensive and they also wear out eventually (“What Is SSD (Solid-State Drive)?” n.d.).
Here’s a great explanation for how HDDs work and the difference with SSDs. It will also introduce the concept of caching, which allows for faster use of data from storage for the CPU. It is a special kind of memory that’s even faster and closer to the CPU than RAM (“CPU Cache” 2021):
See this link for more information about how SSDs work, and see here for an in depth explanation.
3.0.4 Hardware and software
So far we have talked about the hardware of a computer, which is the physical components of a computer, while software is the code that tells the hardware how to function (“Computer Hardware” 2021; “Software” 2021).
Software is also important to know about. Most importantly it is useful to know about operating systems.
3.0.5 Operating systems
The operating system (sometimes simply called the OS) is a set of code or software that translates user interactions with the computer to tell the hardware (including memory and the CPU) of the computer what tasks the user wants the computer to perform and when (“Operating System” 2021).
You can think of this as the basic code to keep the computer running and functional and to allow the user to use other forms of software, such as applications (“Operating System” 2021). Applications are specialized software programs like Microsoft Word, or an internet browser like Chrome that allow a user to do specific tasks on the computer. So your OS is what allows you to name, rename, move and save files. It helps you to keep track of memory and decides what memory should be used when and to run all of your application software. It also allows you to talk to other devices like printers or other computers.
Examples of commonly used operating systems on computers and phones are:
- Microsoft Windows (such as Windows 10, Windows 11 etc.)
- macOS (notice the OS here - it might make more sense now why it is called this)
- Unix
- Linux
- Android
Recall that we previously talked about how computers today are often called 64-bit? Operating systems are also designed in this way. A 64-bit operating system expects the hardware of the computer to allow for processing at least 64 bits of data at a time (the word size) (“Word (Computer Architecture)” 2021). If we have registers of at least this length in the CPU, than we can in fact perform operations on data that may be up to 64 bits in length. This also means that we can perform operations on values that take up less than 64 bits. This can be important because if you try to use an operating system that expects a longer word size than the hardware can accommodate, for example a 64-bit operating system on a 32-bit computer, this will not work. Application programs are also designed according to different word sizes and again you need to choose options that are equal to or less than the word size that your CPU can accommodate (“What Is 64-Bit (Wow64 and X64)?” n.d.).
3.0.6 Historical context
Previously, back when a university might have one single computer, as they were so large and expensive (they didn’t use those nifty small transistors of today), computers didn’t have sophisticated operating systems and only one task could be performed at a time by one person at a time. Back then, tasks were just manually started, prioritized, and scheduled by humans. Tasks or programs (including sometimes data) could be printed or punched on cards (called punchcards, punch cards or punched cards) that would be loaded into the machine. Data and code would be manually indicated by punching or creating a hole in the card in certain locations. For example, columns might indicate different numeric or alphabetical values. It could really be a pain for users if they accidentally dropped the cards for the program they wanted to run, as you can imagine (“Punched Card” 2021)!
There were many different kinds of punch cards over time, see Scott (2016) for a collection.
The first operating system just allowed different programs to be run sequentially without someone manually starting each one. Now our personal computers can perform multiple tasks at the same time and schedule future tasks that our automatically run.
Check out this video if you want to learn more about how these punch cards worked. See Tj (2017) for more information about operating systems and “Punched Card” (2021) for really interesting information about the history of punched cards. Also check out “History of Computing Hardware” (2021) for really interesting and more extensive history about how computer hardware was developed.
Also, here is some fascinating additional reading on the role of women as computer operators starting in the 1940s. Initially computer science was actually thought of as a field for women, however this changed over time (and now women and gender minorities are hopefully becoming more represented) :
3.1 Conclusion
We hope that this chapter has given you some more knowledge about how computers actually function.
In conclusion, here are some of the major take-home messages:
- The central processing unit or CPU contains the Arithmetic Logic Unit or ALU which performs operations on data using transistor logic gates
- A CPU chip can contain multiple cores (also called CPUs) allowing a computer to perform multiple operational tasks at a time
- RAM is the memory for a computer for the tasks that its currently working on and is very fast to access because it is close to the CPU
- Storage on a hard drive or solid state drive is the memory for a computer that is long-term, such as files that you aren’t currently working on. It takes longer to access data from this memory as it has to travel to the CPU
- The operating system is what tells the computer what the user wants the computer to do and when
Now that we know how a computer works in general, we will next discuss computing capacity, especially for informatics research, and how servers and cloud computing can help.