Computers are relatively fragile, and can’t handle the electricity that comes out of the wall. It needs the block to tune the electricity to what it can use. Big desktop computers have to do the same thing, but since they’re already big, the block is inside. In both cases, they’re called a power supply.
It’s a transformer. The wall electricity is 120 or 240 volts which will blow up computer parts, and it’s also AC because that’s better for transmission to your house. The transformer converts the wall power to something the computer can use (DC at something like 20V).
It’s the same thing as other electronic devices that have a [transformer block aka “wall wart” right where they plug into the wall.](https://haasentertainment.com/wp-content/uploads/2021/04/Wall-wart.jpg) The difference is that computers need quite a bit of power so the transformer has to be bigger. So they put it partway along the cord rather than right at the plug, because that giant block would likely block other plugs at the outlet or power bar.
Note that modern laptops use less power and better quality transformers, so they can use a smaller transformer block that is back to being right where it plugs into the wall again. My laptop has a small “wall wart” style like what phone chargers have, and no big block part way along the cable.
That block _is_ the charger. It converts the 120v or 230v AC to something the laptop can use, like 12v DC. Many appliances have these built in, but a laptop needs to be thin and light, so it’s kept external.
Your phone charger is the same thing, for the same reason. The laptop charger is just a bigger version of it.
The grid runs on AC, alternating current
Batteries run on DC, direct current
That block (and the block on your phone charger) changes the AC to DC so it can charge the battery and power the device.
In the US and Canada, our grid runs at 60 Hz, so it oscillates 60 times a second. So the owner in an outlet is going from 120V to 0V 60 times every second.
The battery needs a lower voltage and direct current. The USB for your phone, for example is 5V DC, so the voltage is stepped down to 5V and converted to DC
Latest Answers