0% found this document useful (0 votes)
53 views4 pages

Kathmandu University Department of Computer Science and Engineering Dhulikhel, Kavre

This document discusses programming languages used for embedded systems. It analyzes assembly languages and high-level languages in terms of computation time, memory usage, and other factors. While assembly languages provide direct hardware access and optimal efficiency, they are not universal and require specialized knowledge. High-level languages like C provide abstraction but require compilers. C is often preferred for embedded systems as it balances efficiency and usability.

Uploaded by

Acharya Suyog
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
53 views4 pages

Kathmandu University Department of Computer Science and Engineering Dhulikhel, Kavre

This document discusses programming languages used for embedded systems. It analyzes assembly languages and high-level languages in terms of computation time, memory usage, and other factors. While assembly languages provide direct hardware access and optimal efficiency, they are not universal and require specialized knowledge. High-level languages like C provide abstraction but require compilers. C is often preferred for embedded systems as it balances efficiency and usability.

Uploaded by

Acharya Suyog
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 4

Kathmandu University

Department of Computer Science and Engineering


Dhulikhel, Kavre

Assignment: 04
COMP 306

Submitted by:
Merina Khimbaja
Group: CE
Roll Number: 24
Programming Language used in embedded system:
There are many programming languages. Depending on the functionality of the program and
total hardware and software configuration, a programmer chooses the programming language.
Today high level languages are widely favored over assembly languages. Machine level
languages are only used by those who actually build the compiler.
This paper primarily discusses two groups of languages i.e. assembly language and high level
languages and dissect it under the light of computation time, memory, etc to find their feasibility
in embedded systems.
Let us look into a little background of assembly languages and high level languages. Machine
level languages are all binary codes. Every command in them is written in 0s and 1s. Due to its
inconvenience assembly languages were developed which contained human readable codes such
as MUL, SUB, ADD, MOV, etc. What was the issue with them that high level languages were
created then? As time went the issues such as optimization of space, faster execution came into
question which gave birth to issues such as optimal program efficiency, development of best
possible algorithms and easy understanding above all.
What coding platform is better for embedded system then? Assembly language are considered
obsolete these days. But assembly languages have direct access to the core of the computers. It
provides for space optimization and time optimization as well. The handwritten programs are
faster and uses less memory than the programs with same features but written in High level
languages[ CITATION Joh19 \l 1033 ]. In high level language the programmer can read the code
output given my the compiler analyze it and optimize the code but the compiler cannot do the
same for the programmers’ code. In assembly language this distinction or competition between
the compiler and the programmer is eliminated. This is primarily because the programmers’
target is to write shorter code than faster code. In high level languages the compiler increases the
efficiency with which the programmer can access the computer resources. As a paradox the
compiler ends up using more resources. But in machine level such problem cannot be seen.
Embedded systems are applied in different arenas which ranges from simple household utensils
to Internet of things to real time applications. The speed and memory optimization in embedded
system is crucial as well. The real time embedded system like automobiles, ship, aircrafts are
case sensitive. Small errors and transmission delay in such systems may cause huge accidents.
We have looked into the pros and cons of high level languages and assembly languages. We
came to the conclusion that assembly languages are tab bit more efficient than High level
languages since it does not need a third part for the code to execute. Assembly language can be
executed faster in embedded systems and with less resource consumptions as well. It is efficient
in time sensitive systems where certain seconds of delay may result in huge accidents.
On the other hand the CPU speed and cheaper memory may make high level languages as the
more favorable options. High level programming languages are very easily understandable. It
can be optimized easily. There are always options of more efficient algorithms. The compiler
cost and the program cost can be higher than the cost of assembly languages but memory is
cheap. Better CPU options are also available with significant hardware advancements. In
addition to all these different microcontrollers have different mnemonics to their basic operations
which cancels out the universality of assembly languages, which puts the programmer into
dilemma.
There arises a question though, if high level language then which? The high level language
should be close to computer architecture. The programmer should also be able to easily decipher
the language. Through further research it is found that C is the most preferred for programming
embedded systems. C provides a level of abstraction over the underlying instructions. C
language is faster than other programming languages. It also provides the programmer to build a
custom compilers. In addition to that it provides direct pointer feature which helps low level
interaction and manipulation. On top of that C are used as default language in embedded
systems. In order for other programming languages to be implemented in embedded systems
separate compilers have to be used as add ons. Hence most of the embedded systems uses C.
Other High level languages such as C++, python, Java and Rust are used as well.
Assembly languages have the best execution time and memory optimization. It works on directly
with the computer architecture. But assembly language may not be universal and differ from one
processor to other. High level languages may have the necessity of a compiler which may take
space and slow down the overall execution. The problem is solved by decreasing price of
memory and increasing processor power. C is the most preferred language for embedded system
since it has direct pointer system enabling some degree of low level interactions.
Works Cited
1. Found, J. (2019, June 17). DEV. Retrieved September 11, 2020, from Why assmebly
programs are faster than HLL programs, despite the compilers so advanced?:
https://dev.to/johnfound/why-assembly-programs-are-faster-than-hll-programs-despite-
that-the-compilers-are-so-advanced-51ha#:~:text=The%20hand%20written%20assembly
%20language,high%20level%20languages%20(HLL).&text=The%20hand%20written
%20assembly%20languge
2. https://www.fossmint.com/programming-languages-for-embedded-systems/
3. https://barrgroup.com/embedded-systems/how-to/assembly-vs-c-comparison
4. https://www.electronicdesign.com/technologies/embedded-
revolution/article/21806180/is-c-the-best-embedded-programming-language
5. Embedded system: Assembly language
https://www.tutorialspoint.com/embedded_systems/es_assembly_language.htm
6. Tech Terms(2014, September)Assembly language, Retrieved September 11, 2020,
https://techterms.com/definition/assembly_language#:~:text=An%20assembly
%20language%20is%20a,machine%20code%20using%20an%20assembler.

You might also like