I'm going to keep this grounded and the only "magic" is the mechanism of splitting the atoms. I'm going to maintain the basic laws of the universe like conservation of energy and the mass-energy equivalence. Basically, "sufficiently advanced technology" magic.
There's a few basic physical laws which are important here:
- Energy cannot be created nor destroyed.
- E=mc^2: energy = mass times the square of the speed of light.
- The Laws of Thermodynamics.
Where Will You Get/Put All That Energy?
That is the basic, basic question of any sci-fi gadget: either getting the energy necessary or dissipating the waste energy produced.
Fission and fusion of atoms both involve a slight change of mass which in turn releases or requires a tremendous amount of energy, depends on what's being fizzed or fused. The mass is small, but the square of the speed of light is something like 9e16 m^2/s^2 which is a very big number and there are a lot of particles. 82 grams of lead contains 6e23 atoms. These numbers
add up multiply up fast.
Stable Atoms Require Energy To Split Or Fuse
Fission and fusion don't always produce energy. They only do so when going from a less stable configuration to a more stable configuration. For example, helium is more stable than two hydrogen atoms, so solar fusion produces energy.
Basically, you put a pound of iron inside the machine, choose to make lead out of it, wait for as long as is necessary, then walk away with a pound of lead.
This is a particularly interesting example. You have chosen two of the most stable atoms in the universe. That means you'll have to pump in a lot of energy to change them.
Iron is the last element produced in stellar fusion just before the star goes supernova; iron is so stable even a super giant star cannot fuse iron into something else. For that you need a supernova.
Lead is also extremely stable. Unlike iron, it's the final decay product for many radioactive isotopes. For example, if you start with a hunk of Uranium 238 that will decay (naturally in about 4 billion years) to Thorium 234. After about a month that decays to Protactinium 234 for about a minute then you get Uranium 235 for another 200,000 years or so. It spends about 70,000 years bumming around as Thorium, fools around as Radium for 1000 years, spends a quick 4 day holiday as Radon 222, and finally bounces around between various isotopes of Polonium, Bismuth and Lead before finally landing on Lead 206 forever.
Those atoms are all unstable, except the last one Lead 206. Each step of that reaction, each time the atom spontaneously fizzes or fuses, that releases energy.
Because lead and iron are so stable, transforming them into anything else will soak up a tremendous amount of energy. Fusing iron or larger is a net loss of energy.
Fission and Fusion Need To Overcome Very Strong Forces
You can't just go in with a pair of very tiny magical tweezers and pull atoms apart. Atoms are extremely tightly bound together.
Fission is knocking a particle away from the nucleus. The nucleus is held together by the strong force which is, you guessed it, very, very strong, but only at very short ranges. It's strong enough to keep all those positively charged protons, which want to fly apart because of the electromagnetic force, tightly packed together.
Fission must overcome the strong force with a lot of energy, like a whizzing neutron smacking into the nucleus, plus some luck with quantum tunneling to jump that last gap. This can jostle the nucleus enough such that a particle gets far enough away for electromagnetism to overcome the strong force and it goes whizzing off.
Fission Does What It Wants
You can't just pull a bunch of protons and neutrons off lead until you get iron. Fission decay chains are pretty well defined and will do what they want. You'll need to find a chain that results in iron, or introduce more magic.
Fusion is a bit better behaved. You can smack helium into various particles to pile on the weight. Stars create iron this way through the silicon-burning process, once they're done fusing oxygen and happens at 3 billion Kelvin. And then the blast wave from the collapsing core of the star smacks into it. So we're talking a lot of energy and pressure.
In Summary: Not Without A Lot Of Handwavium
What you're asking for is the Star Trek replicator.
And yes, it is possible that you'd use nuclear fission and fusion to get your captain a cup of tea it represents such a staggering abuse of energy and technology that even the writers of Star Trek couldn't handle it and started introducing galleys into their ships.
This is the same reason we don't turn lead into gold, even though we can. While it's technically sustainable in that we're not mining the remnants of supernova, it's staggeringly inefficient unless you have a tremendous source of energy... like an anti-matter warp drive engine. But even that anti-matter has to be produced with energy from somewhere, it's like the high capacity batteries of Star Trek that sometimes blow up. Better to mine the remnants of supernova, carefully recycle the elements, and use plain old chemical reactions.
Then again, we're all using mobile supercomputers, a global spanning fiber optic network, and an orbiting satellite positioning system to look at cat videos, play games, and order pizza. All for $20/month.