Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Logic Gates and there link with binary

Status
Not open for further replies.

gizzemoto

New Member
I have moved over from analogue electronics to digital electronics, Is there a trick to remmembering the 6 basic gates and there logic How are these linked to binary
 
The only trick I know is to just remember the truth tables for the 3 basic gates.

AND: 0&0=0; 1&0=0; 0&1=0; 1&1=1
OR: 0|0=0; 1|0=1; 0|1=1; 1|1=1
XOR: 0 xor 0=0; 1 xor 0=1; 0 xor 1=1; 1 xor 1=0

The output of the other three gates (NAND, NOR, XNOR) are just the opposite of their respective matches.

The binary nature of these parts is due to the fact that they can only be in one of two states: HIGH or LOW. There is no inbetween. Because only two states exist, the system is binary.
 
gizzemoto said:
I have moved over from analogue electronics to digital electronics, Is there a trick to remmembering the 6 basic gates and there logic How are these linked to binary
The attachment may help you.
 

Attachments

  • Gating.gif
    Gating.gif
    7.8 KB · Views: 224
I thought the names themselves gave the game away.

If A=1 AND B=1 then output = 1
If A=1 OR B=1 then output = 1

XOR is the slightly tricky one but if the inputs are exclusive (different) then the output = 1. This is why you can only ever have a 2 input XOR gate.

If there is a N in front of the name then replace "=1" with "=0"

Matbe the OP's first language isn't English.

Mike.
 
Pommie said:
I thought the names themselves gave the game away.

If A=1 AND B=1 then output = 1
If A=1 OR B=1 then output = 1

XOR is the slightly tricky one but if the inputs are exclusive (different) then the output = 1. This is why you can only ever have a 2 input XOR gate.

If there is a N in front of the name then replace "=1" with "=0"

Matbe the OP's first language isn't English.

Mike.
Here is the truth table for a 3-input XOR.
 
Last edited:
Pommie said:
I thought the names themselves gave the game away.

If A=1 AND B=1 then output = 1
If A=1 OR B=1 then output = 1

Mike.
0 and 1 can be confusing since in positive logic, 1 = high & 0 = low but in negativelogic, 0 = high & 1 = low.

So it is less confusing to use "active high" and "active low".

eg. when a NAND gate is used as an AND gate it has active high inputs and an active low output. Or if it is used as an OR gate, it has active low inputs and an active high output.
 
Ron H said:
Here is the truth table for a 3-input XOR. I think the definition extends to "the output is true if one and only one input is true".
That's interesting Ron, but I would have thought that the output of a true 3 input XOR would be 1 when only one of the inputs = 1, but the truth table in the paper also has the output = 1 when A, B & C are all equal to 1.

In relay logic there is a "one only chain" which is active (ie. there is a connection through it) when one and only one of a group of relays is operated, ie. a true XOR.
 
ljcox said:
That's interesting Ron, but I would have thought that the output of a true 3 input XOR would be 1 when only one of the inputs = 1, but the truth table in the paper also has the output = 1 when A, B & C are all equal to 1.

In relay logic there is a "one only chain" which is active (ie. there is a connection through it) when one and only one of a group of relays is operated, ie. a true XOR.
I didn't look far enough down the truth table! I was thinking the same as you. Since the 3 input XOR is defined as {A XOR B XOR C}, it makes logical sense, but not common sense. :)
 
Ron, I don't think it even makes logical sense. It is simply the truth table of two 2 input XOR gates connected as a 3 input system.

A true XOR should give an active output when one and only one input is active.

The attachment shows 2 of many possible realisations of a 3 input XOR.
 

Attachments

  • 3 input XOR.gif
    3 input XOR.gif
    19.7 KB · Views: 155
(A xor B xor C) performs the sum function for a full adder (2 bits plus carry in), so it is useful, but I agree it isn't really a 3-input XOR.
 
Ron H said:
(A xor B xor C) performs the sum function for a full adder (2 bits plus carry in), so it is useful, but I agree it isn't really a 3-input XOR.
Agreed. I had not thought of the full adder.
 
Wouldn't the output of a true 3 input XOR gate only go high when all inputs are exclusive, ie all different. That would be a 1, a 0 and a something else input.

Mike.
 
Pommie said:
Wouldn't the output of a true 3 input XOR gate only go high when all inputs are exclusive, ie all different. That would be a 1, a 0 and a something else input.

Mike.
Interesting point, but of course it doesn't work in the binary number system.
I was thinking that exclusive OR is the 'opposite' of inclusive OR. Inclusive OR is where the output is true if one or more inputs is true. Exclusive OR would then be true if one and only one input is true (one input is true, to the exclusion of all others).
 
Status
Not open for further replies.

Latest threads

Back
Top