class: center, middle, inverse, title-slide .title[ # Foundations of Computer Languages ] .author[ ### Dr. Mutua Kilai ] .institute[ ### Kirinyaga University ] .date[ ### Jan-April 2024 ] --- # Introduction - A language that is acceptable to a computer system is called **computer language** or **programming language** - The process of creating sequence of instructions in such a language is called **programming** of **coding** - A program is a set of instructions written to perform a specific task by a computer. - A set of large program is called **software** - Before moving on to any programming language it is important to know about the various types of languages used by the computer. --- # Computer Languages - Languages are means of communication. - Computer languages are broadly classified into: * **Low level programming language**: These are the languages that provide little or no abstraction from a computers hardware architecture. * **High level programming language** These are designed to be as user-friendly as possible and they provide a high level of abstraction from the computers hardware architecture and are characterized by their increased simplicity and readbility. --- # Low Level Programming Language - The low level programming languages are classified as: * **Machine Language** This is a language understood directly by the computer. It is machine dependent and difficult to learn and even more difficult to write programs. * **Assembly Language** This is the language where machine codes comprising of 0 and 1 are substituted by symbolic codes in order to improve their understanding. It is the first step to improve programming structure. --- # Advantages of Low-Level Programming Language - **High Efficieny** as programs written in low-level languages are typically more efficient regarding execution speed and memory usage. - **Direct hardware interaction** programmers control entirely hardware components, registers and memory - **Small code size** which can be important in environments with limited storage. --- # Disadvantages of Low-Level Programming Language * **Hard Learning Curves** low-level languages require deep understanding of the hardware architecture * **Time consuming development** writing programs in low-level language often requires more time and effort * **Lack of flexibility** * **High chances of errors** since they provide direct access to memory and hardware a higher risk of programming errors leading to system crashes --- # High Level Programming Languages - They provide a high level of abstraction from the computers hardware architecture and are characterized by their increased simplicity and readability - High-level languages allow developers to write programs using a syntax close to natural language removing much of the hassle associated with low-level programming - They are particularly great for apps where development speed, maintainability and ease of use are more critical than low level control and performance optimizations - Examples include: * C * C++ * Java * Python * R