SlideShare a Scribd company logo
2
Most read
12
Most read
14
Most read
S
CSC 121 Programming 1
Compilers, Interpreters
and Bytecode
What is a Compiler
 A program that translates
(or compiles) a high-level
language into a low-level
language.
What is a
Low-Level Language?
 A low-level language is lower (or
closer) to the CPU and hardware;
 Uses primitive instructions
(binary code) that a machine can
understand, but is more difficult for
humans to read or write.
Low-Level Language
 Examples are Machine code
(closest to hardware – binary code)
 Assembly Language – slightly less
cryptic.
High-Level Language
 A high-level language uses language
that humans can read, understand and
write more easily. Code is compose in a
text/code editor or IDE.
High-Level Language
 Examples of popular high-level
programming languages today are:
C, C++, Java, & Python
 FORTRAN was first
high-level language.
Compiling High-Level Source
Code into Machine Code
 High-level language source code,
written by programmers (using C
or C++) needs to be compiled into
executable machine code.
 A compiler program will translate the
source code into executable binary
code (all at one time).
Compiling High-Level Source
Code into Machine Code
 Programs which need to use a lot of
computer resources, and need to be as
efficient as possible, are often written
in a compiled language like C.
 C in many ways is a lower-level than
Python. For example, a C programmer
needs to handle a lot more memory
management than a Python programmer.
Compiling High-Level Source
Code into Machine Code
 Compiled code is fast and efficient
 But is platform dependent –
meaning it must be compiled
for a particular Operating System
or CPU.
Interpreted
High-Level Source Code
 Languages like Java and Python are
interpreted line by line by an
interpreter before being translated
into code that the CPU can use.
 This takes longer (is slower), but
allows the language to run on
multiple Operating Systems.
Interpreted Languages
 Java and Python source code are
first compiled (translated) into
bytecode which is then executed by
a virtual machine – Java Virtual
Machine or Python Virtual Machine.
 Virtual means it emulates the CPU
or hardware in a sense.
Interpreted Languages
- Python -
Python Interpreter
Inside the
Python Interpreter
Sometimes
referred to as
translator
hello-cpython-36.pyc
hello.py Operating
System
Interpreted Languages - Java
Sources:
 Python Concepts - What is a Python Compiler and
Python Virtual Machine?
(Moondra YouTube Channel)
 Inside Python: What is bytecode and pyc files?
(Indian Pythonista YouTube Channel)
 https://python-textbok.readthedocs.io/

More Related Content

PPTX
PROGRAMMING LANGUAGE AND TYPES
PPTX
Programming Fundamental Slide No.1
PDF
System calls
PPTX
C dynamic ppt
PDF
Java Thread Synchronization
PPTX
Deadlocks in operating system
PPTX
Types Of Operating Systems
PPT
Synchronization.37
PROGRAMMING LANGUAGE AND TYPES
Programming Fundamental Slide No.1
System calls
C dynamic ppt
Java Thread Synchronization
Deadlocks in operating system
Types Of Operating Systems
Synchronization.37

What's hot (20)

PPT
Memory allocation (4)
PPTX
Object Oriented Programming Concepts for beginners
PPTX
Computer Programming Overview
PPTX
Intro to Python Programming Language
PPTX
Threads .ppt
PPT
Deadlock
PPTX
Object Oriented Programming
PPT
Programming in c
PPSX
Programming languages
PPTX
Vi editor
PPTX
Features of java
PPT
Scheduling algorithms
PDF
Python Decision Making
PPT
PHP - Introduction to File Handling with PHP
PPTX
Introduction to system programming
PPTX
PPTX
Classes objects in java
PPTX
Important features of java
Memory allocation (4)
Object Oriented Programming Concepts for beginners
Computer Programming Overview
Intro to Python Programming Language
Threads .ppt
Deadlock
Object Oriented Programming
Programming in c
Programming languages
Vi editor
Features of java
Scheduling algorithms
Python Decision Making
PHP - Introduction to File Handling with PHP
Introduction to system programming
Classes objects in java
Important features of java
Ad

Similar to Programming 1: Compilers, Interpreters & Bytecode (20)

PPTX
C++Introduction for numerical methods in M.Sc
PPTX
Insight into progam execution ppt
PPTX
Introduction to Programmihhbbhhbbbng.pptx
PPTX
Introduction Programming and Application Lecture 1.pptx
PDF
Fundamental of Information Technology - UNIT 7
PPTX
Compiler design slide share
PPTX
Cf&oa
PDF
Chapter1.pdf
PPTX
Python-00 | Introduction and installing
PPTX
Life cycle of a computer program
PPT
Embedded firmware
PPT
Module-3 embedded system firmware code.ppt
PPT
Module-3 Embedded syatem firmware design.ppt
PDF
Introduction to Computer Programming (general background)
PDF
Describe professional programing languages and talks
PPT
La 5 Pl Translator
PDF
Python Introduction
PPTX
Data programming with the minimum hocker
PDF
Introduction to computer programming
C++Introduction for numerical methods in M.Sc
Insight into progam execution ppt
Introduction to Programmihhbbhhbbbng.pptx
Introduction Programming and Application Lecture 1.pptx
Fundamental of Information Technology - UNIT 7
Compiler design slide share
Cf&oa
Chapter1.pdf
Python-00 | Introduction and installing
Life cycle of a computer program
Embedded firmware
Module-3 embedded system firmware code.ppt
Module-3 Embedded syatem firmware design.ppt
Introduction to Computer Programming (general background)
Describe professional programing languages and talks
La 5 Pl Translator
Python Introduction
Data programming with the minimum hocker
Introduction to computer programming
Ad

