12-15-2003, 02:45 PM | #1 (permalink) |
Tilted
|
Simplest formula for truth tables
Working on a truth table for a 3 way switch. When all three are true the light is on. When any change the light changes between on and off. So when all are true, or when two are false the light is on.
A B C 1 1 1 True 1 1 0 False 1 0 1 False 1 0 0 True 0 1 1 False 0 1 0 True 0 0 1 True 0 0 0 False I'm not sure how to express the simplest logical formula. Simplest i have gotten is: A and B and C or (!A and !B) or (!A and !C) or (!B and !C) |
12-15-2003, 07:19 PM | #3 (permalink) |
Llama
Location: Cali-for-nye-a
|
You can either do trial or error, as it looks like you did, or if you know how, use K-Maps.
__________________
My name is goddfather40 and I approved this message. I got ho's and I got bitches, In C++ I branch with switches -MC Plus+ |
12-16-2003, 10:13 PM | #4 (permalink) |
Fast'n'Bulbous
Location: Australia, Perth
|
What have you used ti simplify it in the first place? cause this isn't correct:
Simplest i have gotten is: A and B and C or (!A and !B) or (!A and !C) or (!B and !C) Then it's not A and not B, it can also be not C, hence flase. Theres similar errors with your last 2 as well. Anyway, i got: A!B!C + !AB!C + ABC + !A!BC They're the 4 basic truth statements using AND, NOT and OR gates. Although as CSflim said, they can be even simpler when using XOR gates. A XOR B = A!B + !AB (ie when the 2 are different, the logic is true) also A XNOR B is the inverse of this, so when they're the same the result is true. eg A XNOR B = !A!B + AB using this logic, you can simplify the first statment A!B!C + !AB!C + ABC + !A!BC to: A(B XNOR C) + !A(B XOR C) I think this can then be simplified to: A XOR (B XOR C) So that'd be the simplest expression.... hope that helps good luck |
12-18-2003, 01:51 PM | #7 (permalink) | |
Sky Piercer
Location: Ireland
|
Quote:
__________________
|
|
Tags |
formula, simplest, tables, truth |
|
|