Boolean expression

  • Thread starter bennyq
  • Start date
  • Tags
    Expression
  • #1
23
0
Just a question if you had to write a boolean expression for a problem like this,

A motor requires three conditons ABC to be high to start, but a manual override can start and stop it (M) what is the expression for Z

so Z = ABC... how would you incorporate the overside switch.
 

Answers and Replies

  • #2
I hate to just give you the answer. It is a cool problem. ABC tells you about the state of the system.
 
  • #3
your basic boolean expressions are
AND
OR
NAND
NOR
XOR

which would work in this situation
 
  • #4
If you have to write out the truth table for your system
 
  • #5
Manual must be two bits or have memory...

i draw them out as relay contacts first then write the boolean.

Series up A B C, parallel them with Manual Start, series that combination with (not) Manual Stop.

Can you make a truth table and see if that works?
 
  • #6
I think M is 1 bit and needs no memory. Can be done with 4 SPDT switches or two logic gates.
 
  • #7
M's spdt switch needs third state = "neither", to put ABC in control .
Classic "On Off Auto" three position switch .. SPDT but center off

Can you streamline it further ?
 
  • #8
M's spdt switch needs third state = "neither", to put ABC in control .
Classic "On Off Auto" three position switch .. SPDT but center off
I'd like to make centre position "Auto" so the switch setting can be changed smoothly & without stressing the motor,
e.g. ON → Auto(on) without in the process switching OFF
 
  • #9
I am designing it as a memoryless system.

A simple boolean experssion is power = (ABC) ^ M.

Breaking it down:

IF A & B & C & ~M then power.
IF (~A | ~B | ~C ) & M, then power.
4 SPDT switches in series
A,B,C in series through NO with M NC. So when ABC pressed, load gets power but pressing M stops it.

NC contacts of A, B, C, and NO of M connected together so if any of ABC not pressed, pressing M connects it to power.
 
  • #10
I am designing it as a memoryless system.

A simple boolean experssion is power = (ABC) ^ M.

Breaking it down:

IF A & B & C & ~M then power.
IF (~A | ~B | ~C ) & M, then power.
Your Boolean expression seems inadequate. Have you allowed for the manual forced OFF? If ~M does not mean manual override "OFF" then you must be using another switch not mentioned here for manual override OFF?

Edited
 
Last edited:
  • #11
In my day('65) AND was X, OR was +, which at the time seemed a bit counterintuitive.
Have they changed symbols on me ?

power = notMstop X ((A X B X C) + (Mstart))

looks to me like it still takes three states to define M - start, stop or defer to ABC. That takes two bits which leaves one possible state unused.
But I'm rusty - corrections welcome. You guys may be able to streamline around that unused fourth state and save a bit.

old jim, and feeling it.
 
  • #12
In my day('65) AND was X, OR was +, which at the time seemed a bit counterintuitive.
Have they changed symbols on me ?

power = notMstop X ((A X B X C) + (Mstart))

looks to me like it still takes three states to define M - start, stop or defer to ABC. That takes two bits which leaves one possible state unused.
But I'm rusty - corrections welcome. You guys may be able to streamline around that unused fourth state and save a bit.

old jim, and feeling it.

I think I'm older than you and I agree with you. I see it as implented easily with three spst and one single pole triple throw switch. But with boolean algebra you need a start switch override and a stop switch override and you have to decide which oveerride takes precedence if they are both active.
 
  • #13
Jim, besides what you recall, there is another common convention.

A large V denotes OR

an inverted V is AND (^ is the closest match on the keyboard)

an omitted symbol is also understood to be AND
 
Last edited:
  • #14
Thanks N O !

LC Thanks

A 3 position SPDT switch with center off gives the 3 states
If they're separate switches one has to decide in hardware which gets preference, as you said.
That causes a lot of trouble for beginner programmers - when his program encounters a stuck switch contact implying an impossible condition, the program mustn't crash.

You've been there too, i see...

old jim
 
  • #15
Hold down ABC and power is applied. Hold down ABC and M and no power
Don't hold down ABC and hold down M and power is applied.

What ever ABC does, pressing M reverses it. IF ABC has it on, pressing M turns it off. If ABC has it off, Pressing M turns it on.

Standard notation for Verilog is & = AND, | = OR, ~ = bitwise inversion, ^ = XOR, ! = logical inversion.

So the answer is (A&B&C) ^ M

4 SPDT switches connected as I described.

Don't think of M as a momentary switch that permanently reverses the state of the system when momentarily pressed. It is a switch that reverses the state WHILE pressed.
 
Last edited:
  • #16
Gotcha, M B G .

OP didn't say whether motor was to continue running after started by an override.
So that meets the stated requirement.

...but a manual override can start and stop it (M)...

What happens if ABC changes state while M is pressed ?
EDIT: add
When i tell something to stop i expect it to stay stopped until granted permission to restart.
 
Last edited:
  • #17
Just a question if you had to write a boolean expression for a problem like this,

A motor requires three conditions ABC to be high to start, but a manual override can start and stop it (M) what is the expression for Z

so Z = ABC... how would you incorporate the override switch.
As you may have gathered, there's a problem with the statement of the problem.
If the problem is truly Boolean, then all of the variables should be binary states. However, the manual override can "start or stop" the motor - which suggests three states: idle (or auto), start, or stop.

"meBigGuy"s solution (Z = (A&B&C) ^ M, below) provides a semantically correct answer to the problem - as you exactly stated it. But I wonder if that is really the problem that was asked of you or that was intended to be asked of you.

Standard notation for Verilog is & = AND, | = OR, ~ = bitwise inversion, ^ = XOR, ! = logical inversion.

So the answer is (A&B&C) ^ M
 
  • #18
In order to do a state oriented system the states and transitions must be exactly defined.

For example, if you press M to shut the system off (while ABC==true), does pressing it again cause it to restart? (in other words, does M always toggle the system?).

Or, do you have to go through ABC== false before you can turn it back on?

Or, if you press M to turn it off while ABC is true, does ABC== false then ABC=true turn it back on?

Or, if you press M to turn it on, does ABC true then false turn it off?

One simple rule is to resample the state whenever any condition is changed? But then, if M is pressed the same time as ABC goes true, does the system go on or off.

Draw the state diagram and I can write the verilog.
 

Suggested for: Boolean expression

Replies
1
Views
310
Replies
1
Views
420
Replies
5
Views
449
Replies
1
Views
397
Replies
10
Views
778
Replies
1
Views
769
Replies
3
Views
2K
Replies
3
Views
1K
Replies
2
Views
1K
Replies
7
Views
953
Back
Top