can i carry-on cpu on a plane

Just the CPU, or an entire computer?

I guarantee you that a processor would be fine, and, if it's small enough and your airport is modern-ish, carrying your whole computer is fine too. I've taken my small form factor computer all over the country for business and pleasure - all they do nowadays is swipe it with a sensitive pad and scan the pad for traces of bomb residue.
 

Gundy

Honorable
Jan 30, 2013
97
0
10,660
Check the size of carry-on that your airline allows. Some larger boxes won't fit in the overhead bins, so you'll have to gate-check it.

At any rate, if you're transporting your computer long distance take out any expansion cards (especially GPUs) and large coolers and pack them separately. I can tell you from personal experience that those things break off due to shock and vibe.