A device that converts brain signals into electrical signals (for recording) or vice versa (for stimulation).