Can I Swap the CPU's from 2 computers and both computers still work?

Pianodude04

Prominent
Jul 7, 2017
17
0
510
I have a prebuilt Windows 10 Home computer with an Intel i5 4460 and a custom-built computer with an Intel Pentium G4500 running Windows 10 Pro. My question is, can I swap the two CPU's, AND both computers will still work? I mean, obviously the prebuilt will be slower than it originally was, but will it still work? Same for the custom-built, it will be faster, but will it still work? Will I lose any of my files or anything? Thank you!