original_query: What is a brain-computer interface (BCI) and how does it work?
query: What is a brain-computer interface (BCI) and how does it work?
answer: A brain-computer interface (BCI), sometimes called a brain-machine interface (BMI), is a direct communication pathway between the brain's electrical activity and an external device, most commonly a computer or robotic limb.  It works by detecting brain signals (through various methods like EEG, ECoG, or implanted electrodes) and translating them into commands that control the external device.