What's changed: Initial version
2.6Hardware and Embedded Systems
Learn logic circuits—the foundation of digital circuits, split into combinational circuits and sequential circuits—and the flip-flop, which stores state. We also cover IoT devices, made up of sensors that capture real-world information and actuators that physically act on computer instructions, embedded systems specialized for a particular purpose under tight resource constraints, and power-saving design thinking.
Trace a computer down to its foundations and you eventually reach logic circuits, which combine electrical ON/OFF signals to make decisions and store state. On top of this foundation sit IoT devices that interact with the physical world and embedded systems narrowed to a specific purpose. Understanding hardware thinking reveals constraints and design decisions that software alone does not show.
2.6.1Logic circuits and flip-flops
- A logic circuit realizes logical operations like AND, OR, and NOT as an electrical circuit. A combinational circuit is one whose output is determined solely by the current input values (it holds no past state; e.g., an adder). A sequential circuit is one whose output depends on the current input plus past state (memory) as well (e.g., a counter, a register). This distinction—whether the circuit holds state—is the key dividing line.
- A flip-flop is the basic building block of a sequential circuit, capable of storing one bit of information: it holds or changes its output state in response to input signals and keeps that state until a new input arrives. Combining many flip-flops together builds larger memory and sequencing circuits, such as registers and counters.
The staples: a combinational circuit's output depends only on the current input (no state); a sequential circuit's output also depends on past state (it has state); a flip-flop is the basic sequential-circuit element that stores one bit; an IoT device = a sensor (input) plus an actuator (output). Confusing the roles of sensors and actuators is also a classic trap.
The difference between combinational and sequential circuits becomes clear through a familiar appliance-design example. A simple adder circuit always outputs the same sum given the same two input numbers, regardless of what it computed previously—a textbook combinational circuit. By contrast, a control circuit that remembers an elevator's history of button presses to decide which floor to head to next, or a counter circuit that tallies how many times a button was pressed, has an output that depends on not just the current input (a new button press) but also past state (the memory of buttons pressed so far), so it is realized as a sequential circuit. The flip-flop is what carries this "memory of state," placed throughout a sequential circuit to hold needed information bit by bit. Extending this idea further leads to the design of IoT devices (Internet of Things). An IoT device bridges the physical and digital worlds by combining a sensor (the input side, which converts real-world physical quantities—temperature, humidity, light level, acceleration—into electrical signals) with an actuator (the output side, which physically acts on instructions from a computer, e.g., spinning a motor or opening/closing a valve). Many such IoT devices lack the general-purpose processing power of a PC and are instead implemented as embedded systems designed for a specific purpose and operating within limited memory, processing power, and power. For battery-powered devices, since operating time directly affects product value, power-saving design—cutting power to part of the circuit once needed processing finishes, or adjusting the interval between operations to reduce consumption—becomes an important consideration in embedded development.
| Category | How output is determined | Example |
|---|---|---|
| Combinational circuit | Current input only (no state) | Adder |
| Sequential circuit | Current input + past state | Counter, register (built from flip-flops) |
Trap: "a sequential circuit is simply a more complex kind of combinational circuit" is wrong—the essential difference is not complexity but whether the output reflects past state (memory). Also, "an IoT device's sensor is an output device that performs physical actions" is wrong—a sensor is an input device that converts a physical quantity into an electrical signal; performing physical actions is the job of the actuator (the output side). "An embedded system should have processing power equal to or greater than a general-purpose PC" is also wrong—the key design point of an embedded system is narrowing it to a specific purpose and operating it within limited resources and power.
2.6.2Section summary
- Combinational circuit = output from current input only (no state); sequential circuit = also reflects past state (has state). Flip-flops are the basic sequential-circuit element storing one bit
- IoT device = sensor (input, converts a physical quantity to an electrical signal) + actuator (output, physical action), bridging the physical and digital worlds
- Embedded systems are specialized for a particular purpose and operate within limited resources and power. Power-saving design matters for battery-powered devices
Sign in to track progress — Log in.
Quick check
(just a quick review)Q1. Which type of circuit has its output determined solely by the current input values, retaining no past state whatsoever?
Q2. In an IoT device, which component is responsible for converting the surrounding temperature into an electrical signal to capture it?
Q3. When designing a battery-powered embedded device, which design consideration should be emphasized to extend operating time?

