0% found this document useful (0 votes)
7 views

source and machine code

The document outlines a lesson plan focused on defining source code and machine code, explaining their differences, and understanding their relationship. It includes classroom rules, success criteria for students, activities for practical understanding, and key concepts related to programming languages and their execution. The lesson aims to ensure students can accurately define and identify examples of both types of code while reflecting on their learning outcomes.

Uploaded by

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

source and machine code

The document outlines a lesson plan focused on defining source code and machine code, explaining their differences, and understanding their relationship. It includes classroom rules, success criteria for students, activities for practical understanding, and key concepts related to programming languages and their execution. The lesson aims to ensure students can accurately define and identify examples of both types of code while reflecting on their learning outcomes.

Uploaded by

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

code and machine code and Understand that code (both

source and machine) is a set of instructions

Topic: Source code and machine code

Lesson Objective: Students will be able to


•Define source code and machine code and explain the differences.
•Describe the relationship between source code and machine code .
•Understand that code (both source and machine) is a set of instructions

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

CLASSROOM RULES
★I will always focus during the lesson.
★I will always keep all the required
stationery handy.​
★I will ask for help whenever needed.​
★I will only speak when asked.​
★I will keep myself positive and make
sure that I take the responsibility of
my own learning.
• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .
• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

Today’s Thought

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

Starter Activity
"Human vs. Robot" Instructions:
•Activity: Divide the class into pairs.
•Pair 1:
•Write the steps to make a paper airplane or drawing a simple picture.
Pair 1: Write the instructions in everyday, conversational language (e.g.,
"Fold the paper in half, then fold the corners down...").
•Pair 2: Write the instructions in a very precise, step-by-step, almost
robotic language (e.g., "Rotate paper 90 degrees clockwise, fold edge A
to edge B...").
• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .
• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both

Keywords source and machine) is a set of instructions

•Source Code: The text written by a programmer in a programming language.

•Machine Code: The lowest-level form of computer instructions.

•Programming Language: A formal language with a set of rules used to write instructions for a
computer.

•Compiler: A program that translates source code into machine code in one go, creating an
executable file.

•Interpreter: A program that executes source code line by line, without creating a separate
executable file.

•Assembler: A program that translates assembly language (a low-level language) into machine
code.
• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .
• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both

Source code source and machine) is a set of instructions

Source code is the foundational


element of software development.
It's the set of instructions written by a
programmer using a specific
programming language, designed to
be human-readable and
understandable.

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

Characteristics of Source Code :

•Source code is written using


programming languages that are
designed to be relatively easy for
humans to read and write.

• It employs keywords, syntax, and


structures that resemble natural
language, making it more intuitive for
programmers.
• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .
• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

High-Level Abstraction:
•Programming languages provide abstractions
that hide the complexities of the underlying
hardware.

•Programmers work with concepts like variables,


functions, objects, and data structures, rather
than directly manipulating memory addresses.

•This high level of abstraction simplifies the


development process and allows programmers
to focus on the program's logic.

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
Machine code code and machine code and Understand that code (both
source and machine) is a set of instructions

Machine code, also known as machine


language, represents the most fundamental
level of computer programming. It's the raw,
numerical language that a computer's
central processing unit (CPU) directly
understands and executes.

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
Core Nature code and machine code and Understand that code (both
source and machine) is a set of instructions

•Binary Representation:
• Machine code is expressed in binary form,
consisting of sequences of 0s and 1s. This binary
representation directly corresponds to the
electrical signals that the CPU processes.

•Low-Level Instructions: Machine code instructions


perform very basic operations, such as:
• Loading and storing data in memory.
• Performing arithmetic and logical operations.

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

Relationship to Other Languages


Assembly Language:
• Assembly language is a low-level programming
language that provides a more human-readable
representation of machine code.

• High-Level Languages:
High-level programming languages (e.g., Python,
Java, C++) are designed to be more abstract and
easier for humans to use.
• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .
• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

Video

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions
Plenary
1. What is the main difference between source code and machine code?

2. Is machine code the same for every computer? Why or why not?

3. Give an example of a programming language that is typically compiled, and one that is typically interpreted..

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions
Plenary
1. What is the main difference between source code and machine code?

•Answer: Source code is written in a human-readable programming language, while machine code is the low-level,
binary language that the computer's CPU directly executes.

2. Is machine code the same for every computer? Why or why not?

No, machine code is not the same for every computer. It's specific to the CPU architecture. Different CPUs (like Intel
x86 and ARM) have different instruction sets.

3. Give an example of a programming language that is typically compiled, and one that is typically interpreted..
•Compiled: C, C++, Go, Rust.
•Interpreted: Python, JavaScript, Ruby.
• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .
• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

Lesson Outcome/Self-Reflection:
Have we achieved the learning
objectives?
I am a bit confused I can do the
I know I am not clear on this
and need more help​​ tasks confidently​​

The definition of source and machine


code.

To describe the relation ship between


Source and machine code.

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.
code and machine code and Understand that code (both
source and machine) is a set of instructions

• S u c c e s s C r i t e r i a : I can accurately define source code and machine code .


• I can correctly identify examples of source code
• I can explain the basic relationship between source code and machine code.

You might also like