This page looks best with JavaScript enabled

Computer Hardware Fundamentals 1: Processors

 ·   ·  ☕ 9 min read

Hardware

Hardware is any component you can break with a hammer. The physical components that we can (usually) see and have mass and volume and all those other nifty attributes of solid objects. Conversely, software is a set of instructions for performing a task. So software is more like an idea or a process. Computers are special kinds of hardware that can turn immaterial software (ideas) into physical effects by manipulating hardware (objects).

This series of articles focuses on how computer hardware is organized to accomplish this task.

Processors

Processors are the "brains" of the computers. They interpret commands (software) and output commands to control other hardware. Thus processors are the key to allowing software to control/influence hardware--they take ideas and turn them into physical phenomina. More specificly, they take in electrical signals in the pattern of computer instructions, then they output electrical signals that represent commands and information for other parts of the computer. Generally electrical signals are encoded by being HIGH (such as above 2V) or LOW (such as below 2V) and are thus represented in binary as a 0 for LOW and 1 for HIGH, by adding subseqent digits we can represent anything that can be represented by a number. The instruction to add two numbers might be encoded LOW LOW LOW HIGH LOW LOW LOW LOW HIGH HIGH (0x83) and so on. A number like 22 might be encoded as LOW HIGH HIGH LOW HIGH LOW LOW LOW (0x16). A letter like "B" might be encoded as LOW HIGH LOW HIGH LOW HIGH (0x42).

Circuitry in the processor allows the processor to create something akin to a giant flowchart, where there would be an entry somewhere where if the inputs are LOW LOW LOW HIGH LOW LOW LOW LOW HIGH HIGH, then the signals representing the numbers to be added would be sent to a section of the processor that handled adding, and then the result of the addition would be sent or stored somewhere to be used later (perhaps sent to the computer screen to display). This flowchart is built from simple electronic devices called logic gates, these usually two inputs and one output. There are gates that will only send a HIGH signal out if both of its inputs are HIGH (an AND gate) or perhaps only send a HIGH signal out if either one of its inputs are HIGH (an OR gate), from these primative structures1 we can build any kind of If-this-then-that logic (this is called Boolean logic)2

Central Processing Unit

The Central Processing Unit (CPU), is the most important processor in computer. It executes instructions for the Operating System and the Applications you use. Theoretically, it controls all of the other processors and, by proxy, all hardware in the computer3. When the computer is started, the first instruction of the Operating System is loaded into the CPU to begin running the user environment and applications.

Multicore Processors

As manufacturing improved, we were able to make processors with smaller transistors, thus smaller logic gates, and thus MORE logic gates per chip. This allowed us to work on bigger chunks of data at a time, implement more kinds of instructions, and since the transistors are closer together now, we could do it with less power and it will work faster. This is how we made computers faster in the 90's and the early 00's, along with increasing the clock speed (how often the processor executes an instruction per second). However, in the 2000's, we found that our ability to make smaller transistors was limited by the laws of physics and our ability to increase the clock speed also increased heat and unreliability when we got much faster than 5GHz (5 Billion clock cycles per second). So we had the processors execute more than one instruction at a time during the same clock cycle (hyperthreading), we tuned and tweak the logic to make things more efficient, and we even added logic to "guess" what the instructions would do before we execute it (branch prediction).

Consumers still demanded faster processors, so the chip manufacturers like Intel and AMD designed dual-core processors, which were essentially the equivalent of two processors on a single chip, allowing them to double the work (assuming the work could happen at the same time). Multi-core processors soon followed, and a processor with 12 "cores" (what we call one of many independent processing units on the chip) is commonplace now.

Northbridge / Southbridge

The northbridge (sometimes called the Memory Controller Hub) is/was a processor that handles/handled high speed communications between the main memory, the CPU, and the high-speed buses (PCIe, AGP, etc.). In modern AMD/Intel chipsets4, the functionality of the northbridge is implemented in the CPU and the CPU is directly connected to the Memory and PCIe buses.

The southbridge (sometimes called the I/O Controller Hub (ICH) or the Fusion Controller Hub (FCH)) is a processor that handles operating the slower buses and connections that the CPU might need. This includes USB, PCI, IDE, BIOS, and dozens of other acronyms that don't get used in polite company. The existence of the southbridge allows the CPU to connect to a single bus and use that for dozens of other connections. Without the southbridge we'd have to add connectors and wires from the CPU to all of the different buses, protocols, and hardware in the system. The southbridge thus serves as a sort of train station to broker access to the CPU.

