What a Software Developer Needs to Know About Computer Architecture?

Being a software developer is not an easy job. You may be very good with programming languages and you may be an excellent coder but merely being good at these things is not going to be enough. You will need to know about a lot of other aspects as well in order to become a good software developer. So what does the software developer need to know?

To become a good coder and a good developer you need to be well versed with various aspects of technology. You must be well versed with various programming languages, technology frameworks, IDEs, databases, algorithms and data structures and loads of other things. Of all these things one other thing that a computer software developer must be aware of is the basic computer architecture. Why is it necessary to know computer architecture? How does it help the developer? In this piece, we will try and find answers to all those questions and much more. Read through for more information.

What is the basic computer architecture?

A computer is a complex electronic machine and its comprised of several basic building blocks. It is a very interesting concept to know how a computer system makes use of all these building blocks or components and works and processes all the complex and intricate tasks with ease. The various components of a computer system that forms the architecture can be listed as below. It is important to understand the functions of each of these components to understand the architectures and the working of a computer. Let us find out their functions in a little detail.

1. Input Unit

This unit comprises the hardware and the devices that are used as input devices for feeding in a set of instructions to the computer to perform its functions. Input connects the external environment to the internal computer system. The input devices comprise of the keyboards, the magnetic tapes, the mouse, etc. The programs that you write are also a sort of input for the computer as instructions to perform a set of functions on the basis of the instructions received through the computer program.

The function of the input unit is to accept the instructions – convert the instructions into machine understandable language and transmit and supply the data into the computer system.

2. Storage Unit

This unit is the place where the data and the instructions are held. This area also stores intermediate results that may be used by the computer system for calculations. The storage unit comprises primary and secondary storage. The primary storage is the RAM that contains the executable memory. And the secondary storage is the permanent storage of the computer.

3. Arithmetic & Logic Unit

This is the unit of the computer that is responsible to perform all the calculations such as division, multiplication, addition, subtraction. When a calculation is required the control unit transfers the data from storage to the ALU. Once the operations are performed the results are sent back to the storage system.

4. Control Unit

The central processing unit and the ALU together form the Control Unit. This unit is responsible to control all other functions and of the computer. This unit is the decision-making unit of the computer. All the information entered is processed in the control unit or the central processing unit of the computer system

5. Output Unit

The output units comprise of the devices that display the results such as the monitor or the display of the computer system. This is the component where the results of all inputs, calculations, and computer operations are shown.

Now that covers the basic architecture of a computer system. But why is it important for the developer to know about computer architecture. Let us find out.

Why is it necessary for the software developer to know computer architecture?

If you are not aware of the basic architecture of the computer there are a lot of things you will be missing out on. Some things that help you in computer software development are as under:

1. Memory functions

Knowing about computer architecture helps you with a basic understanding of how caches and memories work. When you know about the computer architecture or the systems for which you will be developing the code, you would know the memory that would be needed to handle and execute your code. This would include things like memory management, virtual memory, memory hierarchy. You would know if the computer you would be running the code on will be able to compile and run it successfully. It is therefore important to understand the architecture of the computer

2. Knowledge on Compiling and Run Time

Whether you are writing code in assembly language or a high-level language you may have to have a basic knowledge about how the compiler works and the concept of runtime. This is necessary if you want to understand how your code would work in an optimized environment once it has already been compiled by the compiler.

3. When writing code for embedded systems

Knowing the architecture is especially useful when you are writing code for embedded systems where low-level considerations are very important. Memory addressing is particularly embedded in writing programs for embedded systems and proper knowledge of computer architecture helps us in understanding the same.

4. Understanding data structures and algorithms.

Without proper knowledge of computer architecture, you cannot understand the flow of data and the algorithms properly. When you know about the data flow and the structure you would know what code would work best in the given framework.

5. For a better understanding of the working of the code.

It is always going to be very useful to understand a little deeper into what’s happening with the code at the architectural level. Being a programmer you should understand the programming language you code, in terms of memory management and understand more what is happening under the hood.

With that, we have pointed out why a programmer or a software developer would understand computer architecture. Time to look at how a computer program or a code written in a programming language really works. Let us find out.

How does code get compiled and run on the computer?

To understand how a compiler works you will have to first understand the meaning of compiling. Compiling is basically a process of running a program from a code written in a high-level programming language. Compiling allows the computer to understand the computer code in its machine-readable form without the need for the original software that was used to write the code. So compiling is simply a process of converting a program or a code into a machine-understandable form.

So what does a compiler do? A compiler in your computer does just that. As soon as you write code in a high-level language and run it. The compiler compiles the code into a machine-readable form and then CPU instructions are passed to run the code in the program. It sounds and looks very simple but there are complex conversion and computation processes that are involved in the entire thing.

Hence, being a developer it is important to know and understand how your code is compiled and run eventually and for that knowledge, you must know the basics of computer architecture.

That being said we have covered how and why as a software developer you must know about the architecture and the functioning of the computer. But do we really know what happens when the computer is switched on? Let us see how it works.

What happens when a computer is switched on?

Starting your computer is also known as booting. So what happens when your computer boots? When you start or boot your computer, your computer processor starts looking for instructions in the ROM or BIOS of the system and executes them. The code for these executable instructions or programs is written in Assembly language and this is where a program or a code is first run.

Once a computer is switched on the BIOS chip requests for a program known as the boot loader. This is when the boot loader is pulled by the memory and is started. And then it triggers and runs a special program called the operating system.

Once the computer is turned on – a POST is run which is Power On Self Test to check if all the devices of the computer system are fine. If encountered with issues it gives an error. If all is good, there is something known as a bootstrap loader that then loads the operating system into the computer’s memory. This is the stage when the computer is finally able to load, access and run the Operating System.

Conclusion

It is fair to conclude that computer architecture is extremely important if you wish to write successful codes and become the best coder. Not knowing about computer architecture is like not knowing about the ground that you wish to play on and not knowing about the playing conditions. You must know about the ground for a good game.

In a similar manner, you must know about computer architecture to write programs on it and for it. Without proper knowledge of it; you may still be able to write programs but writing them with computer architecture in mind is the best way to do it.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s