SlideShare a Scribd company logo
Computer Language
Chapter 4
Contents
• Machine language programming
• Programming process
• Programming languages
• Levels of programming languages
• Program translator
Learning Objectives
• At the end of this chapter, students should
be able to:
– Identify and utilize the programming
processes.
– Identify the different levels of programming
languages.
– Identify and differentiate the program
translators.
Machine Language Programming
Machine Language Programming
• What is programming language?
– A language for instructing computer
• What is source code?
– A complete program in such language
• What is machine language?
– The most primitive type of programming
language that computer understands
(instruction can be executed by the CPU)
Machine Language Programming
• Earliest form of programming
• Most tedious and time consuming since it
requires programmers to:
– determine the exact set of primitive machine
actions (instructions) necessary to perform
complex task
– write down each instruction in an
understandable form to the computer
Machine Language Programming
• Computer’s instruction set are defined by the set
of data manipulation and movement functions of
which the CPU is capable to perform.
• The processing functions of a typical CPU can
be classified into 3 categories:
– Computation – perform mathematical calculation
using two numbers as input and store the result
– Comparison – compare the values of two stored
numbers and determine if they are equivalent
– Data movement – move an individual item of data
from one storage location to another storage location
Machine Language Programming
High Level Language Program
Machine Language Code
Micro Steps (Micro Code)
Memory Bus System ALU etc.
HW
Decoder
Control Signal
Language Processing
Translation from SW to HW
Programming Process
Programming Process
• What is programming Language?
– A set of rules that provide a way of telling a
computer what operations to perform.
• What is program?
– Set of step-by-step instructions that direct the
computer to do the task users want it to do
and produce the results.
Programming Process
• Programming process includes:
– define the problems
– plan the solution
• through developing an algorithm that includes the
flowchart and pseudo-code
– coding the program
– test the program
– document the program
Programming Process
• Defining a problem:
– Programmer meets users of the client
organization or system analyst will analyze
the problems.
– Written agreement is produced.
– Items of input, process and output are being
identified.
Programming Process
• Planning the solution
– Most common way of planning is by having
flow charts or write pseudo-code
– Flowchart is a pictorial diagram of an ordered
step by step solution to a problem
Programming Process
Process
Decision
Connector
Start or Stop Program
Input or Output
Direction of Flow
ANSI Standard Flow Chart Symbols
Programming Process
Example of simple flow
chart – of what to do if a
lamp doesn’t work
Programming Process
• Planning the solution
– Pseudo-code is an English-like language that
states the solution with more precision in
English but less precision than is required
when using a formal language.
– Example:
if credit card number is valid
execute transaction based on number and order
else
show a generic failure message
end if
Programming Process
• Coding the programs
– The programmer translate the logic from the flow
chart or pseudo-code to a programming language or
source code
– The programmer has to know the syntax and the
format of writing the programming
Programming Process
• Testing the program
– Involve the desk-checking, the translating, and the
debugging phases.
• Desk-checking involves a programmer sitting down to
proof-read a program.
• Translating involves a translator – using compiler or
interpreter (a program that translates the instruction into a
form the computer can understand).
• Debugging involves detecting, locating, and correcting bug
or mistakes or errors by running the program.
Programming Process
• Documenting the program
– Is necessary and is an ongoing process.
– Documentation is a written detail descriptions of the
programming cycle and specific facts about the
program.
– Typical program documentation materials include:
• The origin and the nature of the problem.
• A brief narrative description of the program.
• Logic tools such as flowcharts, pseudo-codes and/or flow
charts.
• Data record descriptions
• Program listings and testing results.
Programming Languages
Programming Languages
• Programming languages are said to be lower
(closer to the computer) or higher (closer to
people/users).
• There are five generations of programming
languages to be enlisted from the lowest to the
highest levels, which are:
– Machine language.
– Assembly language.
– High-level language (HLL).
– Very high-level language (VHLL).
– Natural language.
Programming Languages
Higher
Lower
Machine
Users
Programming Languages
• Machine language
– The lowest level of language
– Represents data as 1s and 0s (binary digits
corresponding to the “on” and “off” electrical
states (switching actions) in a computer.
Programming Languages
• Assembly language
– Uses mnemonic codes
– Mnemonic codes are abbreviations that are easy to
remember and to replace the machine language
numbers
– Even though not in English words, they are still
convenient and are preferable than numbers alone.
– Uses an assembler program to turn its program into
a machine language.
– Has disadvantages such as vary by machine,
extremely detail, making programming becomes
repetitive, tedious and prone to making errors.
Programming Languages
• High-level Language (HLL)
– More English-like – thus making it more
convenient
– FORTRAN (FORmula TRANslator) is the 1st
HLL
– Other examples of HLL are COBOL, BASIC,
ALGOL, APL, FORTH, LISP, LOGO, Modula-
2, PILOT, PLI, PROLOG and RPG.
Programming Languages
• Very high-level language (VHLL)
– Known as a 4th generation language (4GL)
– Usually nonprocedural (user need to write only
“what” is to be done but not “how”.
– A procedural language tells the computer how a task
is done (a very specific step-by-step process)
– Advantages - increase productivity, require minimal
training and allow users to be unconcern about the
HW or program structure.
Programming Languages
• Natural language
– Is named because of its resemblance to spoken
English.
– Referred to as knowledge-based language due to
its usage in interacting with a base of knowledge on
some subject, resulting in a knowledge-based
system (KBS), such as an expert system.
– Natural language excel at easy data access
– This has evolved into a language namely structured
query language (SQL).
Programming Languages
• Object-oriented programming (OOP)
– A group of languages : called object-oriented
language (OOL) group.
– OOL is based on a more active, visual programming
environment.
– Structured languages treat data and tasks
(instructions) separately.
– OOL views data and tasks together for each object
(entity that may be grouped in classes and contains
its own code).
– Current examples OOP languages are Object Logo,
JAVA, C++, Turbo Pascal, and SmallTalk.
Programming Languages
• Hybrid object-based programming
languages
– Are visual in a manner similar to OOP language but
lack certain features.
– The 1st hybrid language : HyperCard (Macintosh)
– Some object-based hybrids are classified as visual
programming languages because they are
distinguished by the ability to build programs
connecting links between various objects.
– Current examples of visual programming languages
are Object Vision and Visual Basic (VB).
Program Translator
Program Translator
• What is program translator?
– A program that transform/translate source
code into machine readable code.
• There are 3 types of program translator:
– Assembler
– Compiler
– Interpreter
Program Translator
• Assembler
– A program that translates the instruction
(assembly language code) into a form that
computer can understand (machine language
code).
MOV AX, 0005
ADD AX, 0010
ADD AX, 002
MOV [0120], AX
INT 20
Assembler
Output File
1011100000000101000000
0000000101000100000000
0000000001010010000000
0000001010001100100000
Symbolic
program
Binary
program
Program Translator
ADD AX, 0010 05 10,00
Opcode in
Assembly
Language
Operand1
Operand2
Opcode in
Machine
Language
Operand1
Operand2
Notes that:
ADD translated into
05 AX translated into
000010 translated into
1016
Assembly Language
Machine Language (Binary) Machine Language
(Hexadecimal)
MOV AX,0005 10111000 00000101 00000000 B8 05 00
ADD AX,0010 00000101 00010000 00000000 05 10 00
ADD AX,0020 00000101 00100000 00000000 05 20 00
MOV [0120],AX 10100011 00100000 00000001 A3 20 01
INT 20 11001101 00100000 CD 20
Program Translator
• Compiler
– A compiler translates a program in a
programming language
– The original program is called the source
code
– The result of translating source code is called
the object code
Program Translator
• Compiler
– How a compiler compile a program?
• Source code is read from a file by the compiler and
object code is written to a newly created file
• The source code file is named to indicate the
programming language, such as program.java
where “.java” indicates a JAVA program
• Object code filenames generally have an “.o” or
“.obj” appended to original root filename, such as
program.o or program.obj.
Program Translator
• Compiler
– Source code statements are read into the
compiler one at a time
– 3 classes of source code statements are:
• Data declaration
• Data operation
• Control structure
Program Translator
• Compiler:
– Data declaration:
• Set memory locations to store the declared data.
• The amount of memory allocated depends on the
type of the data, such as integer, real, character
etc.
• The compiler builds an internal table, known as
symbol table to keep track of the data names,
types and assigned memory addresses.
Program Translator
• Compiler
– Data operation
• As data operations are encountered in source
code, they are translated into the sequence of
machine instructions necessary to implement
those operations.
• These instruction sequences include primitive data
manipulation instructions as well as any necessary
data movement instructions.
Program Translator
• Compiler
– Control structure
• Example of control structure includes
unconditional branches (such as GOTO
statement or subroutine call), conditional
branches (such as IF-THEN-ELSE statement),
and loops (such as WHILE-DO, FOR and
REPEAT-UNTIL statement).
Program Translator
• Compiler
– Support Libraries
• The object code consists entirely of executable
machine instructions and data such as executable
code.
• Certain types of language statements, including
data declarations, control structures are converted
into executable codes (external subroutines).
• These external subroutines can be found in either
one of these places:
– Compiler library
– Library call
Program Translator
• Compiler
– Linking
• Note that, the preceding library call is not a CPU instruction.
• Library call is a reference to a set of executable code that
has been previously compiled and stored in a library for later
use.
• Therefore, it must be replaced by the corresponding library
code before application can be executed.
• A program called a linker or link editor performs this
replacement.
• The process of replacement is called linking, link editing or
binding.
Program Translator
• Interpreter
– While compilation process is in progress, link editing
and program execution cannot occur until the entire
source code file has been compiled
– In contrast, interpretation interleaves source code
translation and execution
– An interpreter reads a single statement of the source
code, translates into machine instruction, and
immediately executed
– One program (the interpreter) translates and executes
another (the source code) one statement at a time
End of Chapter 4
Ad

More Related Content

What's hot (20)

Programming languages
Programming languagesProgramming languages
Programming languages
Simon Mui
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
educationfront
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languages
NaqashAhmad14
 
Instruction code
Instruction codeInstruction code
Instruction code
Dr. Abhineet Anand
 
Programming languages
Programming languagesProgramming languages
Programming languages
vito_carleone
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machine
Karan Thakkar
 
Interrupts
InterruptsInterrupts
Interrupts
Urwa Shanza
 
Two pass Assembler
Two pass AssemblerTwo pass Assembler
Two pass Assembler
Satyamevjayte Haxor
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
Zahid Rajeel
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine Code
Project Student
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 
File allocation methods (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
Dr. Jasmine Beulah Gnanadurai
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
desta_gebre
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
SanSan149
 
Presentation on computer language
Presentation on computer languagePresentation on computer language
Presentation on computer language
Swarnima Tiwari
 
computer languages
computer languagescomputer languages
computer languages
Rajendran
 
Introduction to Compiler
Introduction to CompilerIntroduction to Compiler
Introduction to Compiler
Radhakrishnan Chinnusamy
 
Evolutionary models
Evolutionary modelsEvolutionary models
Evolutionary models
Pihu Goel
 
Secondary storage management in os
Secondary storage management in osSecondary storage management in os
Secondary storage management in os
Sumant Diwakar
 
5. spooling and buffering
5. spooling and buffering 5. spooling and buffering
5. spooling and buffering
myrajendra
 
Programming languages
Programming languagesProgramming languages
Programming languages
Simon Mui
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
educationfront
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languages
NaqashAhmad14
 
Programming languages
Programming languagesProgramming languages
Programming languages
vito_carleone
 
Working principle of Turing machine
Working principle of Turing machineWorking principle of Turing machine
Working principle of Turing machine
Karan Thakkar
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
Zahid Rajeel
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine Code
Project Student
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
desta_gebre
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
SanSan149
 
Presentation on computer language
Presentation on computer languagePresentation on computer language
Presentation on computer language
Swarnima Tiwari
 
computer languages
computer languagescomputer languages
computer languages
Rajendran
 
Evolutionary models
Evolutionary modelsEvolutionary models
Evolutionary models
Pihu Goel
 
Secondary storage management in os
Secondary storage management in osSecondary storage management in os
Secondary storage management in os
Sumant Diwakar
 
5. spooling and buffering
5. spooling and buffering 5. spooling and buffering
5. spooling and buffering
myrajendra
 

Viewers also liked (20)

History of computer language
History of computer languageHistory of computer language
History of computer language
Claire Punkcor
 
Computer Languages.
Computer Languages.Computer Languages.
Computer Languages.
Aditya Sheoran
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
Varun Garg
 
COMPUTER INTRODUCTION
COMPUTER INTRODUCTIONCOMPUTER INTRODUCTION
COMPUTER INTRODUCTION
Amit Sharma
 
Computer languages 11
Computer languages 11Computer languages 11
Computer languages 11
Muhammad Ramzan
 
Computer Languages....ppt
Computer Languages....pptComputer Languages....ppt
Computer Languages....ppt
hashgeneration
 
Computer languages
Computer languagesComputer languages
Computer languages
Buxoo Abdullah
 
Design Pattern Automation
Design Pattern AutomationDesign Pattern Automation
Design Pattern Automation
PostSharp Technologies
 
Bab satu
Bab satuBab satu
Bab satu
Aida Ramlan II
 
Functional Leap of Faith (Keynote at JDay Lviv 2014)
Functional Leap of Faith (Keynote at JDay Lviv 2014)Functional Leap of Faith (Keynote at JDay Lviv 2014)
Functional Leap of Faith (Keynote at JDay Lviv 2014)
Tomer Gabel
 
Computer Languages
Computer Languages Computer Languages
Computer Languages
Anjana Mohanan
 
Chapter 02 Computer Languages (re-upload)
Chapter 02 Computer Languages (re-upload)Chapter 02 Computer Languages (re-upload)
Chapter 02 Computer Languages (re-upload)
bluejayjunior
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languages
actanimation
 
Introduction to Computer Softwares
Introduction to Computer SoftwaresIntroduction to Computer Softwares
Introduction to Computer Softwares
Naresh Dubey
 
Computer languages
Computer languagesComputer languages
Computer languages
BESOR ACADEMY
 
Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computer
Keval Goyani
 
Lec 01 basic concepts
Lec 01 basic conceptsLec 01 basic concepts
Lec 01 basic concepts
Abdul Khan
 
Software Basics
Software BasicsSoftware Basics
Software Basics
Miguel Rebollo
 
Computer generation and language translator
Computer generation and language translatorComputer generation and language translator
Computer generation and language translator
Shruti Pendharkar
 
C language basics
C language basicsC language basics
C language basics
Nikshithas R
 
History of computer language
History of computer languageHistory of computer language
History of computer language
Claire Punkcor
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
Varun Garg
 
COMPUTER INTRODUCTION
COMPUTER INTRODUCTIONCOMPUTER INTRODUCTION
COMPUTER INTRODUCTION
Amit Sharma
 
Computer Languages....ppt
Computer Languages....pptComputer Languages....ppt
Computer Languages....ppt
hashgeneration
 
Functional Leap of Faith (Keynote at JDay Lviv 2014)
Functional Leap of Faith (Keynote at JDay Lviv 2014)Functional Leap of Faith (Keynote at JDay Lviv 2014)
Functional Leap of Faith (Keynote at JDay Lviv 2014)
Tomer Gabel
 
Chapter 02 Computer Languages (re-upload)
Chapter 02 Computer Languages (re-upload)Chapter 02 Computer Languages (re-upload)
Chapter 02 Computer Languages (re-upload)
bluejayjunior
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languages
actanimation
 
Introduction to Computer Softwares
Introduction to Computer SoftwaresIntroduction to Computer Softwares
Introduction to Computer Softwares
Naresh Dubey
 
Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computer
Keval Goyani
 
Lec 01 basic concepts
Lec 01 basic conceptsLec 01 basic concepts
Lec 01 basic concepts
Abdul Khan
 
Computer generation and language translator
Computer generation and language translatorComputer generation and language translator
Computer generation and language translator
Shruti Pendharkar
 
Ad

Similar to Chapter 4 computer language (20)

introduction computer programming languages
introduction computer programming languages introduction computer programming languages
introduction computer programming languages
BakhatAli3
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
Tekle12
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 
Lahor main It revoloution anfd its uses.
Lahor main It revoloution anfd its uses.Lahor main It revoloution anfd its uses.
Lahor main It revoloution anfd its uses.
ssuser6aa405
 
basics of it in pakistan and all over the
basics of it in pakistan and all over thebasics of it in pakistan and all over the
basics of it in pakistan and all over the
ssuser6aa405
 
Session01 basics programming
Session01 basics programmingSession01 basics programming
Session01 basics programming
HarithaRanasinghe
 
presentation of Programing fundamental.
presentation of  Programing fundamental.presentation of  Programing fundamental.
presentation of Programing fundamental.
meerikhlaque121
 
Introduction Computer programming and operating system
Introduction Computer programming and operating systemIntroduction Computer programming and operating system
Introduction Computer programming and operating system
CheeFoongChan1
 
introduction to computer programming and its examples
introduction to computer programming and its examplesintroduction to computer programming and its examples
introduction to computer programming and its examples
LAKSHMIKANTHG5
 
computer programming and hardware technique
computer programming and hardware techniquecomputer programming and hardware technique
computer programming and hardware technique
uzairasops
 
Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
crAmth
 
Python Programming-Skill Course - unit-i.pptx
Python Programming-Skill Course - unit-i.pptxPython Programming-Skill Course - unit-i.pptx
Python Programming-Skill Course - unit-i.pptx
KavithaDonepudi
 
Introduction to C for Btech 1st year.ppt
Introduction to C for Btech 1st year.pptIntroduction to C for Btech 1st year.ppt
Introduction to C for Btech 1st year.ppt
simantpandit9d
 
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
Froilan Cantillo
 
PROG0101_CH02.pptx
PROG0101_CH02.pptxPROG0101_CH02.pptx
PROG0101_CH02.pptx
AnjaliPandey439257
 
sege.pdf
sege.pdfsege.pdf
sege.pdf
SegezzBrian
 
Introduction to computer programming
Introduction to computer programming Introduction to computer programming
Introduction to computer programming
VanessaBuensalida
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
MohammedMohammed578197
 
Introductions to Design Logic.pptx IT level
Introductions to Design Logic.pptx IT levelIntroductions to Design Logic.pptx IT level
Introductions to Design Logic.pptx IT level
gadisaadamu101
 
programming.pptx
programming.pptxprogramming.pptx
programming.pptx
DarianElmyra
 
introduction computer programming languages
introduction computer programming languages introduction computer programming languages
introduction computer programming languages
BakhatAli3
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
Tekle12
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 
Lahor main It revoloution anfd its uses.
Lahor main It revoloution anfd its uses.Lahor main It revoloution anfd its uses.
Lahor main It revoloution anfd its uses.
ssuser6aa405
 
basics of it in pakistan and all over the
basics of it in pakistan and all over thebasics of it in pakistan and all over the
basics of it in pakistan and all over the
ssuser6aa405
 
Session01 basics programming
Session01 basics programmingSession01 basics programming
Session01 basics programming
HarithaRanasinghe
 
presentation of Programing fundamental.
presentation of  Programing fundamental.presentation of  Programing fundamental.
presentation of Programing fundamental.
meerikhlaque121
 
Introduction Computer programming and operating system
Introduction Computer programming and operating systemIntroduction Computer programming and operating system
Introduction Computer programming and operating system
CheeFoongChan1
 
introduction to computer programming and its examples
introduction to computer programming and its examplesintroduction to computer programming and its examples
introduction to computer programming and its examples
LAKSHMIKANTHG5
 
computer programming and hardware technique
computer programming and hardware techniquecomputer programming and hardware technique
computer programming and hardware technique
uzairasops
 
Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
crAmth
 
Python Programming-Skill Course - unit-i.pptx
Python Programming-Skill Course - unit-i.pptxPython Programming-Skill Course - unit-i.pptx
Python Programming-Skill Course - unit-i.pptx
KavithaDonepudi
 
Introduction to C for Btech 1st year.ppt
Introduction to C for Btech 1st year.pptIntroduction to C for Btech 1st year.ppt
Introduction to C for Btech 1st year.ppt
simantpandit9d
 
Introduction to computer programming
Introduction to computer programming Introduction to computer programming
Introduction to computer programming
VanessaBuensalida
 
Introductions to Design Logic.pptx IT level
Introductions to Design Logic.pptx IT levelIntroductions to Design Logic.pptx IT level
Introductions to Design Logic.pptx IT level
gadisaadamu101
 
Ad

Recently uploaded (20)

Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdfGoogle DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
derrickjswork
 
Building Connected Agents: An Overview of Google's ADK and A2A Protocol
Building Connected Agents:  An Overview of Google's ADK and A2A ProtocolBuilding Connected Agents:  An Overview of Google's ADK and A2A Protocol
Building Connected Agents: An Overview of Google's ADK and A2A Protocol
Suresh Peiris
 
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
UXPA Boston
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
How Top Companies Benefit from Outsourcing
How Top Companies Benefit from OutsourcingHow Top Companies Benefit from Outsourcing
How Top Companies Benefit from Outsourcing
Nascenture
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
AI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological ImpactAI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological Impact
SaikatBasu37
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Secondary Storage for a microcontroller system
Secondary Storage for a microcontroller systemSecondary Storage for a microcontroller system
Secondary Storage for a microcontroller system
fizarcse
 
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More MachinesRefactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Leon Anavi
 
DNF 2.0 Implementations Challenges in Nepal
DNF 2.0 Implementations Challenges in NepalDNF 2.0 Implementations Challenges in Nepal
DNF 2.0 Implementations Challenges in Nepal
ICT Frame Magazine Pvt. Ltd.
 
Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025
Damco Salesforce Services
 
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
HusseinMalikMammadli
 
Agentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community MeetupAgentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community Meetup
Manoj Batra (1600 + Connections)
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdfGoogle DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
derrickjswork
 
Building Connected Agents: An Overview of Google's ADK and A2A Protocol
Building Connected Agents:  An Overview of Google's ADK and A2A ProtocolBuilding Connected Agents:  An Overview of Google's ADK and A2A Protocol
Building Connected Agents: An Overview of Google's ADK and A2A Protocol
Suresh Peiris
 
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
UXPA Boston
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
How Top Companies Benefit from Outsourcing
How Top Companies Benefit from OutsourcingHow Top Companies Benefit from Outsourcing
How Top Companies Benefit from Outsourcing
Nascenture
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
AI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological ImpactAI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological Impact
SaikatBasu37
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Secondary Storage for a microcontroller system
Secondary Storage for a microcontroller systemSecondary Storage for a microcontroller system
Secondary Storage for a microcontroller system
fizarcse
 
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More MachinesRefactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Leon Anavi
 
Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025
Damco Salesforce Services
 
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
HusseinMalikMammadli
 

Chapter 4 computer language

  • 2. Contents • Machine language programming • Programming process • Programming languages • Levels of programming languages • Program translator
  • 3. Learning Objectives • At the end of this chapter, students should be able to: – Identify and utilize the programming processes. – Identify the different levels of programming languages. – Identify and differentiate the program translators.
  • 5. Machine Language Programming • What is programming language? – A language for instructing computer • What is source code? – A complete program in such language • What is machine language? – The most primitive type of programming language that computer understands (instruction can be executed by the CPU)
  • 6. Machine Language Programming • Earliest form of programming • Most tedious and time consuming since it requires programmers to: – determine the exact set of primitive machine actions (instructions) necessary to perform complex task – write down each instruction in an understandable form to the computer
  • 7. Machine Language Programming • Computer’s instruction set are defined by the set of data manipulation and movement functions of which the CPU is capable to perform. • The processing functions of a typical CPU can be classified into 3 categories: – Computation – perform mathematical calculation using two numbers as input and store the result – Comparison – compare the values of two stored numbers and determine if they are equivalent – Data movement – move an individual item of data from one storage location to another storage location
  • 8. Machine Language Programming High Level Language Program Machine Language Code Micro Steps (Micro Code) Memory Bus System ALU etc. HW Decoder Control Signal Language Processing Translation from SW to HW
  • 10. Programming Process • What is programming Language? – A set of rules that provide a way of telling a computer what operations to perform. • What is program? – Set of step-by-step instructions that direct the computer to do the task users want it to do and produce the results.
  • 11. Programming Process • Programming process includes: – define the problems – plan the solution • through developing an algorithm that includes the flowchart and pseudo-code – coding the program – test the program – document the program
  • 12. Programming Process • Defining a problem: – Programmer meets users of the client organization or system analyst will analyze the problems. – Written agreement is produced. – Items of input, process and output are being identified.
  • 13. Programming Process • Planning the solution – Most common way of planning is by having flow charts or write pseudo-code – Flowchart is a pictorial diagram of an ordered step by step solution to a problem
  • 14. Programming Process Process Decision Connector Start or Stop Program Input or Output Direction of Flow ANSI Standard Flow Chart Symbols
  • 15. Programming Process Example of simple flow chart – of what to do if a lamp doesn’t work
  • 16. Programming Process • Planning the solution – Pseudo-code is an English-like language that states the solution with more precision in English but less precision than is required when using a formal language. – Example: if credit card number is valid execute transaction based on number and order else show a generic failure message end if
  • 17. Programming Process • Coding the programs – The programmer translate the logic from the flow chart or pseudo-code to a programming language or source code – The programmer has to know the syntax and the format of writing the programming
  • 18. Programming Process • Testing the program – Involve the desk-checking, the translating, and the debugging phases. • Desk-checking involves a programmer sitting down to proof-read a program. • Translating involves a translator – using compiler or interpreter (a program that translates the instruction into a form the computer can understand). • Debugging involves detecting, locating, and correcting bug or mistakes or errors by running the program.
  • 19. Programming Process • Documenting the program – Is necessary and is an ongoing process. – Documentation is a written detail descriptions of the programming cycle and specific facts about the program. – Typical program documentation materials include: • The origin and the nature of the problem. • A brief narrative description of the program. • Logic tools such as flowcharts, pseudo-codes and/or flow charts. • Data record descriptions • Program listings and testing results.
  • 21. Programming Languages • Programming languages are said to be lower (closer to the computer) or higher (closer to people/users). • There are five generations of programming languages to be enlisted from the lowest to the highest levels, which are: – Machine language. – Assembly language. – High-level language (HLL). – Very high-level language (VHLL). – Natural language.
  • 23. Programming Languages • Machine language – The lowest level of language – Represents data as 1s and 0s (binary digits corresponding to the “on” and “off” electrical states (switching actions) in a computer.
  • 24. Programming Languages • Assembly language – Uses mnemonic codes – Mnemonic codes are abbreviations that are easy to remember and to replace the machine language numbers – Even though not in English words, they are still convenient and are preferable than numbers alone. – Uses an assembler program to turn its program into a machine language. – Has disadvantages such as vary by machine, extremely detail, making programming becomes repetitive, tedious and prone to making errors.
  • 25. Programming Languages • High-level Language (HLL) – More English-like – thus making it more convenient – FORTRAN (FORmula TRANslator) is the 1st HLL – Other examples of HLL are COBOL, BASIC, ALGOL, APL, FORTH, LISP, LOGO, Modula- 2, PILOT, PLI, PROLOG and RPG.
  • 26. Programming Languages • Very high-level language (VHLL) – Known as a 4th generation language (4GL) – Usually nonprocedural (user need to write only “what” is to be done but not “how”. – A procedural language tells the computer how a task is done (a very specific step-by-step process) – Advantages - increase productivity, require minimal training and allow users to be unconcern about the HW or program structure.
  • 27. Programming Languages • Natural language – Is named because of its resemblance to spoken English. – Referred to as knowledge-based language due to its usage in interacting with a base of knowledge on some subject, resulting in a knowledge-based system (KBS), such as an expert system. – Natural language excel at easy data access – This has evolved into a language namely structured query language (SQL).
  • 28. Programming Languages • Object-oriented programming (OOP) – A group of languages : called object-oriented language (OOL) group. – OOL is based on a more active, visual programming environment. – Structured languages treat data and tasks (instructions) separately. – OOL views data and tasks together for each object (entity that may be grouped in classes and contains its own code). – Current examples OOP languages are Object Logo, JAVA, C++, Turbo Pascal, and SmallTalk.
  • 29. Programming Languages • Hybrid object-based programming languages – Are visual in a manner similar to OOP language but lack certain features. – The 1st hybrid language : HyperCard (Macintosh) – Some object-based hybrids are classified as visual programming languages because they are distinguished by the ability to build programs connecting links between various objects. – Current examples of visual programming languages are Object Vision and Visual Basic (VB).
  • 31. Program Translator • What is program translator? – A program that transform/translate source code into machine readable code. • There are 3 types of program translator: – Assembler – Compiler – Interpreter
  • 32. Program Translator • Assembler – A program that translates the instruction (assembly language code) into a form that computer can understand (machine language code). MOV AX, 0005 ADD AX, 0010 ADD AX, 002 MOV [0120], AX INT 20 Assembler Output File 1011100000000101000000 0000000101000100000000 0000000001010010000000 0000001010001100100000 Symbolic program Binary program
  • 33. Program Translator ADD AX, 0010 05 10,00 Opcode in Assembly Language Operand1 Operand2 Opcode in Machine Language Operand1 Operand2 Notes that: ADD translated into 05 AX translated into 000010 translated into 1016 Assembly Language Machine Language (Binary) Machine Language (Hexadecimal) MOV AX,0005 10111000 00000101 00000000 B8 05 00 ADD AX,0010 00000101 00010000 00000000 05 10 00 ADD AX,0020 00000101 00100000 00000000 05 20 00 MOV [0120],AX 10100011 00100000 00000001 A3 20 01 INT 20 11001101 00100000 CD 20
  • 34. Program Translator • Compiler – A compiler translates a program in a programming language – The original program is called the source code – The result of translating source code is called the object code
  • 35. Program Translator • Compiler – How a compiler compile a program? • Source code is read from a file by the compiler and object code is written to a newly created file • The source code file is named to indicate the programming language, such as program.java where “.java” indicates a JAVA program • Object code filenames generally have an “.o” or “.obj” appended to original root filename, such as program.o or program.obj.
  • 36. Program Translator • Compiler – Source code statements are read into the compiler one at a time – 3 classes of source code statements are: • Data declaration • Data operation • Control structure
  • 37. Program Translator • Compiler: – Data declaration: • Set memory locations to store the declared data. • The amount of memory allocated depends on the type of the data, such as integer, real, character etc. • The compiler builds an internal table, known as symbol table to keep track of the data names, types and assigned memory addresses.
  • 38. Program Translator • Compiler – Data operation • As data operations are encountered in source code, they are translated into the sequence of machine instructions necessary to implement those operations. • These instruction sequences include primitive data manipulation instructions as well as any necessary data movement instructions.
  • 39. Program Translator • Compiler – Control structure • Example of control structure includes unconditional branches (such as GOTO statement or subroutine call), conditional branches (such as IF-THEN-ELSE statement), and loops (such as WHILE-DO, FOR and REPEAT-UNTIL statement).
  • 40. Program Translator • Compiler – Support Libraries • The object code consists entirely of executable machine instructions and data such as executable code. • Certain types of language statements, including data declarations, control structures are converted into executable codes (external subroutines). • These external subroutines can be found in either one of these places: – Compiler library – Library call
  • 41. Program Translator • Compiler – Linking • Note that, the preceding library call is not a CPU instruction. • Library call is a reference to a set of executable code that has been previously compiled and stored in a library for later use. • Therefore, it must be replaced by the corresponding library code before application can be executed. • A program called a linker or link editor performs this replacement. • The process of replacement is called linking, link editing or binding.
  • 42. Program Translator • Interpreter – While compilation process is in progress, link editing and program execution cannot occur until the entire source code file has been compiled – In contrast, interpretation interleaves source code translation and execution – An interpreter reads a single statement of the source code, translates into machine instruction, and immediately executed – One program (the interpreter) translates and executes another (the source code) one statement at a time
  翻译: