(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
09-28-24 11:10 PM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Custom Bitwise Truth Tables New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
Guy Perfect









Since: 11-18-05

Last post: 6434 days
Last view: 6432 days
Posted on 09-19-06 12:47 AM Link | Quote
Just as an experiment (and because I was bored), I decided to attempt to create logical functions that generated each of the 16 possible truth tables given two operands. What I came up with is the following:
A = 1100
B = 1010

Not A = 0011
A And B = 1000
A Or B = 1110
A Xor B = 0110
A Eqv B = 1001
A Imp B = 1011

0000 = A And Not A
0001 = Not (A Or B)
0010 = Not A And B
0011 = Not A
0100 = A And Not B
0101 = Not B
0110 = A Xor B (A Or B) And Not (A And B)
0111 = Not (A And B)
1000 = A And B
1001 = A Eqv B Not ((A Or B) And Not (A And B))
1010 = B
1011 = A Imp B Not A Or B
1100 = A
1101 = A Or Not B
1110 = A Or B
1111 = B Or Not B

Xor is Exclusive Or, Eqv is Equivalence and Imp is Implication (which I have no idea what the logic is behind it). They're only used once in the left-hand column, but an equivalent expression is provided in the right-hand column where applicable.

I am uncertain if my right-hand equivalents can be optimized, but I'm fairly certain the left-hand column is as good as it gets.


(edited by Guy Perfect on 09-18-06 11:47 PM)
Jagori

150


 





Since: 11-17-05

Last post: 6433 days
Last view: 6432 days
Posted on 09-19-06 05:50 PM Link | Quote
I haven't looked at your table, but for the record, "implication" means "if A then B". If A and B are the inputs, then it works out like so:

A = 1, B = 1: A=>B holds (1)
A = 1, B = 0: A=>B doesn't hold (0)
A = 0, B = 1: A=>B is trivially true (1)
A = 0, B = 0: same as above (1)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - Custom Bitwise Truth Tables |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.007 seconds; used 355.13 kB (max 415.05 kB)