Hardware vs Software: The Differences Explained

There is no denying that we live in a world full of electronic devices, from our household appliances, to something as life critical as a heart pacemaker. Over the decades, electronic devices have evolved in sophistication, as well as having increased in complexity.

If we look at the early days of electronics, we find that all devices were only hardware, containing no software. Today however, almost every device comes with some form of software. For example, the first telephones were nothing more than a microphone, speaker, and switch.

A telephone today can store a catalog of telephone numbers, remember what numbers were dialed and redial them, log the time and duration of calls, perform call forwarding, and a whole array of other features. This added functionality is the result of incorporating software into the design.

Hardware vs Software: Defining Terminology

Hardware, refers to the physical elements that make up a system, such as a CRT or LCD screen, a network switch, or the memory chips and hard disk drive in a computer system.

Software, refers to the program or code that executes, sometimes to monitor or control the hardware, other times to perform calculations. Software can be referred to by a number of other names, such as code, program, application, but all refer to the basically the same thing.

This immediately implies that software requires somewhere to reside, usually memory, and some type of controller to load and execute the software, program or code.

The controller is itself hardware, and can be as simple as an embedded micro-controller found in a washing machine, refrigerator, or game controller, or as sophisticated as a Central Processing Unit (CPU) that powers today’s personal computers and laptops.

But where does software reside? While software can be stored on a variety of storage media (such as hard disk drives, solid state drives, USB memory sticks, CDs or DVDs), in order for a controller or CPU to execute the software code, it must be transferred from the storage media to system memory, known as Random Access Memory (RAM), so it can be directly accessed by the controller.

Some software is not loaded from storage media, but is instead permanently stored in non-volatile Read Only Memory (ROM) or flash ROM. This type of software is referred to as firmware and is used primarily on devices that perform a single, specific function, such as a photocopier, a microwave oven, set top boxes, or the control unit in an air conditioner.

The BIOS in a computer system is considered firmware, providing the most basic interface to the system’s underlying hardware, and executes just before the operating system is loaded. In fact, the operating system relies on the BIOS to give it first contact with the hardware, so it can in turn send output to the screen, read any input from the keyboard, and load the kernel from mass storage devices, so that the operating system can eventually take over control of the system.

Flash ROM is especially popular for storing firmware, since it permits the firmware to be updated when new revisions and versions become available. Being in ROM also means the code is always available to the controller or CPU, and does not need to be loaded from storage media, even after the system has been turned off.

Think of the inconvenience of having to load the program code from an external storage device every time you wanted to perform a menial task such as copying documents, heating a plate of food in a microwave oven, or using a game controller on your favorite gaming console. All these devices rely on a micro-controller and software to operate.

While a device can be all hardware and have no software, the opposite is not true. Namely, no device can exist as just software without some form of hardware to store, read and execute the code. This further implies that anything that stores or executes the software, must be hardware.

There are some benefits in designing a device as all hardware, such as it will most likely (although not necessarily always), execute faster than if it were implemented using software. Also, for very simple devices, there would be a tremendous overhead and added costs when implemented using the software approach.

Consider the case of a low pass, high pass, or band pass audio filter. Such filters can be designed with a few components, typically a handful of resistors and capacitors, or for a more sophisticated circuit, an operational amplifier can be used.

To achieve the same with software, a whole arsenal of integrated circuits and hardware components are required, such as memory and a controller to store and execute the software, analog to digital and digital to analog converters, and a power supply to power everything. The software required to achieve the filtering is also not trivial, and would require the services of a competent programmer for the job.

However, as the complexity of the device increases, the rewards from incorporating software into the design become more attractive. In fact, there are some tasks that would be extremely difficult and too complex to achieve in pure hardware.

Generally, software allows greater flexibility and extendability. The aforementioned filters could all be incorporated into a single device that could operate as any type of filter, with selectable function and range of frequencies. Any improvements to the design could be implemented without requiring any changes to the circuitry, but by simply updating the software.

Applications, a form of software users execute on a computer system, are typically dynamic in nature, since their functioning and output changes with input and directives provided by the user. An application will very rarely be required to produce the same results every time it is executed.

For example, the output to the screen from a document editor is dependent on what the user loads from disk or types from the keyboard. It can provide spell checking from different dictionaries (e.g. U.S. English as compared to British English), and recommend grammatical suggestions and corrections based on the user’s text.

In contrast, the software used to control a washing machine, where there are a predefined series of functions and operations, behaves exactly the same no matter how many times it is run. The user of the washing machine selects the wash cycle, and the controller will run a set sequence of events based on that cycle, such as low, medium, or high agitation wash, rinse, spin dry.

Likewise, the BIOS in a computer system can perform a set series of low level tasks, just enough to get the system up and running. It can read sectors from the hard disk drive and execute the boot loader program, but it does not know how to load a user application, allocate memory and execute it. That is the role of the operating system, which itself is also software.

Types of Software

computer software
Examples of Computer Software

Software can be categorized in a number of ways. The following mostly apply to computer systems since this is where the majority of today’s publicly available software is executed. Some software is available for free, while other types require the purchase of a license or subscription service.

