Chapter 10
Digital Electronics and Embedded Interfaces
Bachelors Program in Mechnical Engineering
Basic Electrical & Electronics Engineering
•
Bachelor
Digital Electronics and Embedded Interfaces
Introduction
Digital electronics represents information using discrete signal levels, usually interpreted as binary 0 and 1. In mechanical engineering, digital systems are central to motor drives, robotics, CNC machines, programmable logic controllers (PLCs), sensor interfaces, safety systems, and condition-monitoring equipment. An electromechanical system commonly combines mechanical motion, electrical power, analog sensing, digital computation, and communication networks.
This chapter develops the foundations needed to analyse and apply digital systems. It begins with number systems and Boolean algebra, then examines logic gates, combinational and sequential circuits, data conversion, microcontrollers, PLCs, and industrial communication interfaces. The emphasis is not merely on circuit operation, but on selecting suitable architectures, interpreting specifications, and integrating digital hardware safely into engineering systems.
Learning Objectives
After studying this chapter, the reader should be able to:
Convert values among binary, decimal, hexadecimal, and two’s-complement representations.
Apply Boolean algebra and truth tables to simplify logic functions.
Explain the operation of combinational and sequential circuits.
Analyse counters, registers, timers, and finite-state controllers.
Explain ADC and DAC operation and calculate ideal resolution and quantization effects.
Distinguish the roles of microcontrollers, PLCs, and industrial computers.
Select appropriate digital and industrial communication interfaces for electromechanical applications.
Identify grounding, noise, timing, safety, cybersecurity, and reliability requirements.
1. Digital Representation and Number Systems
1.1 Binary information
A binary digit, or bit, has two logical states. The physical implementation may use voltage ranges, current levels, magnetic states, charge, or transistor conduction. A logic state is therefore an interpretation of a physical signal, not an abstract voltage independent of hardware.
In a positive-logic system, a higher voltage is normally interpreted as logic 1 and a lower voltage as logic 0. The exact voltage limits depend on the logic family. A valid digital design must distinguish between guaranteed input and output voltage ranges; the nominal supply voltage alone is insufficient.
A group of eight bits is a byte. For an unsigned n-bit number, the place values are powers of two:
N = ∑i=0n−1 bi 2i
where bᵢ is bit i and has value 0 or 1. The least significant bit (LSB) has weight 2⁰, while the most significant bit (MSB) has weight 2ⁿ⁻¹. The unsigned range is 0 to 2ⁿ − 1.
1.2 Common number systems
Decimal uses radix 10, binary uses radix 2, octal uses radix 8, and hexadecimal uses radix 16. Hexadecimal digits A–F represent decimal values 10–15. One hexadecimal digit corresponds exactly to four binary bits, making hexadecimal convenient for addresses, registers, and machine data.
The same binary number is B616, because 1011 is B and 0110 is 6.
To convert a decimal integer to binary, repeatedly divide by 2 and record the remainders in reverse order. For fractional values, repeatedly multiply the fraction by 2 and record the integer parts. Finite decimal fractions do not always have finite binary representations; for example, 0.1₁₀ is recurring in binary.
1.3 Signed binary numbers
Several signed representations exist, but two’s complement is dominant in processors because addition and subtraction can use the same arithmetic hardware. In an n-bit two’s-complement system, the range is:
−2n−1 ≤ N ≤ 2n−1 − 1
To obtain the negative of a positive binary number, invert every bit and add 1. For example, using eight bits, +5 is 00000101. Inverting gives 11111010; adding 1 gives 11111011, which represents −5.
The most significant bit has negative weight in two’s complement. Thus, for an n-bit word:
N = −bn−12n−1 + ∑i=0n−2 bi2i
Overflow occurs when a result lies outside the representable range. In signed addition, adding two positive numbers and obtaining a negative result, or adding two negative numbers and obtaining a positive result, indicates overflow. Carry out of the MSB alone is not a sufficient signed-overflow test.
1.4 Fixed-point and floating-point data
Embedded controllers often use fixed-point data when predictable execution time and low cost are important. A fixed-point value assigns a known scale to an integer. If an integer code C represents a physical quantity with scale S and offset O, then:
x = SC + O
where x and O have the physical unit of the measured quantity and S has that unit per count. Fixed-point arithmetic requires careful management of scaling, rounding, and overflow.
Floating-point representation provides a wide dynamic range but may introduce rounding error and greater computational cost. The choice depends on sensor range, required precision, processor capability, and real-time constraints.
2. Boolean Algebra and Logic Gates
Boolean algebra operates on variables that take values 0 or 1. The fundamental operations are AND, OR, and NOT. In Boolean notation, AND is written AB, OR is written A + B, and NOT is written A̅ or NOT A.
Important identities include:
Identity
Expression
Identity
A + 0 = A; A·1 = A
Null element
A + 1 = 1; A·0 = 0
Complement
A + A̅ = 1; A·A̅ = 0
Idempotence
A + A = A; A·A = A
Involution
A̅̅ = A
Absorption
A + AB = A; A(A + B) = A
De Morgan’s laws
(AB)̅ = A̅ + B̅; (A + B)̅ = A̅B̅
A truth table lists the output for every input combination. For n independent binary inputs, there are 2ⁿ rows. Truth tables are particularly useful for safety interlocks because every abnormal combination can be examined explicitly.
2.1 Standard gates
An AND gate produces 1 only when all inputs are 1. An OR gate produces 1 when at least one input is 1. A NOT gate reverses its input. NAND and NOR are inverted AND and OR functions; both are universal gates, meaning any Boolean function can be constructed using only NAND gates or only NOR gates. XOR produces 1 when its inputs differ, while XNOR produces 1 when they are equal.
For a two-input XOR:
Y = A ⊕ B = A̅B + AB̅
XOR is useful in parity generation, binary addition, comparison, and position or rotation sensing.
2.2 Simplification and canonical forms
A Boolean function can be expressed as a sum of products (SOP) or product of sums (POS). In SOP form, each product term corresponds to an input condition that produces 1. Karnaugh maps provide a graphical method for simplifying functions of a modest number of variables. Groups must contain 1, 2, 4, 8, and so on cells, and groups may wrap around map edges. Larger groups generally produce simpler expressions.
For larger systems, computer-aided synthesis tools use algorithms such as Quine–McCluskey minimization or hardware description language synthesis. Simplification must not remove conditions needed for safety; a shorter expression is not automatically a safer design.
3. Combinational Digital Circuits
A combinational circuit has outputs determined only by present inputs. It has no intended memory of earlier input states. Typical examples include arithmetic units, multiplexers, decoders, encoders, comparators, and parity circuits.
3.1 Adders and arithmetic circuits
A half-adder adds two one-bit inputs. Its sum and carry outputs are:
S = A ⊕ B
C = AB
A full-adder also accepts a carry input Cᵢₙ:
S = A ⊕ B ⊕ Cin
Cout = AB + Cin(A ⊕ B)
A ripple-carry adder connects full-adders in series. It is simple but its worst-case delay increases with word length because each stage may wait for the preceding carry. Faster adders reduce this delay at the cost of additional hardware.
3.2 Multiplexers, demultiplexers, and decoders
A multiplexer selects one of several data inputs and connects it to one output according to select lines. A 2ᵐ-to-1 multiplexer requires m select lines. A demultiplexer performs the reverse operation. A decoder activates one of several outputs for a binary input code; it is used in memory selection, display driving, and actuator addressing.
A priority encoder converts the highest-priority active input into a binary code. Priority is important when several requests, alarms, or interrupts may occur simultaneously.
3.3 Comparators and hysteresis
A digital comparator determines whether one binary word is greater than, equal to, or less than another. In physical sensor interfaces, threshold comparison can produce chatter when a slowly changing signal fluctuates around the threshold. Hysteresis uses different switching thresholds for rising and falling signals. This prevents rapid unwanted switching and is common in limit switches, thermostatic control, and position detection.
3.4 Timing parameters
Real gates do not switch instantaneously. Propagation delay is the time between an input transition and the corresponding valid output transition. Rise and fall times describe output transition speeds. Fan-out describes the number of standard loads that an output can drive while maintaining specifications. Noise margin indicates the tolerance to unwanted voltage disturbances.
A circuit must satisfy setup and hold requirements when signals are sampled by a clock. Violating these requirements can cause metastability, in which a storage element temporarily enters an uncertain state. Metastability cannot be eliminated completely, but its probability can be made extremely small using synchronizer stages and appropriate timing design.
4. Sequential Logic and Digital Control
A sequential circuit depends on present inputs and stored state. Its behaviour is often described by:
Statenext = f(Statepresent, Inputs)
Outputs = g(Statepresent, Inputs)
Synchronous circuits update state on a clock edge. Asynchronous circuits respond directly to input changes and require particular care because propagation delays can create hazards.
4.1 Latches and flip-flops
A latch is level-sensitive: it may follow its input while an enable signal is active. A flip-flop is edge-triggered and samples its input on a specified clock edge. Common types include D, JK, T, and SR devices. The D flip-flop is widely used for registers because its next state equals its D input at the active clock edge.
Registers store multi-bit data. Shift registers move data left or right and are used for serial-to-parallel conversion, delay, and communication. Counters progress through a sequence of states and may be synchronous or ripple-based. Synchronous counters generally provide more predictable timing.
4.2 Finite-state machines
A finite-state machine (FSM) represents a controller using a finite set of states, transitions, inputs, and outputs. A Moore machine produces outputs based only on state, whereas a Mealy machine permits outputs to depend on state and current inputs. Moore outputs are often easier to time and verify; Mealy machines can respond with fewer states but may be more sensitive to input changes.
A safe FSM design assigns defined behaviour to unused states. On detecting an illegal state, the controller should move to a known recovery or shutdown state rather than relying on unspecified hardware behaviour.
A typical machine-cycle controller for a motorized mechanism may contain IDLE, CLAMP, MOVE, VERIFY, RELEASE, and FAULT states. Transitions should include sensor validation, timeout conditions, emergency-stop behaviour, and restart policy.
5. Analog-to-Digital and Digital-to-Analog Conversion
Most engineering variables—temperature, pressure, vibration, displacement, and current—are analog. A digital controller requires an analog-to-digital converter (ADC), while an actuator or analog drive command may require a digital-to-analog converter (DAC).
5.1 ADC operation
An ADC maps an input voltage to a finite digital code. For an ideal n-bit unipolar ADC with input range 0 to VREF, the number of quantization levels is:
L = 2n
The ideal step size, often called 1 LSB, is approximately:
q = VREF/2n
where q is in volts per code. Some data sheets define the full-scale code and transition locations slightly differently, so the manufacturer’s convention must be checked.
For an ideal quantizer, the maximum magnitude of quantization error is approximately half a step:
|eq| ≤ q/2
This assumes an ideal converter and a rounding-type quantizer. Real accuracy also depends on offset error, gain error, integral nonlinearity, differential nonlinearity, noise, reference stability, and sample-and-hold behaviour.
The theoretical signal-to-quantization-noise ratio for a full-scale sine wave is approximately:
SNRdB ≈ 6.02n + 1.76
This relationship assumes ideal quantization noise, a sinusoidal input using the converter’s range, and no other noise or distortion. It should not be treated as the measured SNR of a practical ADC.
Before sampling, an anti-aliasing low-pass filter is normally required. The sampling frequency fₛ must exceed twice the highest frequency component fₘₐₓ for ideal band-limited sampling:
fs > 2fmax
This is the Nyquist condition. It does not remove the need for filtering because real signals may contain out-of-band noise and transients.
5.2 DAC operation
A DAC produces an analog output corresponding to a digital code. Common architectures include binary-weighted resistor, R–2R ladder, current-steering, and pulse-width-modulation (PWM) systems. A PWM output is not a true analog voltage until filtered. For an ideal PWM signal switching between 0 and Vₛ with duty ratio D:
Vavg = D Vs
This average relationship assumes a suitable load or low-pass filter and negligible switching losses. Ripple, load dynamics, switching frequency, and electromagnetic compatibility must also be considered.
5.3 Worked example: ADC resolution
An ideal 12-bit ADC has a 0–5.00 V input range. The number of levels is 2¹² = 4096. Its approximate voltage step is:
q = 5.00/4096 = 0.0012207 V ≈ 1.22 mV
The ideal maximum quantization error is approximately ±0.61 mV. If a pressure transducer produces 0–10 bar over the same range, the pressure represented by one code is:
10/4096 = 0.00244 bar/code
This is resolution, not necessarily accuracy. Sensor error and converter nonidealities may be much larger.
6. Microcontrollers and Embedded Interfaces
A microcontroller integrates a processor core, memory, timers, input/output ports, communication peripherals, and often ADCs, PWM units, watchdogs, and interrupt controllers on one integrated circuit. It is suitable for dedicated products such as servo controllers, battery-management units, sensor nodes, and appliance controls.
A typical embedded interface includes:
digital inputs for switches, proximity sensors, and status contacts;
digital outputs for relays, indicator devices, and driver circuits;
timers and capture/compare units for pulse measurement and motor control;
ADC channels for analog sensors;
PWM outputs for power converters and actuator commands;
serial interfaces such as UART, SPI, I²C, CAN, or Ethernet;
watchdog and brownout protection for fault recovery.
Embedded electromechanical control architecture
Figure: Embedded electromechanical control architecture
Figure: Typical information flow between sensors, an embedded controller, actuators, and a supervisory network.
Good firmware separates hardware drivers, communication services, control logic, diagnostics, and safety-related functions. Interrupt service routines should be short and deterministic. Shared data between interrupt and background code requires suitable atomicity or synchronization. A watchdog should detect software failure, but it must not be used as a substitute for correct design or independent safety protection.
Electrical interface design is equally important. A microcontroller pin usually cannot drive a motor, solenoid, or industrial relay directly. Transistors, gate drivers, flyback diodes, isolation devices, current limiting, and overvoltage protection may be required. Inputs from industrial equipment may need filtering, level conversion, debouncing, and galvanic isolation.
7. PLCs and Industrial Control
A PLC is an industrial controller designed for reliable operation, maintainability, and field wiring. Its scan cycle commonly consists of reading inputs, executing the control program, updating outputs, and performing diagnostics and communications. Exact implementation varies by manufacturer.
PLC programming methods include ladder diagrams, function block diagrams, structured text, sequential function charts, and instruction lists in legacy systems. Ladder logic resembles relay control and is accessible to maintenance personnel. Structured text is effective for mathematical operations, data handling, and complex algorithms.
A PLC differs from a general-purpose microcontroller system in emphasis. The PLC typically provides ruggedized modules, standardized programming, diagnostics, hot-swappable options in some platforms, and industrial I/O. A microcontroller often offers lower cost, smaller size, and more freedom for product-specific optimization. A motion controller or industrial PC may be selected when high-performance coordinated motion, vision, data processing, or complex networking is required.
Control-system design must distinguish ordinary control from functional safety. An emergency stop, guard interlock, or overspeed protection may require safety-rated hardware and certified architectures. Software logic alone should not be assumed to provide the required risk reduction.
8. Digital and Industrial Communication Interfaces
Communication interfaces allow controllers, drives, sensors, HMIs, and supervisory systems to exchange data. Selection involves distance, speed, topology, electromagnetic environment, determinism, diagnostics, interoperability, and safety requirements.
8.1 Common interfaces
UART/serial communication uses asynchronous frames containing start and stop bits and, optionally, parity. It is simple and useful for point-to-point diagnostic links. Voltage-level standards must not be confused: a logic-level UART, RS-232, and RS-485 use different electrical interfaces.
SPI is a synchronous, short-distance interface using clock, data input, data output, and chip-select signals. It is fast and simple but generally requires separate chip selection and is not normally intended for long industrial cable runs.
I²C uses two shared lines, clock and data, with open-drain or open-collector signalling and pull-up resistors. It is convenient on a circuit board but is sensitive to bus capacitance, pull-up selection, address conflicts, and noise.
RS-485 is a differential physical layer commonly used for longer industrial links and multidrop networks. Differential signalling improves noise immunity, but correct termination, biasing, grounding, shielding, and transceiver loading remain necessary. RS-485 specifies electrical signalling, not a complete application protocol; protocols such as Modbus RTU may operate over it.
CAN uses message-based arbitration and robust error detection. A node with the highest-priority message identifier wins arbitration without corrupting the ongoing frame. CAN is widely used in vehicles and machinery. CANopen and DeviceNet are examples of higher-level systems built around CAN concepts, although their detailed profiles differ.
Industrial Ethernet includes physical and higher-level technologies designed for networked automation. Ordinary Ethernet is not automatically deterministic enough for every motion or safety task. Real-time extensions, managed switches, time synchronization, traffic engineering, and certified safety protocols may be required.
8.2 Interface selection
A practical selection procedure is:
Define required data, update rate, latency, maximum cable length, and node count.
Characterize noise, ground-potential differences, temperature, vibration, and hazardous-area constraints.
Determine whether communication must be deterministic or merely best effort.
Select the physical layer, connector, cable, termination, and isolation method.
Select a protocol with suitable addressing, error detection, diagnostics, and interoperability.
Specify failure responses, timeout values, safe states, and cybersecurity controls.
Test the complete installed network, not only laboratory components.
9. Applied Case: Conveyor Sorting Cell
Background
The following is an illustrative case. A conveyor transports manufactured parts past a sensor station. A photoelectric sensor detects each part, an encoder measures belt position, and a vision or measurement unit identifies whether the part is acceptable. A pneumatic actuator diverts rejected parts into a separate bin.
Problem
The system must reject defective parts without misclassification. It must continue safely when a sensor fails, communication is interrupted, or compressed-air pressure is inadequate. The conveyor operates in an electrically noisy environment containing a variable-frequency motor drive.
Analysis
The controller requires digital inputs for the photoelectric sensor, pressure switch, guard switch, and actuator confirmation. The encoder provides pulses whose count estimates conveyor displacement. An ADC may monitor analog pressure or motor current. The inspection result arrives through an industrial network or discrete signal.
If encoder resolution is R pulses per revolution and the belt movement per revolution is d, the ideal displacement per pulse is:
Δx = d/R
This assumes one counted edge per pulse and negligible mechanical slip. If four edges per cycle are counted using quadrature decoding, the effective count may be up to four times the pulse count, subject to encoder and controller specifications.
Approach and solution
The control program is implemented as an FSM. In WAIT, the system monitors guards and pressure. In DETECT, a part is registered and assigned a position reference. In INSPECT, the quality result is associated with the encoder count. In DIVERT, the actuator is energized when the target count is reached. In VERIFY, a confirmation sensor checks that the actuator moved and the part left the main path. Any timeout, inconsistent sensor state, lost communication, or low pressure causes a transition to FAULT.
The actuator output is driven through an industrial output module rather than directly from a processor pin. A flyback suppression device is selected according to the actuator type. The encoder input uses a suitable high-speed counter, and shield termination follows the equipment manufacturer’s recommendations. Communication timeouts are treated as faults rather than as permission to continue indefinitely.
Outcome
The architecture separates sensing, decision-making, actuation, diagnostics, and safety. It permits maintenance personnel to observe state, encoder count, fault code, and communication status. A rejected part is not diverted unless both the inspection result and position reference are valid. On restart, the system requires a controlled homing or clearing procedure so that stale part records are not acted upon.
Learning points
The case demonstrates that successful digital control is a systems-engineering task. Logic equations alone are insufficient. Timing, physical interfaces, failure modes, diagnostic design, and safe recovery are equally important. A communication network should be treated as a component with failure modes, not as a perfectly reliable connection.
10. Challenges, Safety, and Contemporary Practice
Digital systems face noise, electromagnetic interference, power disturbances, thermal stress, component ageing, software defects, and configuration errors. Good practice includes decoupling capacitors, controlled grounding, short return paths, appropriate shielding, differential signalling where suitable, input filtering, surge protection, and separation of power and signal wiring.
Functional safety requires hazard identification, risk assessment, defined safety functions, verification, validation, and management of changes. Relevant standards depend on the application and jurisdiction; examples include IEC 61508 for functional safety principles, ISO 13849 for safety-related parts of control systems, IEC 61131 for PLCs, and IEC 62443 for industrial automation cybersecurity. Compliance cannot be claimed merely because a design uses a PLC or safety-labelled component.
Cybersecurity is increasingly relevant because controllers and drives are networked. Measures include asset identification, least privilege, authenticated access, secure configuration, network segmentation, backup and recovery, patch management, event logging, and controlled remote maintenance. Safety and cybersecurity should be coordinated: a cyber event may create a physical hazard, while an overly aggressive security measure may disrupt a safety function.
Contemporary systems increasingly use edge computing, time-sensitive networking, digital twins, wireless sensors, and machine-learning-based condition monitoring. These technologies can improve diagnostics, but they introduce dependence on data quality, model validity, timing, connectivity, and explainability. A machine-learning prediction should not replace an independent protective limit where failure could injure people or damage equipment.
Best-Practice Design Checklist
Define logic levels, voltage ranges, timing, and environmental conditions from data sheets.
Use truth tables and state diagrams for interlocks and sequence control.
Include defined behaviour for illegal states, missing signals, timeouts, and restarts.
Separate safety functions from ordinary process control.
Distinguish ADC resolution from accuracy and repeatability.
Filter and scale analog signals before conversion; prevent aliasing.
Protect controller outputs from inductive and high-energy loads.
Select communication protocols using latency, topology, noise, and diagnostic requirements.
Provide termination, shielding, isolation, and grounding appropriate to the physical layer.
Test normal, abnormal, startup, shutdown, power-loss, and communication-failure conditions.
Document firmware versions, network addresses, wiring, parameters, and recovery procedures.
Chapter Summary
Digital electronics converts physical information into discrete states that can be processed reliably by logic circuits and embedded controllers. Binary and hexadecimal systems provide compact representations, while two’s complement supports signed arithmetic. Boolean algebra, truth tables, and logic gates form the foundation for combinational circuits such as adders, multiplexers, decoders, and comparators.
Sequential circuits add memory through latches, flip-flops, registers, counters, and finite-state machines. Their design requires attention to clock timing, setup and hold constraints, metastability, illegal states, and safe recovery. ADCs and DACs connect digital systems to the analog physical world; ideal resolution and quantization relationships must be distinguished from practical accuracy and noise.
Microcontrollers provide compact, programmable control for dedicated products, whereas PLCs emphasize rugged industrial operation, maintainability, diagnostics, and standardized programming. Communication choices—including UART, SPI, I²C, RS-485, CAN, and industrial Ethernet—must be based on electrical environment, timing, topology, interoperability, and failure behaviour. Effective electromechanical design integrates hardware, firmware, control logic, safety, cybersecurity, diagnostics, and maintenance rather than treating digital electronics as an isolated circuit topic.
Key Terms
Binary number: A number represented using radix 2.
Bit: A binary digit having a logical value of 0 or 1.
Two’s complement: A signed binary representation commonly used for processor arithmetic.
Boolean algebra: Algebraic manipulation of variables restricted to values 0 and 1.
Logic gate: A circuit that performs a Boolean operation.
Combinational circuit: A circuit whose output depends on present inputs.
Sequential circuit: A circuit whose output depends on present inputs and stored state.
Flip-flop: An edge-triggered binary storage element.
Finite-state machine: A controller represented by defined states and transitions.
Propagation delay: Time between an input transition and the corresponding valid output transition.
Metastability: An uncertain temporary state caused by violating a storage element’s timing requirements.
ADC: An analog-to-digital converter that maps an analog input to a digital code.
DAC: A digital-to-analog converter that produces an analog output from a digital code.
Quantization: Mapping a continuous amplitude to discrete code levels.
Microcontroller: An integrated processor system containing memory and peripheral interfaces.
PLC: An industrial controller designed for reliable programmable automation.
PWM: Pulse-width modulation in which duty ratio controls average delivered energy or voltage.
RS-485: A differential physical-layer standard commonly used for multidrop industrial links.
CAN: A message-based control network with arbitration and error-detection mechanisms.
Functional safety: Reduction of risk through safety-related control functions and validated measures.
Review Questions
Short Answer Questions
What is the difference between a bit, a byte, and a word?
State De Morgan’s two Boolean laws.
How does a sequential circuit differ from a combinational circuit?
What is the purpose of an anti-aliasing filter before an ADC?
Why is a microcontroller output normally not connected directly to a motor?
Long Answer Questions
Explain binary, hexadecimal, and two’s-complement representations, including their ranges and practical uses.
Describe the operation and applications of multiplexers, decoders, comparators, and adders.
Explain latches, flip-flops, registers, counters, and finite-state machines in an embedded controller.
Discuss ADC resolution, quantization error, accuracy, sampling, and practical sources of conversion error.
Compare microcontrollers, PLCs, and industrial computers for electromechanical automation.
Analytical / Application Questions
Design a finite-state sequence for a guarded motorized clamp. Define normal states, sensor conditions, timeout behaviour, emergency-stop response, and restart requirements.
A 10-bit ADC measures 0–3.3 V from a position sensor. Calculate its ideal step size and explain why the actual position accuracy may be worse.
Select a communication approach for ten distributed motor drives in a noisy factory over 100 m. Justify the physical layer, topology, termination, diagnostics, timing requirements, and safety response to communication loss.
Multiple Choice Questions with Answers
Question 1
What is the unsigned decimal value of (10110110)2?
A. 166
B. 182
C. 190
D. 214
Correct Answer: B. 182
Question 2
Which Boolean expression represents a two-input XOR function?
A. AB
B. A + B
C. A̅B + AB̅
D. A̅B̅ + AB
Correct Answer: C. A̅B + AB̅
Question 3
What is the approximate ideal step size of a 12-bit ADC with a 0–5 V input range?
A. 0.61 mV
B. 1.22 mV
C. 2.44 mV
D. 5.00 mV
Correct Answer: B. 1.22 mV
Question 4
Which circuit’s output depends on both present inputs and stored previous state?
A. Combinational circuit
B. Sequential circuit
C. Decoder only
D. Resistor divider
Correct Answer: B. Sequential circuit
Question 5
Which device is specifically intended to detect software failure and initiate recovery or reset?
A. Watchdog timer
B. Multiplexer
C. DAC
D. Parity generator
Correct Answer: A. Watchdog timer
Question 6
For an ideal PWM signal switching between 0 and 24 V with a duty ratio of 25%, what is its average value after suitable filtering?
A. 3 V
B. 6 V
C. 12 V
D. 18 V
Correct Answer: B. 6 V
Question 7
Which interface is a differential physical layer commonly used for longer multidrop industrial links?
A. SPI
B. I²C
C. RS-485
D. Parallel GPIO
Correct Answer: C. RS-485
Question 8
What is the main purpose of a finite-state machine in a sequence controller?
A. To amplify motor current directly
B. To define states and valid transitions for control behaviour
C. To convert analog voltage into a digital code
D. To replace all safety hardware
Correct Answer: B. To define states and valid transitions for control behaviour
Question 9
For an ideal 8-bit two’s-complement system, which range is representable?
A. −127 to +127
B. −128 to +127
C. 0 to 255
D. −255 to +255
Correct Answer: B. −128 to +127
Question 10
Why is communication loss commonly assigned a timeout and fault response in an industrial controller?
A. Because networks never transmit valid data continuously
B. Because indefinite use of stale commands may create an unsafe condition
C. Because a timeout increases ADC resolution
D. Because it eliminates the need for grounding
Correct Answer: B. Because indefinite use of stale commands may create an unsafe condition
Basic Electrical & Electronics Engineering
Chapter 10
of 15