Logic Gates – Formal Introduction

In the previous example we used statements as propositions.  Computer logic is accomplished by using logic gates as building blocks.  A logic gate is a physical circuit which has electrical inputs and usually a single output.

Used in truth tables, we label each input and use truth values to represent weather or not an input is on or off. 

We use the value true , T , 1 to represent on and false , F , 0 to represent off.

Sometimes, On is refered to as a high voltage and off is referred to as a low or no voltage.

The most common gates are shown in the table below:

Gate

AND

OR

NOT

NAND

NOR

XOR

Symbol

AND ANSI Labelled

OR ANSI Labelled

Buffer ANSI Labelled

NAND ANSI Labelled

NOR ANSI Labelled

XOR ANSI Labelled

Inputs

 

A

B

Q=AB

Q=A+B

Q = A

Q= AB

Q=   A+B

Q= A B

0

0

0

0

1

1

1

0

0

1

0

1

1

0

1

1

0

0

1

0

1

0

1

1

1

1

1

0

0

0

 

Description

Outputs 1 when all inputs are 1

Outputs 1 when ANY input is a 1

Inverts the input

Outputs 0 where all inputs are 1

Outputs 1 then both inputs are 0

Outputs 1 when exactly one input is 1

Outputs 0 otherwise

Outputs 0 otherwise

 

Outputs 1 otherwise

Outputs 0 otherwise

Outputs 0 otherwise

Typing the mathematical notation into most word processors can be challenging. Sometimes these worded expressions or symbols are used :

GateWorded expressionSymbol Expression
ANDA AND BA^B
ORA OR BA v B
NOTNOT A~A
NANDNOT( A AND B) ~(A^B)
NORNOT (A OR B)~(A v B)
XORA XOR BA B

© 2021  Vedesh Kungebeharry. All rights reserved. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s