Education logo

How computers work

Computer basics: Hardware and Software

By SHAFIUL BASHERPublished 11 months ago 3 min read
How computers work
Photo by Desola Lanre-Ologun on Unsplash

When you open up a computer, you can see a ton of circuits, chips, wires, speakers, plugs, and other components. Hardware looks like this. However, you can't view the software. Any computer program or piece of code that is now active on this device is known as software. Apps, games, and websites can all be considered software, but how do the hardware and software interact with one another?

Let's start by looking at a computer's central processing unit, or CPU. The CPU is the master chip that controls all the other parts of the computer. A CPU needs to do different things, so inside it has smaller, simpler parts that handle specific tasks. It has circuits to do simple math and logic. It has other circuits to send and receive information to and from different parts of the computer. The real magic of the CPU is how it knows which circuits to use and when to use them. The CPU receives simple commands that tell it which circuit to use to do a specific job. For example, an "Add" (2+3) command tells the CPU to use its outer circuit to calculate a new number. And then the "Store" (2+ 3 = 5) command tells the CPU to use a different circuit to save that result into memory.

Just like numbers, all of these simple commands can be represented in binary ones and zeros or on and off electrical signals. The binary commands are stored in memory, and the CPU fetches and executes them in sequence, one after the other. This sequence of commands is, in fact, a very simple computer program.

Binary code is the most basic form of software, and it controls all the hardware of a computer. These days, nobody writes software in binary. It would take forever! Today, the software we write uses programming languages like Python, Java, PHP, and more. Programming languages like these let you type commands in something that looks a lot like English. To draw a rectangle on the screen, you just need a single command. This high-level command is converted into hundreds, or thousands, of simpler binary commands that the CPU understands.

Software tells the CPU what to do, but when you're listening to music, browsing the web, or chatting with a friend, your computer is running multiple pieces of software all at once. So, how do all of these programs get on the computer in the first place, and how can the CPU run them all at once? To find out, we'll have to take a look at the operating system.

The operating system of the computer is the master program that manages how software gets to use the hardware of the computer. The operating system is a program with special abilities that let it control the other software on the computer. It lets you install new programs by loading them into your computer's memory. It decides when a program is run by the central processing unit and whether that program can access the computer's input and output devices. And when you think your computer is running many programs at once, in reality, it's the operating system that's quickly switching between programs sharing that CPU for fractions of a second.

Inside every computer is an operating system that manages software that controls the computer's hardware. The software is a series of commands made of simple binary code, and that binary code is just electrical signals flowing through billions of tiny circuits. Computers have the potential to do all kinds of amazing things. But the only thing that makes the computer smart or useful is you. When you learn to code, you get to define the problem you want to solve and write the software that turns those ideas into reality. That gives you the power to build things that matter to you, your community, and the world.

how to

About the Creator

SHAFIUL BASHER

Enjoyed the story?
Support the Creator.

Subscribe for free to receive all their stories in your feed. You could also pledge your support or give them a one-off tip, letting them know you appreciate their work.

Subscribe For Free

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

    SHAFIUL BASHERWritten by SHAFIUL BASHER

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.