Exercises: Logic functions and circuit design
The steps for designing a digital circuit are out of order: (a) draw the circuit using gates, (b) write the truth table, (c) read the problem statement and identify…
The steps for designing a digital circuit are out of order: (a) draw the circuit using gates, (b) write the truth table, (c) read the problem statement and identify inputs and outputs, (d) write the logic function, (e) simplify the function. Put them in order and explain in one sentence what is done in each step.
Explain what each row of a truth table represents and what it means for the output to be 1 in only some rows, using this example to support your explanation: an…
Explain what each row of a truth table represents and what it means for the output to be 1 in only some rows, using this example to support your explanation: an indicator light turns on when there is smoke (H = 1) and the alarm is activated (A = 1).
What is a logic function? Read these two and explain their meaning in words: $S = A \cdot B$ and $S = A + B$. Which gate implements each one?
What is a logic function? Read these two and explain their meaning in words: $S = A \cdot B$ and $S = A + B$. Which gate implements each one?
A car beeps if the door is open (P = 1) and the ignition is off (C = 1). Identify the inputs and output of the system and write its logic function using letters.
A car beeps if the door is open (P = 1) and the ignition is off (C = 1). Identify the inputs and output of the system and write its logic function using letters.
Match each expression to the gate that implements it: $S = A \cdot B$, $S = A + B$, and $S = \overline{A}$. Also explain what the bar over the letter means in the last…
Match each expression to the gate that implements it: $S = A \cdot B$, $S = A + B$, and $S = \overline{A}$. Also explain what the bar over the letter means in the last expression.
Explain what it means to simplify a logic function and give two reasons why it is useful to simplify before assembling the circuit.
Explain what it means to simplify a logic function and give two reasons why it is useful to simplify before assembling the circuit.
A circuit has a NOT gate on input A and then an AND gate that receives that signal and input B. Write the logic function of the circuit and explain what situation it…
A circuit has a NOT gate on input A and then an AND gate that receives that signal and input B. Write the logic function of the circuit and explain what situation it detects (which combination of inputs activates the output).
The figure summarizes the design process of a digital circuit, but one step is missing. State which step it is, explain what is obtained upon completing it, and where…
The figure summarizes the design process of a digital circuit, but one step is missing. State which step it is, explain what is obtained upon completing it, and where that information comes from.
A car alarm must sound when a door is open (P = 1) and the key is removed from the ignition (C = 1). Write the complete truth table and, using the rows with output 1,…
A car alarm must sound when a door is open (P = 1) and the key is removed from the ignition (C = 1). Write the complete truth table and, using the rows with output 1, write the logic function.
In a two-input truth table, the output S is 1 when A = 1 and B = 0, and also when A = 1 and B = 1. Write the function as a sum of products and explain which much simpler…
In a two-input truth table, the output S is 1 when A = 1 and B = 0, and also when A = 1 and B = 1. Write the function as a sum of products and explain which much simpler function it is equivalent to.
The figure shows a two-gate circuit and its truth table, with the output of one row incomplete. Work out that value by analysing the circuit and write the overall logic…
The figure shows a two-gate circuit and its truth table, with the output of one row incomplete. Work out that value by analysing the circuit and write the overall logic function.
Three smoke sensors (A, B, and C) monitor an industrial unit, and the alarm must trigger when at least two of them detect smoke at the same time. Write the complete…
Three smoke sensors (A, B, and C) monitor an industrial unit, and the alarm must trigger when at least two of them detect smoke at the same time. Write the complete truth table for the system.
The function $S = A \cdot B + A \cdot \overline{B}$ is activated if 'A and B' or if 'A and not B'. Explain why it is simply equivalent to $S = A$ and what is saved in…
The function $S = A \cdot B + A \cdot \overline{B}$ is activated if 'A and B' or if 'A and not B'. Explain why it is simply equivalent to $S = A$ and what is saved in the circuit by noticing this.
In a circuit, A and B enter an AND gate; C passes through a NOT gate; the two outputs enter an OR gate that yields S. Write the logic function and work out the value of…
In a circuit, A and B enter an AND gate; C passes through a NOT gate; the two outputs enter an OR gate that yields S. Write the logic function and work out the value of S for A = 1, B = 0, and C = 0.
A warning signal is required to sound when the tank is low (N = 1) or when the pump is stopped (B = 1) with the timer running (M = 1). Write the truth table with the…
A warning signal is required to sound when the tank is low (N = 1) or when the pump is stopped (B = 1) with the timer running (M = 1). Write the truth table with the three inputs and the logic function.
Verify, by writing both truth tables, that $S = A \cdot (A + B)$ is equivalent to $S = A$. Explain the practical consequence of this result when building the circuit.
Verify, by writing both truth tables, that $S = A \cdot (A + B)$ is equivalent to $S = A$. Explain the practical consequence of this result when building the circuit.
In the emergency ejection system of an aerospace capsule, three independent overpressure sensors ($A$, $B$, and $C$) are used. To avoid accidental triggering due to the…
In the emergency ejection system of an aerospace capsule, three independent overpressure sensors ($A$, $B$, and $C$) are used. To avoid accidental triggering due to the isolated failure of a single sensor, the ejection mechanism ($S = 1$) must only be activated if at least two of the three sensors agree in reporting overpressure.
A preliminary report proposes the simplified function $S = A \cdot B + C$, claiming that it meets the specifications using only two logic gates.
- a) Formally refute the validity of this proposal: identify which specific combination of inputs will cause an erroneous ejection trigger and explain the consequences for the crew.
- b) Obtain the correct truth table and deduce the minimal logic function as a sum of products.
- c) Design the circuit indicating the type and minimum number of 2-input logic gates required, and predict how the system would respond if sensor $C$ suffered a permanent failure that left it stuck at a low level ($C = 0$).
A classmate has assembled the combinational circuit shown in the figure, believing that output $S$ would depend on the combination of both variables ($A$ and $B$). When…
A classmate has assembled the combinational circuit shown in the figure, believing that output $S$ would depend on the combination of both variables ($A$ and $B$). When checking the operation table in the laboratory, they suspect something is wrong.
- a) Deduce the missing value in the table for the combination $A = 1, B = 0$ and write the unsimplified logic function that exactly describes the gate diagram in the figure.
- b) Prove algebraically and experimentally (from the table) why one of the two variables has no real influence on output $S$, and indicate what radical simplification this circuit allows in practice.
- c) Predict what would happen if you swapped the positions of both logic gates (the AND gate in place of the OR gate, and the OR gate in place of the AND gate): would the resulting truth table change? Formally justify your answer.
The security system of an industrial warehouse has three digital sensors: door opening ($P = 1$), window opening ($V = 1$), and system arming switch ($A = 1$ when…
The security system of an industrial warehouse has three digital sensors: door opening ($P = 1$), window opening ($V = 1$), and system arming switch ($A = 1$ when surveillance is activated). The alarm ($S = 1$) must sound if the door or the window is opened, but only when the system is armed.
An installer connects the sensors according to the expression $S = P + V \cdot A$, arguing that "since the door is the main entrance, it must have a direct connection to the alarm annunciator".
- a) Identify with which combination of inputs the technician's installation will fail and explain the serious security or false alarm problem it will cause in the warehouse.
- b) Draw up the truth table that accurately models the requested specifications and obtain the canonical function as a sum of minterms.
- c) Simplify the resulting function using the properties of Boolean algebra and describe the optimal electronic circuit, indicating which specific logic gates and how many inputs each one requires.
The automatic watering system of a municipal park ($S = 1$ to open the solenoid valve) responds to the logic function $S = A \cdot \overline{B} + C$, where the inputs…
The automatic watering system of a municipal park ($S = 1$ to open the solenoid valve) responds to the logic function $S = A \cdot \overline{B} + C$, where the inputs correspond to:
-
$A$: soil moisture sensor ($A = 1$ if the soil is dry).
-
$B$: weather forecast sensor ($B = 1$ if rain is forecast in the coming hours).
-
$C$: manual push button for gardening staff ($C = 1$ if forced watering is activated).
- a) Interpret the technical meaning of the function: under what specific conditions does the park water in automatic mode ($C = 0$)? Justify why variable $B$ must appear inverted in the expression.
- b) Draw or describe the detailed connection of the logic circuit that implements this function, indicating which basic logic gates (NOT, AND, OR) are needed.
- c) If an electrical fault leaves the manual push button permanently activated ($C = 1$), predict what will happen to watering and reason whether the moisture and weather forecast readings will still have any effect on water consumption.
- d) Determine what would happen if, on the contrary, the rain sensor suffers a short circuit and remains stuck at $B = 1$: in what single situation will the park be watered?
A group of students assembles the safety circuit for operating a motorized shear in the workshop ($S = 1$ activates the motor). They use two signals: dead man's switch…
A group of students assembles the safety circuit for operating a motorized shear in the workshop ($S = 1$ activates the motor). They use two signals: dead man's switch ($A = 1$ pressed) and clear photoelectric safety light curtain ($B = 1$). They feed $A$ and $B$ into an AND gate, and connect its output to an OR gate along with the direct signal from $A$ itself. The group argues that "the OR gate adds an extra level of safety because it checks the switch twice".
- a) Write the logic function that models the circuit assembled and create its full truth table.
- b) Formally prove, using the laws of Boolean algebra, what radical simplification the function allows and refute the group's claim by explaining which physical components are completely redundant.
- c) Evaluate the consequences for occupational safety: if an operator puts their hand in, interrupting the photoelectric light curtain ($B = 0$) while keeping $A$ pressed, will the shear motor stop? Justify your answer based on the circuit analysis.
Two companies are bidding to mass-produce the alarm system for a fleet of vehicles ($S = 1$ activates the siren) using three signals: ignition contact off ($A = 1$),…
Two companies are bidding to mass-produce the alarm system for a fleet of vehicles ($S = 1$ activates the siren) using three signals: ignition contact off ($A = 1$), impact sensor ($B = 1$), and cabin volumetric sensor ($C = 1$).
-
Company Alpha proposes the circuit: $S_1 = A \cdot B + A \cdot C$
-
Company Beta proposes the circuit: $S_2 = A \cdot (B + C)$
An insurance assessor claims that Alpha's design is more reliable because "if the AND gate processing the impact sensor $B$ fails, the vehicle will still be protected against volumetric sensor $C$ thanks to the second independent AND gate".
- a) Algebraically prove the functional equivalence of both circuits, indicating the mathematical property applied.
- b) Critically evaluate the assessor's claim: in Beta's circuit, if the signal from sensor $B$ failed, would the alarm stop sounding in response to the signal from $C$? Justify whether there really is any actual redundancy advantage in Alpha's proposal compared to Beta's.
- c) Quantify the number and type of 2-input logic gates required for each design and justify with reasoning which of the two projects should be chosen for mass vehicle production, taking into account manufacturing costs and component count.
You want to design the smart lighting system for a communal hallway using three signals: motion detector ($M = 1$), twilight night sensor ($N = 1$), and manual…
You want to design the smart lighting system for a communal hallway using three signals: motion detector ($M = 1$), twilight night sensor ($N = 1$), and manual maintenance switch ($I = 1$). The light ($L = 1$) must turn on automatically when it is night and motion is detected, or at any time if the manual switch is actuated.
- a) Draw the truth table of the system and derive the simplified logic function $L(M, N, I)$.
- b) The residents' association requests the addition of a "vacation mode" via a master switch $V$ ($V = 1$ vacation mode active). In this mode, automatic night-time activation must be completely disabled to save energy in case of drafts, but the manual switch $I$ must still be able to turn on the light for security personnel needs. Derive the new function $L_{vac}(M, N, I, V)$, justifying the modification without the need to construct a 16-row truth table.
- c) In the initial circuit (without vacation mode), residents report that the light remains continuously on 24 hours a day without anyone pressing switch $I$ or anyone being in the hallway. Reasonably deduce which two independent physical faults in the circuit inputs could be causing this failure.
A student designs a home alarm system combining two sensors: door magnetic contact ($A = 1$ if open, $A = 0$ if closed) and volumetric motion radar ($B = 1$ if presence…
A student designs a home alarm system combining two sensors: door magnetic contact ($A = 1$ if open, $A = 0$ if closed) and volumetric motion radar ($B = 1$ if presence is detected). To ensure all situations are covered, he writes in his technical report:
"The alarm ($S = 1$) must trigger if there is motion with the door open ($A \cdot B$), and also if there is motion with the door closed ($\overline{A} \cdot B$). Therefore, the function is $S = A \cdot B + \overline{A} \cdot B$, which I will implement with two AND gates, one NOT, and one OR."
- a) Prove by algebraic simplification and using the corresponding truth table what the actual minimum logic function of the system is.
- b) Explain the physical meaning of the mathematical result obtained: does the door sensor $A$ provide any useful information to activate the siren? Which components from the initial setup are redundant?
- c) Predict what would happen to the student's system if the door sensor $A$ breaks down and remains permanently disconnected (erroneous logic level): would the alarm stop sounding in the presence of an intruder or would security be compromised compared to the simplified circuit? Justify your answer.