The primative logic operators

Interested in Robotics? Here's the place to be.
Post Reply
hlreed
Posts: 349
Joined: Wed Jan 09, 2002 1:01 am
Location: Richmond, TX
Contact:

The primative logic operators

Post by hlreed »

There are lots of logic operators, but there are only 4 that are single bit. From A and B:
A B | E G L Z
0 0 | 0 0 0 1
0 1 | 0 0 1 0
1 0 | 0 1 0 0
1 1 | 1 0 0 0<p>The primative operators are E,G,L and Z
E = A = B ;this is an AND
G = A > B ;not in current bit logic
L = A < B ;not in current bit logic
Z = A = B = 0 ;is NOR<p>Any other operators require more than on bit.
XOR = A <> B
OR = A = B or A > B or A < B<p>So if you have E, G, L, and Z you can do it all.<p>[ December 12, 2003: Message edited by: Harold ]</p>
Harold L. Reed
Microbes got brains
dyarker
Posts: 1917
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: The primative logic operators

Post by dyarker »

Exclusive OR?
Dale Y
cato
Posts: 366
Joined: Sun Sep 07, 2003 1:01 am
Contact:

Re: The primative logic operators

Post by cato »

Dale I don't understand the original post, and I'm not sure what your question is. However, I'm not going to let that stop me from answering it.<p>Exclusive OR means one or the other but not both.<p>A B Out
0 0 0
0 1 1
1 0 1
1 1 0<p>Why the original poster thinks that "takes more than one bit" I have no idea
hlreed
Posts: 349
Joined: Wed Jan 09, 2002 1:01 am
Location: Richmond, TX
Contact:

Re: The primative logic operators

Post by hlreed »

Exclusive OR, XOR is not primative. It is made from two bit conditions.
It has to look at two bits.<p>There are 16 multi bit logic operators. They can be numbered and treated like numbers.<p>A B | pair name
0 0 | Z
0 1 | L
1 0 | G
1 1 | E<p>Z L G E
0 0 0 0 Zero (0 bits)
0 0 0 1 AND (1 bit)
0 0 1 0 GT (1 bit)
0 0 1 1 GTE (2 bits)
0 1 0 0 LT (1 bit)
0 1 0 1 LTE (2 bits)
0 1 1 0 XOR (2 bits)
0 1 1 1 OR (3 bits)
1 0 0 0 NOR (1 bit)
1 0 0 1 NXOR (2 bits)
1 0 1 0 NLTE (2 bits)
1 0 1 1 NLT (3 bits)
1 1 0 0 NGTE (2 bits)
1 1 0 1 NGT (3 bits)
1 1 1 0 NAND (3 bits)
1 1 1 1 NZero (4 bits)<p>AND is 1 in this system.
GT is 2
LT is 4
NOR is 8
Note that GT + LT = 6 which is XOR<p>The reason I am working on this is that I don't want to make 16 different hardware versions of my logic nodes.
Harold L. Reed
Microbes got brains
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: The primative logic operators

Post by MrAl »

Hello Harold,<p>What exactly are you trying to do here?<p>I guess you should also consider using
other combinations? like instead of selecting
those four with only a single 1 maybe select
those with only a single 0 ? I dont know
what kind of hardware base you are talking
about yet though so maybe you could clarify...<p>Doesnt it take longer in hardware to use
multilevel logic, or do you have something
else in mind?<p>Sounds interesting in any case :-)<p>Take care,
Al
LEDs vs Bulbs, LEDs are winning.
hlreed
Posts: 349
Joined: Wed Jan 09, 2002 1:01 am
Location: Richmond, TX
Contact:

Re: The primative logic operators

Post by hlreed »

Hi Al,
I have a set of nodes that emit either a number or 0 depending on condition. These have two inputs I and R.
Out = I if I cond R else Out = 0
cond is one of the 16 operators above. Most of them are redundant or useless.
So if cond = {=, >, <} this gets lines and ramps in both direction. >= can be done in combo if needed.
Mainly, if things are made into numbers they can be manipulated and understood. I am becoming more Pythagorean all the time.
Thanks for the comment.
Harold L. Reed
Microbes got brains
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests