0% found this document useful (0 votes)
19 views30 pages

Introduction To Computing (Using Python) : Evolution of Programming Languages, Software Requirements For Programming

Uploaded by

Kritansh Uppal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views30 pages

Introduction To Computing (Using Python) : Evolution of Programming Languages, Software Requirements For Programming

Uploaded by

Kritansh Uppal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

INTRODUCTION TO

COMPUTING (USING
PYTHON)
EVOLUTION OF PROGRAMMING LANGUAGES,
SOFTWARE REQUIREMENTS FOR PROGRAMMING
EVOLUTION OF
LANGUAGES
LOW-LEVEL LANGUAGES

• Low-level languages are languages that sit close to the computer's instruction
set. An instruction set is the set of instructions that the processor understands.
Two types of low-level language are:
• Machine code/language
• Assembly language
MACHINE LANGUAGE

• Machine code is the set of instructions that a CPU understands directly and can act
upon. A program written in machine code would consist of only 0s and 1s - binary.
This is very difficult to write and debug. Even a very simple program could have
thousands of 0s and 1s in it.
• All programs and programming languages eventually generate or run programs in
machine language.
• Machine language is made up of instructions and data that are all binary numbers.
Machine language is normally displayed in hexadecimal form so that it is a little bit
easier to read.
ASSEMBLY LANGUAGE

• Assembly language sits between machine code and high-level language in terms of
ease of use. While high-level languages use statements to form instructions, assembly
language uses mnemonics - short abbreviations. Each mnemonic directly corresponds
with a machine code instruction. Here are some examples of mnemonics:
• In assembly language, programmers write programs as a series of mnemonics. Mnemonics are
much easier to understand and debug than machine code, giving programmers a simpler way
of directly controlling a computer.
• Writing in mnemonics is easy for programmers because they are usually brief representations
of the actual commands. They are quicker to write than binary, and it is easier to spot
mistakes.
• Little Man Computer (LMC) is a simulation of a very basic processor using Von Neumann
architecture. It uses an example of simple assembly language that contains a limited set of
mnemonic instructions which can be used to program simple assembly programs. LMC is
freely available on the internet for students to use.
https://peterhigginson.co.uk/LMC/
HIGH LEVEL LANGUAGE

• High-level languages allow programmers to write instructions in a language that is easier


to understand than low-level languages.

• Translators are needed to translate programs written in high-level languages into the
machine code that a computer understands.
HIGH LEVEL LANGUAGE

• The instructions that tell a computer what to do are written in machine code. Machine
code is a series of numbers written in binary. Each number represents a different
instruction.
• Programmers find machine code difficult to learn, program in and debug. As a result, the
majority of programmers write programs in high-level programming languages.
These languages are close to natural language - the spoken and written language of humans.
• For example, Python uses 'print', ‘if’, 'input' and 'while' statements - all words from the
English language - to form instructions. In fact, instructions often look like abbreviated English
sentences.
• Programmers write in high-level languages because they are easier to understand and are
less complex than machine code. They allow the programmer to focus on what needs to
be done, rather than on how the computer actually works.
• For example, in many high-level languages, to place a message on the screen, a
programmer would use the statement 'print'. The programmer might not know how the
computer actually generates the message. They just need to know how to use the 'print'
statement.
Commonly used high-level languages
Many types of high-level language exist and are in common use today, including:
• Python
• Java
• C++
• C#
• Visual Basic
• JavaScript
https://dev.to/codicacom/top-8-most-in-demand-programming-
languages-for-2021-3c28
Current trends in programming languages show Python’s relevance for machine learning, data
science, and the IoT.

Advantages
• Simple and plain syntax;
• Wide range of libraries;
• Open-source nature.
Disadvantages
• Moderate execution speed;
• Extensive memory consumption;
• Not suitable for mobile development.
What is Python used for? Python is one of the top programming languages for
The latest programming language trends claim web development. The countless number of
Python to be especially effective for such domains: websites and different platforms built with its help
• Web development; only prove this fact. Let’s mention some of them:
• Desktop apps development; • Instagram;
• Machine learning; • Google;
• Neuroscience; • Spotify;
• Medicine; • Netflix;
• Pharmacology; • Uber;
• Astronomy. • Dropbox;
• Pinterest.
SOURCE CODE

• Source code is the term given to a set of instructions that are written in human
readable programming language. Source code must be translated into machine code
before a computer can understand and execute it.
TRANSLATORS

• Any program written in a high-level language is known as source code.


However, computers cannot understand source code. Before it can be run, source code
must first be translated into a form which a computer understands.
• A translator is a program that converts source code into machine code. Generally,
there are three types of translator:
• compilers
• interpreters
• assemblers
COMPILERS

• A compiler takes the source code as a whole and translates it into machine code all in one go. Once converted, the
object code can be run unassisted at any time. This process is called compilation.
• Compilers have several advantages:
• Compiled programs run quickly, since they have already been translated.
• A compiled program can be supplied as an executable file. An executable file is a file that is ready to run. Since an
executable file cannot be easily modified, programmers prefer to supply executables rather than source code.
• Compilers optimise code. Optimised code can run quicker and take up less memory space.
• Compilers also have disadvantages:
• The source code must be re-compiled every time the programmer changes the program.
• Source code compiled on one platform will not run on another - the machine code is specific to the processor's
architecture.
INTERPRETERS

• An interpreter translates source code into machine code one instruction at a time. It is similar to a human translator translating what a person
says into another language, sentence by sentence, as they speak. The resulting machine code is then executed immediately. The process is
called interpretation.
• Interpreters have several advantages:
• Instructions are executed as soon as they are translated.
• Errors can be quickly spotted - once an error is found, the program stops running and the user is notified at which part of the program the
interpretation has failed. This makes interpreters extremely useful when developing programs.
• Interpreters also have several disadvantages:
• Interpreted programs run slowly as the processor has to wait for each instruction to be translated before it can be executed.
• Additionally, the program has to be translated every time it is run.
• Interpreters do not produce an executable file that can be distributed. As a result, the source code program has to be supplied, and this could be
modified without permission.
• Interpreters do not optimise code - the translated code is executed as it is.
ASSEMBLERS

• Assemblers are a third type of


translator. The purpose of an assembler
is to translate assembly
language into machine code.
• Whereas compilers and interpreters
generate many machine code
instructions for each high-level
instruction, assemblers create one
machine code instruction for each
assembly instruction.
LINKER AND LOADER

• Linker or link editor is a computer utility program that takes one or


more object files generated by a compiler and combines them into a
single executable file, library file, or another 'object' file.

• Loader is the part of an operating system that is responsible for loading


programs and libraries. It is one of the essential stages in the process of
starting a program, as it places programs into memory and
prepares them for execution.
SOFTWARE REQUIREMENTS

Operating System is an interface between the


user of the computer and the hardware
OPERATING SYSTEM

• An operating system is the most important software that runs on a


computer. It manages the computer's memory and processes, as well as all of
its software and hardware.
• It also allows you to communicate with the computer without knowing how to speak
the computer's language.
• Most of the time, there are several different computer programs running at the same
time, and they all need to access your computer's central processing unit
(CPU), memory, and storage. The operating system coordinates all of this to make
sure each program gets what it needs.
TYPES OF OPERATING SYSTEMS

• Operating systems usually come pre-loaded on any computer you buy. Most people
use the operating system that comes with their computer, but it's possible to upgrade or
even change operating systems. The three most common operating systems for personal
computers are Microsoft Windows, macOS, and Linux.
• Modern operating systems use a graphical user interface,
or GUI (pronounced gooey). A GUI lets you use your mouse to
click icons, buttons, and menus, and everything is clearly displayed on the screen
using a combination of graphics and text.
FOR LAB

• Download Python IDLE- https://www.python.org/downloads/


• Read About GitHub-https://blog.devmountain.com/what-is-github-and-how-do-you-use-
it/
FOR NEXT LECTURE

• Flowcharts and Algorithms

• How to draw a flowchart of a simple program like addition of two numbers? Just go
through it once using internet.
THANK YOU

You might also like