Application software refers to end user programs, typically executed on a computer system. Some application software must be installed on the user’s system, but more and more software is now also becoming available online in the form of web apps.

  • Document editors – Microsoft Word, LibreOffice Writer.
  • Graphics, video, and audio manipulation and production software – Adobe Photoshop, Adobe Illustrator, Inkscape, CorelDRAW, Adobe Premier, Adobe Audition, Audacity.
  • Text editors – Notepad, Notepad++, Sublime Text, Visual Studio Code (apart from Notepad, all the others listed here are also called code editors since they are used by programmers to write software code).
  • Games – Minecraft, Microsoft Solitaire, Grand Theft Auto.
  • Web browsers – These have become in themselves a springboard for executing online applications. The most prominent web browsers are Chrome, Safari, and Firefox.

Another category of software is System Software, which can be further broken down.

  • Operating Systems – Apple macOS, Linux, Microsoft Windows, Android, iOS.
  • Device drivers – These are special, usually very compact programs that are operating system specific (i.e. a device driver written for one operating system cannot be used on another), giving the operating system control over hardware such as the graphics, audio, USB ports, WiFi and Ethernet port, hard disk or solid state drives, computer mouse and keyboard.
  • System utilities – Anti-virus software, registry cleaners, network analyzers, system monitors, backup software.

Software can also be categorized according to the domain or realm of execution.

  • Desktop applications and mobile Apps – Microsoft Office, Web browsers, iTunes, WhatsApp, VLC Media Player.
  • Server software – MySQL server, SQLServer, Apache Web Server, Postfix Mail Server, Exchange Mail Server, Proftpd.
  • Add-ons, extensions, plugins – These are pieces of software that cannot run on their own, but instead add extra functionality to an already existing program. Examples include Handy Calculator add-in for Microsoft Word, QuickFolders for Thunderbird, Zoom Scheduler for Chrome.

While we’ve discussed the various types and categories of software available, we’ve not really dealt with what is software. All processors, have an instruction set. This is the binary code that indicates to the processor what to execute.

The instruction set is specific to each processor model. While the instruction set is binary, programmers use human readable languages to write the software, which is then compiled or interpreted into binary or machine language as it is also known.

The lowest level programming language is assembler, which provides a direct correlation between the written (human readable) language constructs and the binary code executed by a processor. Each assembler instruction and operands, have an exact machine language matching operation code (or opcode) and operands.

Assembler is used for low level programming, especially when dealing directly with the hardware. However, when writing large scale applications, most programmers use higher level languages such as C, C++ or Java.

Since the inception of the World Wide Web, and with more and more web applications being written, another set of languages has evolved, such as Javascript and HTML (known as client-side code and executed on the client’s host machine by web browsers), and Python, PHP, C#, Ruby, NodeJS, etc., executed on the server and known as server-side scripting languages.

Finally, it should be noted that there is one category of software that is not very welcome on any system, namely malware. This includes computer viruses, worms, trojan horses, spyware, adware, and ransomware.

This type of software is specifically written to either extract by stealth (i.e. without the user’s knowledge or consent), information from the user’s computer system of a personal nature with aim to intentionally disrupt, cause damage or gain unauthorized access to a computer system, or use the system for illicit purposes such as send out SPAM email.

Types of Hardware

computer hardware

Since electronics are found in almost every appliance and device in use today, just as with software, hardware can also be grouped into various categories. Whether we’re talking about the electronics found in a modern car or truck, the circuitry and processor in a smart TV or a smart phone, the motherboard and peripheral devices in a computer system, they all have common and similar hardware requirements.

  • Processor – Whether this be a simple micro-controller or a multi core CPU, the processor is the piece of hardware that executes the software. It is the brains of the system. Without the processor, the software cannot exist, and in fact, all software is written to be executed on a specific processor or family of processors.
  • Memory – This is where the software is stored so that it can be directly accessed and executed by the processor. Memory comes in the form of Random Access Memory whose content is volatile (is lost when power is turned off), and Read Only Memory which is non-volatile.
  • Storage devices and storage media – Hard Disk Drives, Solid State Drives, CD & DVD
  • Display Devices – A computer monitor, LCD or LED display panel
  • Input/output Devices – This covers a large array of devices, including microphones and speakers, keyboards and mice, scanners. It can also include temperature sensors and fan speed controllers to regulate airflow within an enclosure.
  • Connections and Connection Devices – Network connections (both wired and wireless), USB, Firewire and other similar ports, network switches, routers, modems, access points.
  • Motherboards and Expansion Cards – These are mostly found on computer systems. The motherboard houses the processor and memory, I/O ports, and expansion slots. Expansion cards allow for extra or specialized functionality to be added to a computer system that is not available on the motherboard, such as graphics cards.
  • Power Supplies – No active circuit could operate without a power supply, from very simple single voltage supplies to multi-voltage supplies found on computer systems.
  • Cases and Enclosures – While not exactly electronic devices, cases and enclosures are considered as hardware. Today’s computer cases come with fans that help ventilate and keep the computer system cool, and some even have chassis intrusion detection to warn if someone opened the case.
  • Discreet components – Resistors, capacitors, diodes. Not quite as common as they once were, they are still an important and necessary part of any electronic circuit.

Conclusion

Hardware vs Software is not so much a comparison as it is a relationship. Certainly, software cannot exist without the hardware, and as we move into an ever increasing world of sophisticated devices, hardware cannot do without its software.

Think of hardware as the body, and software as the soul of a computer system.