Hardware is the physical machinery your computer is made of. Your computer is made of a bunch of different hardware components which all have their own jobs, like performing calculations, storing data or retrieving data. The quality that makes computers cool though is that they are programmable, meaning you can customize how they work.
There are other machines which are programmable, such as mechanical looms. The loom can be configured to weave different patterns into the fabric. A machine doesn’t have to be electronic to be programmed. A program, in its simplest sense, is just a particular configuration of the parts in a machine which makes it behave a certain way.
However, computers take this a step further, clearly, and writing programs for computers has become so complex that we created a new term for it: software.
So, in short, you can think of the hardware as the physical stuff that the computer is made of, and the software as the configured state of that physical stuff that allows the computer to behave the way you want.
1/0 on a computer is represented by wires that are *on* or *off*.
When you switch off the light in your bedroom, you are kind of like “giving a command to turn dark” to the lamp, but the lamp doesn’t need to understand English to achieve that, because everything is expressed in terms of “on” and “off”.
A screen pixel is kind of like a lamp that can be switchen on or off and a keyboard-key is kind of like a switch that can open or close a circuit.
The piece of hardware that does addition in a computer is made just so, that it produces a pattern on it’s outgoing wires that represent a number that is the sum of the patterns on the incoming wires. It has 2 times 64 wires (+1 carry) going in and 64 wires (+1 carry) going out.
A program is a list of instructions and every instruction switches on a different path in the computers circuitry.
– Connect memory cell 402 and 742 to the adder and connect the result to memory cell 467!
– cell 239 and 198 to divider, result to cell 811.
– cell 811 and 467 to subtraction, result to 811.
– …
Some of those memory addresses are determined by input devices, some addresses are used for output devices, like screen and speakers.
Software could be described as a specific state of the hardware like if you had a controlboard with lots of knobs (Just with way more information and instead of straightforward settings there are many conditions). Hardware can save information by changing its state like you can save information on paper by writing on it. Software is information and thus the hardware can save it (on your hard drive/ssd to be more specific).
Now part of the hardware can read out the software information and interpret it is commands on what to do. When you turn your computer on it starts by reading some firmware (which is essentially software that is less easy to change), over this firmware it then starts reading your operating system and when you click the button to start some program that triggers some commands your operating system has which say “now start reading this software you saved and start executing the commands you read”. And so the processor tells the hard drive “I need the information you saved in this position” and the hard drive sends the information to the processor and the processor interprets the information as commands on what to do.
The CPU has direct connection to memory (and various communication channels like SATA, I2C, etc etc). In other words, the ability to read and write information to/from memory is physically built into the CPU.
The CPU also has a built-in vocabulary of commands that it can understand. For example, number 15 means ADD two numbers. When the CPU reads a number from a memory with the expectation that it will be a command, it will then proceed to perform a sequence of actions that are appropriate for the command number. This sequence of actions is also physically built-in into the design of the CPU. So for example, if it sees the number 15, it’s built-into the CPU to do the following: read next two numbers from memory, add them together, read next number from memory, store the result in the memory address represented by that third number.
It is also physically built-into the CPU that when it powers on, it then goes to a predefined address in the memory and starts reading commands from there.
What is software? Software is merely a list of commands, like an instruction book that tells the computer step by step what commands to perform. Naturally, it has to be written in accordance to the CPU’s vocabulary of commands, otherwise it won’t do want you expect it to do.
You can now 15 two and two together and understand that in order for software and hardware to connect, the “collection of commands” that is the software needs to be put in memory where the CPU is designed to find it.
Software is a number, or in other words it’s not actually something physical. This takes a lot of explaining to understand, but typically someone trying to explain this concept tells you to look at the number 5. Is that five? No, it’s a universally agreed upon symbol meant to represent five. Then there’s the english word used to represent five. One of the security features of writing a check is to write the number in two different ways to ensure the amount written out is what is actually meant. This process makes it harder to tamper with after the amount is written.
Out of context, 5 doesn’t really mean anything on its own. It could be the second digit of a string of four digits, or it could mean nothing.
Computers typically operate on electricity, so, you use current or no current to create a gate capable of representing 1 or 0. This fundamental representation is true throughout your entire digital computer. You could say the entire point of a digital computer is to interpret those 1’s and 0’s in a way that allows it to modify them and send them along throughout the computer. It’s super weird to think our most powerful of digital computers ONLY understand two values at a fundamental level.
If WE thought about it that way we’d never be able to communicate with the dang thing, so we start grouping the 1’s and 0’s into bigger chunks, and we make the computer send and receive them in bigger chunks as well. The word size is how many simultaneous 1’s and 0’s we expect the computer to deal with in one go.
You know what, I still don’t want to talk to a computer using patterns of 1’s and 0’s. I wanna use my own words. So let’s make a program that can describe some collections of letters and turn them into the corresponding 1’s and 0’s for me. We’ve finally reached the “assembly compiler” program, and believe it or not there were people who used to use binary codes that *scoffed* at the idea of using real human words to tell a computer what to do.
Today you *still* don’t really use that compiler directly. The number of sheer software that sits upon software next to the hardware, which could be firmware (software written directly to a computer to control it) or the operating system (basically, software that sits in between the user and the computer and interprets all those keystrokes and sends them to the right program at the right time while also managing the programs and hardware for the programs you run) makes modern programming a completely different beast than writing something for the Commodore 64 of old. It’s more akin to SethBling’s manual code injection into Super Mario World that eventually let him play Flappy Bird from within Super Mario World. Half of the payload was just to make it easier and less error prone to add more payload.
Latest Answers