More from Richard Homa (20)

PPTX
CSC103 Digital Security
PPTX
CSC 103 Databases Overview
PPTX
CSC103 Intro to Programming
PPTX
CSC103 Gaming Overview (for Everyone)
PPTX
CSC103 3D Software & Technology
PPTX
CSC103 Vector vs Raster Graphics
PPTX
CSC103 Bits, Bytes & Binary
PPTX
CSC103 Web Technologies: HTML, CSS, JS
PPTX
CSC103 Processing, Memory & Storage
PPTX
CSC103 Digital Devices: Device Basics
PPTX
CSC103 Internet
PPTX
CCS103 Bits, Bytes, Binary
PPTX
CSC103 Digital Images, Pixels, RGB Colors
PPTX
Excel Review Quiz
PPTX
CSC102 Excel Basics
PPTX
CSC102 Word Paragraph Formatting
PPTX
CSC102 Computer Software
PPTX
CSC102 Computer Connectivity
PPTX
CSC 102 Computer Intro
PPTX
Creating Immersive Technology Experiences with Web-based Software & Resources
CSC103 Digital Security
CSC 103 Databases Overview
CSC103 Intro to Programming
CSC103 Gaming Overview (for Everyone)
CSC103 3D Software & Technology
CSC103 Vector vs Raster Graphics
CSC103 Bits, Bytes & Binary
CSC103 Web Technologies: HTML, CSS, JS
CSC103 Processing, Memory & Storage
CSC103 Digital Devices: Device Basics
CSC103 Internet
CCS103 Bits, Bytes, Binary
CSC103 Digital Images, Pixels, RGB Colors
Excel Review Quiz
CSC102 Excel Basics
CSC102 Word Paragraph Formatting
CSC102 Computer Software
CSC102 Computer Connectivity
CSC 102 Computer Intro
Creating Immersive Technology Experiences with Web-based Software & Resources

Recently uploaded (20)

PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
1. Introduction to Computer Programming.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
cuic standard and advanced reporting.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
“AI and Expert System Decision Support & Business Intelligence Systems”
Digital-Transformation-Roadmap-for-Companies.pptx
Spectral efficient network and resource selection model in 5G networks
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
1. Introduction to Computer Programming.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
cuic standard and advanced reporting.pdf
Machine Learning_overview_presentation.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Programming 1: Compilers, Interpreters & Bytecode

  • 1. S CSC 121 Programming 1 Compilers, Interpreters and Bytecode
  • 2. What is a Compiler  A program that translates (or compiles) a high-level language into a low-level language.
  • 3. What is a Low-Level Language?  A low-level language is lower (or closer) to the CPU and hardware;  Uses primitive instructions (binary code) that a machine can understand, but is more difficult for humans to read or write.
  • 4. Low-Level Language  Examples are Machine code (closest to hardware – binary code)  Assembly Language – slightly less cryptic.
  • 5. High-Level Language  A high-level language uses language that humans can read, understand and write more easily. Code is compose in a text/code editor or IDE.
  • 6. High-Level Language  Examples of popular high-level programming languages today are: C, C++, Java, & Python  FORTRAN was first high-level language.
  • 7. Compiling High-Level Source Code into Machine Code  High-level language source code, written by programmers (using C or C++) needs to be compiled into executable machine code.  A compiler program will translate the source code into executable binary code (all at one time).
  • 8. Compiling High-Level Source Code into Machine Code  Programs which need to use a lot of computer resources, and need to be as efficient as possible, are often written in a compiled language like C.  C in many ways is a lower-level than Python. For example, a C programmer needs to handle a lot more memory management than a Python programmer.
  • 9. Compiling High-Level Source Code into Machine Code  Compiled code is fast and efficient  But is platform dependent – meaning it must be compiled for a particular Operating System or CPU.
  • 10. Interpreted High-Level Source Code  Languages like Java and Python are interpreted line by line by an interpreter before being translated into code that the CPU can use.  This takes longer (is slower), but allows the language to run on multiple Operating Systems.
  • 11. Interpreted Languages  Java and Python source code are first compiled (translated) into bytecode which is then executed by a virtual machine – Java Virtual Machine or Python Virtual Machine.  Virtual means it emulates the CPU or hardware in a sense.
  • 12. Interpreted Languages - Python - Python Interpreter
  • 13. Inside the Python Interpreter Sometimes referred to as translator hello-cpython-36.pyc hello.py Operating System
  • 15. Sources:  Python Concepts - What is a Python Compiler and Python Virtual Machine? (Moondra YouTube Channel)  Inside Python: What is bytecode and pyc files? (Indian Pythonista YouTube Channel)  https://python-textbok.readthedocs.io/