Hardware and software are essential parts of a computer system. Hardware components are the physical parts of a computer, like the central processing unit (CPU), mouse, storage, and more. Software components are the set of instructions that we store and run on our hardware. Together, they form a computer.
If you are new to computer science, it’s important to understand hardware and software components. This is the foundation of any computer science journey.
Today, we will be diving into hardware and software and teach you how they relate to a computer’s memory, CPU, and more.
Today, we will learn:
This course is the ideal place to start you computer science journey. You’ll learn about the structure of computers, how data is represented, and more.
Software describes a collection of programs and procedures that perform tasks on a computer. Software is an ordered sequence of instructions that change the state of a computer’s hardware.There are three general types of software:
When you think of computer science, software is probably what comes to mind. Software is what developers actually code. Those programs are then installed onto a hard drive.
Hardware is anything physically connected to a computer. For example, your display monitor, printer, mouse, and hard drive are all hardware components.
Hardware and software interact with each other. The software “tells” the hardware which tasks to perform, and hardware makes it possible to actually perform them.
Note: Most computers require at least a hard drive, display, keyboard, memory, motherboard, processor, power supply, and video card to function.
|Physical devices that store and run software||Collection of coded instructions that all us to interact with a computer|
|Works as the delivery system||Performs specific tasks|
|Monitor, printer, scanners , label makers, routers and hard drive||Adobe, Google Chrome, Microsoft Excel, Spotify|
|Hardware begins functioning when software is loaded.||Software must be installed on hardware|
|Hardware will wear down over time||Software will not wear down, but it is vulnerable to bugs / becoming outdated|
Enjoying the article? Scroll down to sign up for our free, bi-monthly newsletter.
Now that we understand the difference between hardware and software, let’s learn about the hardware components of a computer system. Remember: hardware includes the physical parts of a computer that the software instructs.
The Central Processing Unit (CPU) is a physical object that processes information on a computer. It takes data from the main memory, processes it, and returns the modified data into the main memory. It is comprised of two sub-units:
This computer architecture design, created by John von Neumann in 1945, is still used in most computers produced today. The Von Neumann architecture is based on the concept of a stored-program computer. Instruction and program data are stored in the same memory.
This architecture includes the following components:
The input unit takes inputs from the real world or an input device and converts that data into streams of bytes. Common input devices include a keyboard, mouse, microphone, camera, and USB.
The output unit, on the other hand, takes the processed data from the storage of CPU and represents it in a way a human can understand. Common output devices include a monitor screens, printers, and headphones.
After the data is retrieved and converted, it must be stored in the memory. The storage unit or memory is the physical memory space. It is divided into byte-sized storage locations.
A storage contains millions of bytes of memory to store anything we want on our computer. To store a bit of data in computer memory, we use a circuit, called a latch, that stores the previous input unless it’s reset. We can create a circuit using a:
There are components to a computer’s hardware memory. Main memory or random access memory (RAM) is the physical memory space inside a computer. It stores data and instructions that can directly be accessed by the CPU. Computers usually have a limited amount of main memory to store all your data.
That is when secondary storage comes into use. Secondary storage augments the main memory and holds data and programs that are not needed immediately.
Secondary storage devices include hard drives, compact discs (CD), USB flash drives, etc. Secondary storage devices cannot be directly accessed by the CPU.
Learn the foundations of computer science without scrubbing through videos or documentation. Educative’s text-based courses are easy to skim and feature live coding environments,making learning quick and efficient.
Now let’s discuss the different software components that we need to have a functioning computer. Remember: software comprises the set of programs, procedures, and routines associated needed to operate a computer.
A computer can only process binary: a stream of ones and zeros. Binary is the computer’s language. Instructions for the computer are also stored as ones and zeros that the computer must decode and execute.
Assembly language is a human-readable instruction mode that translates binary opcode into assembly instruction. A CPU cannot process or execute assembly instructions, so an encoder is required that can convert assembly language to machine language.
An assembler translates an assembly language program into machine language. The code snippet below is an assembly program that prints “Hello, world!” on the screen for the X86 processor.
section .data text db 'Hello, world!' section .text global _start _start: mov rax, 1 mov rdi, 1 mov rsi, text mov rdx, 14 syscall mov rax, 60 mov rdi, 0 syscall
Assembly language is referred to as a low-level language because it’s a lot like machine language. To overcome these shortcomings, high-level languages were created.
These are called programming languages, and they allow us to create powerful, complex, human-readable programs without large numbers of low-level instructions. Some of the most famous high-level languages are:
print "Hello World"
Software design is the process of transforming particular requirements into a suitable program using code and a high-level language. We need to properly design a program and system that meets our goals.
Developers use software design to think through all the parts of their code and system. Software design includes three levels:
Congrats! You should now have a solid idea of hardware, software, and the components of a computer. These are essential to your foundation as a computer scientist. For your next step on this journey, you should learn about:
To get started with these foundations, check out Educative’s course Information Representation in Computer Systems. This course is the perfect first step into the world of computer science. You’ll learn how a computer systems performs complex tasks, from storage to processing and beyond.
Join a community of 500,000 monthly readers. A free, bi-monthly email with a roundup of Educative's top articles and coding tips.