A "universal remote" is really a single emitter that can address any device because every command is just a timed sequence of infrared pulses — the interface is universal precisely because the physical channel (a 38 kHz modulated IR beam) carries nothing but timing. This uses the real NEC IR protocol:
Leader: 9.0 ms mark + 4.5 ms space
Bit '0': 562.5 µs mark + 562.5 µs space (total 1.125 ms)
Bit '1': 562.5 µs mark + 1687.5 µs space (total 2.25 ms)
Frame: 8-bit address + 8-bit ~address + 8-bit command + 8-bit ~command
Stop bit: 562.5 µs mark
The "mark" segments are a 38 kHz square-wave carrier (drawn as the dense oscillation in the waveform strip); the receiver's photodiode only needs to detect mark-vs-space timing, so the same 4-byte frame format can encode a power toggle, a lock command, or a fan speed — the device just maps (address, command) to its own action table. The inverted address/command bytes are a checksum: if ~address doesn't match the bitwise complement of address after decoding, the receiver rejects the frame.
- Device — selects the (address, command) byte pair the emitter encodes, shown as glowing pulses traveling from remote to receiver.
- Timing jitter — randomly perturbs each mark/space duration (simulating a cheap oscillator or battery droop); above roughly ±25% a bit's mark/space ratio drifts across the decision threshold and the receiver misreads it, which the checksum then catches.
- Emission speed — plays the pulse train back faster or slower than real time so the full 67.5 ms NEC frame is visible instead of flashing by instantly.
This is the exact protocol used by real infrared universal remotes (and IR-blaster smart-home hubs) to control TVs, ACs, and set-top boxes from dozens of manufacturers with one physical device.