The CPU controls all operations of a computer and performs calculations and logical tasks.
Step 1: Analyze the options.
- Monitor — Output device.
- CPU — Processing unit (brain).
- Keyboard — Input device.
- Mouse — Input device. Step 2: Conclusion.
Thus CPU is called the brain of the computer. Final Answer:
\[
\boxed{(B) \, \text{CPU}}
\]