Boolean Logic and Gates

Circuit design is based on the
mathematical branch of Boolean Logic, dealing with various
manipulations of the values of TRUE and FALSE. You can see that
these values can easily be represented by 0′s and 1′s inside the
computer.

Boolean logic uses the basic
statements AND, OR, and NOT. Using these and a series of Boolean
expressions, the final output would be one TRUE or FALSE
statement. Let me try to illustrate this:

If A is true AND B is true, then
(A AND B) is true
If A is true AND B is false, then (A AND B) is false
If A is true OR B is false, then (A OR B) is true
If A is false OR B is false, then (A OR B) is false

I don’t know if you see the logic
in that, but it really is simple. If A is true and B is false,
then some other condition takes place. The letter A and B can
represent anything needed in the program. In programming
languages, we use the IF statement typically to show that IF some
thing is true, THEN do this. If you don’t get it yet and want to
study up on it, do some research into it. I could spend pages
trying to explain the logic to you but that would be a waste of
time here.

How does this relate to circuit
design? Well, since transistors are either ON or OFF, representing
0 and 1, ands thus could represent TRUE or FALSE, placement of
these transistors in various locations of a circuit will yield
results that are based on Boolean logic. These designs are called
Gates. A gate is an electronic device that takes in some input and
outputs a single binary output. Gates are used to do all sorts of
things, but for Boolean logic, we are concerned with the AND, OR,
and NOT gates. These gates are designed to output Boolean results.

An
AND gate would be two transistors in a series circuit as shown in
the diagram to the right (I drew that myself, so excuse the
quality). In order to get a value of 1 as an output (the binary
equivalent to TRUE) then both Input 1 and Input 2 would have to be
1. That is, both conditions must be true in order for those
transistors to switch to ON, complete the circuit, and create an
Output.

An OR gate is similar. We have
two transistors with two inputs. But, the transistors are located
in parallel. So, if either one of the transistors close, the
circuit will produce an output. This corresponds to the Boolean
logic of OR, where if either is true, then the final result is
TRUE. A diagram of the OR gate is below.

There is also a NOT gate. It is
constructed a bit differently, but the principle is the same. The
placement of the transistors, and in this case a resistor, forms
the NOT Boolean expression.

A circuit is designed around
these principles. Using various combinations of these gates, you
can design gates for almost any purpose: loops, test-for-equality,
mathematical functions, etc. As you can imagine, even designing
one circuit to simply add two numbers can take rather complex
designs of various combinations of these basic gates. A computer
chip is made up of millions of such circuits. Various
optimizations to the designs help to increase overall speed of the
circuits.

An interesting note: 1-bit ADD
circuit requires 3 NOT gates, 16 AND gates, and 6 OR gates, for a
total of 25 gates. To create a 32-bit ADD circuit would then take
800 gates using a total of 1,504 transistors. In the old vacuum
tube based computers, this many vacuum tubes would take up a space
about the size of a refrigerator, not to mention the cooling for
it. Today, the complete ADD circuit takes up a space smaller than
a pixel on this screen, or the period at the end of this sentence.

Free eBook!

Like what you read?

If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:

Post A Comment Using Facebook

Discuss This Article (Without Facebook)

3 comments

  1. pierre duval /

    finally i found a site!I am an artist and i have a project emerging as i finish the columbia painting that ihave been working on for 3 years,the next project is proteus which involves boolean logic.
    part of my study is to build the gates using transistors
    not chips,as a way to make it sink and as displays,bit not as the finished work but as a stepping stone.
    i found this site usefull,and i found another site that gives the full wiring of the gates.
    if u have any suggestions they would be welcomed

  2. Hello! i found this interesting because because in most places they only explain the schemes and not the hardware used. It’d be nice to add a tutorial on how to make simple circuits out of them.
    All the best,
    Iain Apreotesei

  3. Brett Bellomo /

    Any free Boolean logic quizzes or small certificates?
    bjbmpmn32@yahoo.com sft dvp,Brett Bellomo
    3 yrs java msoft,common tests

Leave a Reply

PCMech Insider Cover Images - Subscribe To Get Your Copies!
Learn More
Every week, hundreds of tech enthusiasts, computer owners
and geeks read The Insider, the digital magazine of PCMech.

What’s Your Preference?

Daily Alerts

Each day we send out a quick email to thousands of PCMECH readers to notify them of new posts. This email is just a short, plain email with titles and links to our latest posts. You can unsubscribe from this service at any time.

You can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Newsletter

Running for over 6 years, the PCMECH weekly newsletter helps you keep tabs on the world of tech. Each issue includes news bits, an article, an exclusive rant as well as a download of the week. This newsletter is subscribed to by over 28,000 readers (many who also subscribe to the other option) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter: