Hardware

What is PS/2?

PS/2 is a 6-pin mini-DIN connector standard introduced by IBM for connecting keyboards and mice to a computer. It uses a dedicated interface separate from other ports, traditionally color-coded purple for keyboards and green for mice.

What Is PS/2?

The PS/2 connector is a legacy hardware interface used to connect keyboards and mice to personal computers. It takes its name from IBM's Personal System/2 line of computers, which introduced the standard in 1987. The PS/2 interface replaced the older, larger 5-pin DIN keyboard connector (used on the IBM PC/AT) and the serial-port mouse connections that were common at the time.

PS/2 remained the dominant method for connecting input devices throughout the 1990s and early 2000s until it was gradually displaced by USB. Despite being considered legacy technology, PS/2 ports still appear on many motherboards—especially those aimed at enterprise, industrial, and gaming markets—because of specific technical advantages the interface retains.

How PS/2 Works

The PS/2 connector is a 6-pin mini-DIN plug. Although the connectors for keyboards and mice are physically identical, they are not always electrically interchangeable, which is why they are color-coded and often clearly labeled with icons.

  • Purple port/connector — Keyboard
  • Green port/connector — Mouse

The six pins carry the following signals:

  1. Data — Serial data line
  2. Not connected (reserved)
  3. Ground
  4. +5V DC (Vcc) — Power supply to the device
  5. Clock — Synchronizes data transmission
  6. Not connected (reserved)

PS/2 uses a bidirectional synchronous serial protocol. The device (keyboard or mouse) generates the clock signal, and data is transmitted one bit at a time in frames that include a start bit, eight data bits, a parity bit, and a stop bit. Because the interface is interrupt-driven rather than polled, the keyboard sends a hardware interrupt to the CPU whenever a key is pressed, allowing very responsive input handling.

Important: PS/2 devices are not designed to be hot-swappable. Plugging or unplugging a PS/2 device while the computer is powered on can fail to detect the device and, in rare cases, damage the port. Always connect PS/2 peripherals before booting.

Key Characteristics

Interrupt-Driven Operation

Unlike USB, which polls devices at fixed intervals, PS/2 keyboards use dedicated hardware interrupts. This means every keystroke is registered immediately, which is one reason enthusiasts and gamers sometimes prefer PS/2 keyboards.

N-Key Rollover

A significant advantage of the PS/2 keyboard interface is its support for full N-key rollover (NKRO)—the ability to register any number of simultaneous key presses. Standard USB keyboards are typically limited to 6-key rollover unless specially engineered. This makes PS/2 attractive for competitive gaming and fast typing.

No Device Enumeration

PS/2 does not require the operating system to enumerate or install drivers dynamically. This simplicity makes it useful in BIOS/UEFI environments, recovery consoles, and secure or restricted systems where USB may be disabled.

Common Use Cases

  • Legacy hardware support — Older systems and industrial equipment that predate widespread USB adoption.
  • Enterprise and server environments — Servers often retain a PS/2 port for a KVM (Keyboard, Video, Mouse) switch or for guaranteed keyboard access during boot.
  • Gaming keyboards — For guaranteed N-key rollover and low-latency input.
  • Security-hardened systems — Environments that disable USB ports to prevent unauthorized data transfer may still allow a PS/2 keyboard.
  • BIOS/UEFI access — Ensuring keyboard input works during early boot before USB drivers load.

PS/2 vs. USB

FeaturePS/2USB
  • Hot-swapping: USB supports it; PS/2 does not.
  • Rollover: PS/2 offers native full NKRO; USB is usually limited to 6 keys.
  • Polling vs. interrupts: PS/2 is interrupt-driven; USB is polled.
  • Device support: USB supports many device types; PS/2 supports only keyboards and mice.
  • Availability: USB is universal; PS/2 is increasingly rare on modern hardware.

Best Practices and Considerations

  • Connect PS/2 devices before powering on the computer to ensure proper detection.
  • Match connector colors—purple for keyboard, green for mouse. Some motherboards provide a single combo port that accepts either.
  • Use a PS/2-to-USB adapter with caution; passive adapters only work with devices that are designed to support both interfaces.
  • For CompTIA A+ exam preparation, remember the color codes, pin count (6-pin mini-DIN), and the fact that PS/2 is not hot-swappable.
  • When troubleshooting a non-responsive PS/2 device, a reboot is often required because the device is not enumerated at runtime.

Real-World Example

A system administrator managing a rack of servers uses a KVM switch with PS/2 connections. Each server retains its PS/2 keyboard and mouse ports so the admin can reliably access the BIOS and boot menu on any machine, even before the operating system loads its USB stack. Meanwhile, a competitive gamer chooses a mechanical keyboard connected via PS/2 to guarantee that all simultaneous key presses during fast gameplay are registered without ghosting.

Understanding PS/2 remains relevant for IT technicians because the interface still appears on business-class and enthusiast motherboards, and questions about it commonly appear on hardware certification exams.

Studying for CompTIA (Hardware)?

ExamWizardz turns the official objectives into a guided study plan — with practice tests, real PBQs, and a readiness score. Join the waitlist to be first in when CompTIA A+ launches.