Introduction to Computer programs | C Programming සිංහල Tutorial Episode 02 |SL Android#cprogramming



Introduction to Computer programs | C Programming සිංහල Tutorial Episode 02 |SL Android#cprogramming

Introduction to Computer programs | C Programming සිංහල Tutorial Episode 02 |SL Android#cprogramming

⭕✔ Introduction to C Programming : https://youtu.be/grpcSKuSCkI

⭕ Introduction to Computer Programs ⭕

Computer programs are sets of instructions that tell a computer what to do. They are created by software developers, who write code using programming languages such as Java, Python, and C++. These programs are used in a wide range of applications, from basic computer functions to complex software systems used in industries such as finance, healthcare, and transportation.

One of the most important aspects of computer programs is their ability to automate tasks. With the help of computer programs, repetitive tasks can be completed quickly and accurately, freeing up time for more creative and strategic work. For example, businesses can use programs to manage inventory, generate reports, and process orders. Governments can use programs to manage data on citizens, track finances, and coordinate emergency services.

In addition to automation, computer programs can also help to solve complex problems. For example, scientists can use programs to simulate experiments, analyze data, and make predictions about future outcomes. Architects and engineers can use programs to design and model complex structures, test their durability and make modifications as necessary.

However, writing computer programs can be a complex and challenging task. Developers need to have a strong understanding of programming languages, algorithms, and data structures. They also need to be able to debug programs and test them thoroughly to ensure that they function correctly.

⭕ What is Machine Language ⭕

Machine language, also known as machine code or assembly language, is a low-level programming language that is used by computers to execute instructions. It is a binary language consisting of only ones and zeros, which is the only language that computers can directly understand and execute. Machine language is the foundation upon which all other computer programming languages are built, as they are translated into machine code to be executed by the computer.

Machine language is composed of instructions, each of which is represented by a sequence of bits. These instructions are stored in the memory of the computer, and the processor reads them one by one, executing them in the order they are given. The instructions in machine language are very basic, typically involving simple arithmetic or logic operations, such as adding two numbers together or checking if two numbers are equal.

One of the primary advantages of using machine language is its speed and efficiency. Since the language is so low-level, it requires very little processing power to execute the instructions. This makes it an ideal choice for applications where speed is critical, such as in real-time systems or embedded devices.

⭕ Introduction to Compiler & Interpreter ⭕

Compilers and interpreters are two important tools used in programming languages. Both tools have their own unique features and advantages that make them useful in different situations. In this essay, we will explore the differences between compilers and interpreters and their respective benefits and drawbacks.

First, let us look at compilers. A compiler is a software program that converts human-readable source code written in a high-level language into machine code that can be executed by a computer. The compilation process takes place before the program is run, which means that the compiled code can be executed repeatedly without the need to recompile it. Compilers are commonly used for large-scale programs that need to be optimized for speed and efficiency. By converting source code into machine code, compilers can eliminate the need for interpreting each line of code every time the program is run.

However, the downside to compilers is that they are often more complex to use and require more time to compile the code. This is because compilers check the entire code for syntax and semantic errors, which can take a long time to complete, especially for large programs. Additionally, once compiled, any changes to the source code will require recompilation, which can be time-consuming.

On the other hand, interpreters are software programs that execute code written in a high-level language directly. This means that the code is interpreted and executed line-by-line at runtime. Interpreters do not need to convert the source code into machine code, which makes them more flexible and easier to use. In fact, interpreters are often used for scripting languages, such as JavaScript or Python.

The main advantage of interpreters is their ability to provide instant feedback to the programmer during the development phase. This is because errors can be detected and corrected on the spot, which makes debugging much easier. Additionally, interpreters are more portable than compilers since the code can be executed on any system that has the interpreter installed.