MadSci Network: Computer Science

Re: What are NOR and XOR gates? what are some applications of them ?

Date: Sat Dec 12 07:06:27 1998
Posted By: Eric Maass, MadSci Admin
Area of science: Computer Science
ID: 911874024.Cs

NOR and XOR gates are some of the basic logic gates in computer systems. Here is 
an explanation on the basic logic gates from my website:

Logic Gates explanation

Slide 5-15 on that site shows all 8 of the basic gates:

In a computer system, numbers and letters are represented by 1's and 0's. The inputs to a logic gate are 1's and 0's, and the output is either a 1 or a 0, depending on the inputs to the gate, and what type of gate it is.

In the case of an "OR" gate, the output of the OR gate is "1" if EITHER of the two inputs (input X ...OR... input Y) are 1 .... OR if BOTH inputs are 1.

An XOR, or eXclusive OR, has the output of the XOR gate be "1" if Either of the two inputs are 1, but NOT BOTH inputs. If BOTH inputs are 1, the output is a 0.

A NOR gate, or NOT OR, has the output be the opposite of an OR gate. Anytime the OR gate output would be 1, the output of a NOR gate would be 0, and if the output of an OR gate would be 0, the output of a NOR gate would be 1.

As mentioned earlier, NOR gates and XOR gates are used throughout computers. If you would like to build a simple circuit using an XOR gate, one idea would be to make a simple half-adder -- that adds two binary numbers. This would require an XOR gate, and an AND gate. The explanation is here:

logic circuits.

The half adder is shown in figure 6-4.

An interesting use of a NOR gate might be to build ring oscillators. Ring oscillators make square waves, that you can see on an oscilloscope, or see if you hook it to an LED, or hear if you hook the output to a speaker and hook many (but still an odd number) NOR gates together to make a low enough frequency square wave. You would start by hooking an odd number of NOR gates together, both inputs tied together at first, so that the NOR gate acts as an invertor. See this web site for an explanation:

Ring Oscillator explanation

Once you have the ring oscillator, you can experiment with changing the odd number of gates together, and you can experiment with no longer tying the two inputs to the NOR gate together, but having one input still in the ring oscillator chain, and hooking the other input to a switch to control turning the ring oscillator on and off.

Current Queue | Current Queue for Computer Science | Computer Science archives

Try the links in the MadSci Library for more information on Computer Science.

MadSci Home | Information | Search | Random Knowledge Generator | MadSci Archives | Mad Library | MAD Labs | MAD FAQs | Ask a ? | Join Us! | Help Support MadSci

MadSci Network,
© 1995-1998. All rights reserved.