We say that the southbridge handles the "slower" buses, but that includes USB, which is pretty darn skippy, right? We usually mean slower in terms of latency--how long the messages/data takes to get from sender to destination. USB and other protocols hanging off of the southbridge might have bandwidth--the ability to send a large amount of information at once, which is why we as users consider them fast. Because USB 3.1 can send a Gigabyte per second, but it may take several milliseconds before it gets ready to send the first byte of information. This is not much to a human user, but to a processor which is executing 10 billion instructions a second, this is "slow." It would be equivalent to a delivery driver that can deliver anywhere in town within an hour having to wait at the office for two thousand years for the package to be wrapped before they can deliver it.

Hardware Controllers

A controller is something a processor (and sometimes even a tiny computer into itself) that controls a piece of hardware. Since the CPU can only send out electrical signals (and very low strength electrical signals at that), the hardware controllers exist to take those instructions from the CPU, interpret them, and then generate larger voltage signals to actually generate a physical change in the hardware. This turns a instruction to activate hardware into an actual real world effect. A motor controller might take an instruction to spin and generate voltage in an electromagnet that moves a motor, then this motor might turn a belt that pulls a robot arm up. A hard drive controller might take an instruction to write a JPEG to your hard disk and translate that to write the ones and zeroes to the disk. A monitor controller might take an instruction to draw a frame of a movie, and translate that into the electrical signals needed to power up the correct LEDs to the correct colors.

The advantage of hardware controllers is that it allows the CPU to have generic commands to create an effect and the controller will tranlate those into the specific things that need to happen to control a piece of hardware, allowing that piece of hardware to be replaced by another of the same type. So the CPU would send a signal to draw a picture to the monitor, the monitor controller for an LCD monitor would have a different set of actions to create that image on the screen than the set of actions needed to draw the image on an LED monitor or a CRT monitor, but we can create a simpler CPU that just knows how to send "draw to screen" instructions and each monitor will understand that instruction and know how specifically to make it happen for that particular brand/model/type/style/size of monitor5.

Making this system a little more complicated is that often buses (a bunch of wires or something that two separate electrical devices can use to exchange instructions and data) have their own hardware controller. So the CPU will have to send the command to the monitor controller to draw an image on the screen, but it will have to first instruct the HDMI or Display Port interface (that fancy port where you plug in your monitor) to send the command to the monitor controller, and this is done by sending a command to the HDMI controller or the Display Port controller. Usually, this entails sending a command to the Graphics Processing Unit (GPU) to operate the HDMI controller. So you'd instruct the GPU to instruct the port to instruct the monitor to draw a picture. Sounds complicated and easy to mess up, right? Yeah, that's probably we all tend to have monitor issues.


  1. Pretty much all modern logic gates used in computing are built from NAND gates which outputs a HIGH signal at all times unless both of the inputs are HIGH. It turns out this is one of the simplest gates that can be used to build all other kinds of logic. So usually an AND or OR gates are actually built from several NAND gates to simplify production. ↩︎

  2. Electronically, these logic gates are made with one or more transistors. Which are devices with three (sometimes more) connections, sometimes called the Source, Gate, and Drain. Many kinds of transistors exist, but a simplified example is a one where the signal from the source to the drain is blocked unless a voltage is applied to the gate, this creates a simple AND gate, where voltage must be applied to the Source AND the Gate in order to get current out of the Drain. ↩︎

  3. In practicality, the chip manufacturers have muddied this distinction by creating management processors, BIOS processors, pre-boot processors, and hypervisors that are often invisible to the operating system and have full control over the hardware. Furthermore, these are usually undocumented and only run code that is hidden from and not beholden to the customer/user of the system. But for simplicity, we say the CPU controls the whole system because for most purposes, this distinction isn't important for learning. ↩︎

  4. Since Sandy Bridge's release in 2011, this functionality has been on-die for Intel CPUs. https://en.wikichip.org/wiki/intel/microarchitectures/sandy_bridge_(client)#System_Agent ↩︎

  5. This is a grossly oversimplified description of how graphics are generated and drawn to a computer screen, but this is accurate enough for a high-level understanding. Also note, that despite our best efforts, the CPU does have to know a little about the specific hardware it's using (resolution of monitor, capacity of hard drive, features supported by the printer, etc.), so while the hardware controllers make this process simpler, it's not a perfect abstraction. This is why we have driver software which usually runs on the CPU and is capable of generating the correct instructions for a specific hardware controller. ↩︎

Share on

Topher
WRITTEN BY
Topher
System Administrator