Mada za sehemu hiiLogicMada 5
A series connection of switches
The following switches are connected in series
The current flows between T1 and T2 when both switches are closed, i.e., when P∧Q is true
A parallel connection of switches
The current will flow when either one of the switches is closed.
Current flows when P∨Q is true
Example
Consider the electrical network below
- Construct a compound statement presenting the network above
- Find possible switch settings that will allow the current to flow between T1 and T2
- Current flows between T1 and T2 when switch P is closed i.e. P is true OR
- The current flows between T1 and T2 when switches Q and R are closed i.e. Q∧R is true. The required compound statement is P∨(Q∧R)
- To find possible switch settings, draw a truth table P∨(Q∧R)
| P | Q | R | Q ∧ R | P ∨ (Q ∧ R) | Current flows |
|---|---|---|---|---|---|
| T | T | T | T | T | Yes |
| T | T | F | F | T | Yes |
| T | F | T | F | T | Yes |
| T | F | F | F | T | Yes |
| F | T | T | T | T | Yes |
| F | T | F | F | F | No |
| F | F | T | F | F | No |
| F | F | F | F | F | No |
Possible switch settings
| P | Q | R |
|---|---|---|
| Closed | Closed | Closed |
| Closed | Closed | Closed |
| Closed | Closed | Closed |
| Closed | Closed | Closed |
| Closed | Closed | Closed |
- Construct compound statements that correspond to the networks

The current will flow when all three switches P, Q, and R are closed i.e. P∧Q∧R
The required compound statement is P∧Q∧R
The required compound statement is P∨Q
The required compound statement is (P∧Q)∨(R∧S)
The required compound statement is P∨Q∨R
The required compound statement is P∧(Q∨(R∧S))
The required compound statement is (P∨Q∨R)∧S
- In electrical network of (ii) find possible switch settings that will allow the current to flow between T1 and T2
(ii) (P∨Q)∧R
| P | Q | R | P ∨ Q | (P ∨ Q) ∧ R |
|---|---|---|---|---|
| T | T | T | T | T |
| T | T | F | T | F |
| T | F | T | T | T |
| T | F | F | T | F |
| F | T | T | T | T |
| F | T | F | T | F |
| F | F | T | F | F |
| F | F | F | F | F |
Possible switch settings
| P | Q | R |
|---|---|---|
| Closed | Closed | Closed |
| Closed | Open | Closed |
From statements to network
Example
Draw a network for the statement (P∨Q)∧(R∧S)
Corresponding network is shown below

Draw networks for the following statements
- [(P∧Q)∧(R∨S)]
- (Q∨(R∨S)∨P)
These operate as follows
- When one switch is closed, the other one closes also
- When one switch is closed, the other one opens
Refer to the diagram
The compound relating to flow of electrical current is given
(P∧Q)∨[P∧(∼Q∨R)]
To find possible switch settings that will allow the current to flow between T1 and T2
– Draw a truth table for (P∧Q)∨[P∧(∼Q∨R)]
| P | Q | R | P ∧ Q | ~Q | ~Q ∨ R | P ∧ (~Q ∨ R) | (P ∧ Q) ∨ [P ∧ (~Q ∨ R)] |
|---|---|---|---|---|---|---|---|
| T | T | T | T | F | T | T | T |
| T | T | F | T | F | F | F | T |
| T | F | T | F | T | T | T | T |
| T | F | F | F | T | T | T | T |
| F | T | T | F | T | F | F | F |
| F | T | F | F | F | F | F | F |
| F | F | T | F | T | T | F | F |
| F | F | F | F | T | T | F | F |
Possible switch settings
| P | Q | R |
|---|---|---|
| Closed | Closed | Closed |
| Closed | Closed | Open |
| Closed | Open | Closed |
| Closed | Open | Open |
Example
Without using a truth table draw a sample network for the statement
(P∧Q)∨[P∧(∼Q∨R)]
(P∧Q)∨[P∧(∼Q∨R)]=P∧(Q∨(∼Q∨R)) ….. distributive
=P∧((Q∨∼Q)∨R) ……. associative
=P∧(T∨R) ….. Complement
=P∧T ….. Identity
=P ….. Identity
The statement simplifies to P
The corresponding network is as follows
For a statement which on simplifying ends up at F, network drawn is as follows
For a statement which upon simplifying yields T, network is drawn as follows
- For each of the networks shown below, find a compound statement that represents it
- (a) Draw network for the corresponding statement
i) (P∧∼Q)∨(Q∧P) ii) (P∧∼Q)∨(Q∧∼R) iii) P→Q≡∼P∨Q
iv) (P→Q)∧(P∨Q)≡(∼P∨Q)∧(P∨Q)
(b) Simplify the statement in 2 (iv) using the laws of algebra of propositions and draw a simple network
More examples
i) Write down compound statements for the following networks
- For each of these sentences draw a simple network
a) P∧(∼Q→∼P)
b) ∼(P∨Q)→R
c) P∧∼P
- Given a truth table
| P | Q | R | Output |
|---|---|---|---|
| T | T | T | F |
| T | T | F | T |
| T | F | T | T |
| T | F | F | F |
| F | T | T | T |
| F | T | F | F |
| F | F | T | F |
| F | F | F | T |
a) Construct a statement having this truth table
b) Draw the electrical network
Mwalimu
Unasoma somo hili? Niulize nikuelezee chochote kilichomo.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu mada hii.
Ingia ili kuulizaMajadiliano
Hakuna maswali bado