Writing Boolean Expressions with Manual Override: Z = ABC & M

  • Thread starter bennyq
  • Start date
  • Tags
    Expression
In summary, an old jim is trying to figure out how a boolean expression works for a problem like this. If A & B & C & ~M then power. If (~A | ~B | ~C ) & M, then power. If A & B & C & ~M then power. If (~A | ~B | ~C ) & M and M's spdt switch doesn't have a third state, then M's spdt switch connects power to the system when ABC is not pressed. Classic "On Off Auto" three position switch. Can make center position "Auto" so the switch setting can be changed smoothly & without stressing the motor, e.g. ON → Auto(on
  • #1
bennyq
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.
 
Physics news on Phys.org
  • #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
jim hardy said:
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
meBigGuy said:
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
jim hardy said:
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
bennyq said:
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.

meBigGuy said:
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.
 

1. What is a Boolean expression?

A Boolean expression is a mathematical or logical expression that evaluates to either true or false. It can be used to represent logical relationships between variables.

2. How do you write a Boolean expression with manual override?

To write a Boolean expression with manual override, you need to use the logical operator & (AND) to combine two or more variables and use the parentheses () to group them together. The manual override is achieved by adding a variable to the expression using the | (OR) operator. For example, Z = (A & B) | C.

3. What is the purpose of using manual override in a Boolean expression?

The purpose of using manual override in a Boolean expression is to allow for a variable to have a higher priority over other variables in the expression. This means that if the manually overridden variable is true, then the entire expression will evaluate to true, regardless of the values of the other variables.

4. Can you use other logical operators in a Boolean expression with manual override?

Yes, you can use other logical operators such as ! (NOT) and ^ (XOR) in a Boolean expression with manual override. These operators can be used to further manipulate the expression and add more complex conditions.

5. What is the significance of the order of operations in a Boolean expression with manual override?

The order of operations is important in a Boolean expression with manual override as it determines which operations are evaluated first. The general rule is that operations inside parentheses are evaluated first, followed by NOT, AND, and finally OR. It is important to use parentheses to group the variables and ensure the desired outcome of the expression.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
12
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
2K
  • Linear and Abstract Algebra
Replies
3
Views
2K
  • Special and General Relativity
Replies
12
Views
2K
  • Differential Equations
Replies
1
Views
646
Back
Top