This article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.
How does USB work?
Quick answer
USB works through a host controller that polls connected devices over four wires: two for power and two for differential data. Each device gets a unique address, and data moves in packets between host and device endpoints, using transfer types suited to different needs like control, interrupt, bulk or isochronous.
USB works by using a host controller to manage a tiered network of devices over a cable whose classic USB 2.0 core has four wires, two for power and two for differential data; newer versions add high-speed pairs. The host polls each device, and data packets travel between host and device endpoints using assigned addresses and pipe configurations.
Step by step
- The host supplies 5 volts on VBUS and Ground, powering the device and signalling a connection.
- The host detects a voltage change on D+ or D- and resets the device to a known state.
- The host reads the device descriptor, assigns a unique address, and selects a configuration.
- The host and device exchange data packets through endpoints using one of four transfer types.
- The host polls each device regularly, managing bandwidth and power for all connected devices.
Key things to understand
- A USB 2.0 cable contains four wires: VBUS and Ground supply 5 volts, while D+ and D- carry data as a differential pair.
- The host controller, usually inside a computer, acts as the master and polls each connected device in turn.
- Each device is assigned a unique address by the host during enumeration, allowing many devices to share the bus.
- Data moves in packets between host and device endpoints, which are logical channels identified by address and endpoint number.
- USB supports four transfer types: control, interrupt, bulk and isochronous, each suited to different data needs.
Labelled diagram
- Host
Computer or hub controller that manages all bus traffic and power delivery.
- Cable
Four wires: VBUS, Ground, D+ and D- for power and differential data.
- Device
Peripheral with endpoints that receive and send data packets.
- Enumeration
Host assigns address and reads descriptors to identify the device.
- Data transfer
Packets move between host and device endpoints using a chosen transfer type.
Real-world examples
- A USB flash drive plugged into a laptop is enumerated, assigned an address, and appears as a storage drive.
- A smartphone connected by USB to a charger draws power over VBUS while negotiating the correct current.
- A USB keyboard sends interrupt transfer packets whenever a key is pressed, which the host reads as typed characters.
- An external hard drive uses bulk transfers to move large files reliably, with error checking and retries.
Common mistake
✗ Myth: USB devices can send data whenever they want, like a peer-to-peer network.
✓ Fact: USB is a host-controlled bus. The host polls each device in turn, so devices only transmit when asked, preventing collisions and managing bandwidth.
People also ask
What is the difference between USB 2.0 and USB 3.0?
How does a USB hub work?
Why does USB have a maximum cable length?
What happens when you plug in a USB device?
Why do USB cables have different connectors?
How does USB transfer data so quickly?
Can USB carry both power and data at the same time?
Part of the guide: How the Internet Works →

