top of page
  • Writer's pictureTim Buchalka

Computer Hardware - Gates, Circuits, and Switches - Learn To Code Series

The guts are internals of a computer include gates, circuits, and switches. So come along with me now, as we learn about these computer details or delicacies in today's blog.

Today we're gonna learn about the fascinating basics about computers, gates, circuits, and switches.

Now, these components are the basic building blocks found in today's computers or computing devices in general. Being familiar with these topics will allow for a better understanding, of what really happens inside a computer. This ultimately will also help you and give you better programming skills along the way.

If you're not already familiar with boolean operations, then I suggest you read the previous post in the series that covers that topic, before you go through this one. Click here if you want to read through that one first. All right, let's get going.

A gate is a device that produces the output of a boolean, true or false, one or zero operation when given the operations input values. Case can be constructed with a variety of technologies such as keys and relays. Inside today's computers gates are usually implemented as small electronic circuits in which the digits zero and one are represented as voltage levels.

Circuits are defined by the gates they represent and the values the gates can produce. For example, the value in a boolean circuit are the two boolean values true and false, often represented as binary one true and binary zero false. So a circuit produces an output value of one or zero, which remains constant until a pulse from another circuit, causes it to shift to the other value.

For our purposes in this blog, consider gate and circuit synonyms, and I'll actually refer to them as circuits from this point forward. Boolean operations are used with gates and circuits, and so will illustrate four of the basic ones. Naming NOT; AND; OR and XOR, which is actually pronounced Exclusive OR.

A simple circuit example for NOT circuit, based on billion operations shows a binary one is input and the resulting output is a binary zero because the NOT circuit reverses the input value. So an input one becomes an input zero, and an input zero becomes an output one. This billion operations is used quite often in computer programming languages, although it's using a human spoken language is quite rare if at all.

A more complicated circuit is an AND circuit that takes two binary inputs and produces one binary output result. In the figure example, a binary one and binary zero are two inputs. The resulting output is a binary zero based on boolean logic for an AND circuit, which states that both inputs must be a binary one, for the resulting output to be a binary one. All other combinations of input - there are only three - would produce a binary zero as the output result.

Similar to the AND circuit is an OR circuit that also takes two binary inputs and produces one binary output result. In the example of the figure, a binary one and binary zero of the two inputs, the resulting output is a binary one based on boolean logic for an OR circuit, which states that if one or both inputs are a binary one, then the resulting output will also be a binary one. So three of the four possible combinations of input will produce a binary one is the output result, and only one when both inputs are binary zero, with the resulting output also be a binary zero.

The fourth and final circuit to talk about is the XOR or Exclusive OR circuit. There's no single conjunction in the English language that captures the meaning of the Exclusive OR operation. Referring to the figure, Exclusive OR produces an output of binary one, when one of its inputs is a binary one, and the other is a binary zero. That way the computer interprets an Exclusive OR circuit like A Exclusive OR B is either A or B but not both. Another way to say this, is that the Exclusive OR circuit producers a output of binary one when its inputs are different.

So millions of circuits are combined and coupled together on a single wafer called a chip. Now, these circuits take the output of one or possibly two other circuits and use that output as input to the next circuit or circuits in line, and so forth. This allows for the massive processing of bits to occur.

A switch works by interrupting current flow around an electrical circuit. A basic switch is a binary device in which it is either open off or closed on. The simplest type of switches is one that comprises two middle strips that have brought into contact by a string or some other form of actuating mechanism. Switches are actually quite common in our lives, lots of on-off switches are everywhere. Alright, so that's gates, circuits and switches, and the end of this blog post.

Now in the next blog in the series, we're going to start taking a look at the computer's input and output function or capability. One question for you though before I go: Have you heard the phrase, "Garbage in and garbage out?" Well, do you know what that is? We'll talk about what that is in the next blog. Thanks for reading, and I'll see you in the next blog post.

919 views0 comments

Recent Posts

See All


bottom of page