Please enable JavaScript.
Coggle requires JavaScript to display documents.
FDEs and High & Low level Language. - Coggle Diagram
FDEs and High & Low level Language.
High Level Language
Easier for Humans to understand as it is written in normal languages such as English
Types of High level programming Languages.
Python
Visual Basic
Java
C++
Why we uses High level Languages
Debugging is significantly easier.
Easier to maintain as a result.
Language is recognisably similar to English or Maths.
Errors are easier to spot and correct.
Characteristics
Translated using a compiler or interpreter.
One statement can translate into lots of lines of machine code instructions
Independent of Hardware, can be used by most machines.
Low level Language
Assembly Language
Processor Specific.
One programming statement translates into one Machine code instruction.
Translated using a Translator
Uses of Assembly Language
More control means that specific components can be manipulated.
Gives the programmer more control over the system components.
Often used in Embedded systems
Mnemonics
MOV - Moves contents of one memory address to another.
INP - Inputs a value and then stores it in the accumulator.
SUB - Subtracts the contents of the Accumulator to the contents of a RAM Address.
OUT - Outputs the accumulator content.
ADD - Adds the contents of the accumulator to the contents of a RAM address.
STA - Transfers a number from the accumulator to RAM
LDA - transfers a number from RAM to the Accumulator.
BRA - When looping used to jump to the RAM memory address.
HLT - Stops the processor
DAT - Variable Definition.
Simple Program
INP - takes another user input stored in the ACC
ADD 9 - Fetches the value stored at memory location 5 and adds to the contents of the ACC.
STA 9 - Stores at memory location 9
OUT - Outputs the sum.
INP - This takes a user input initially stored in the ACC
Machine code
Produced by compiler, interpreter or assembler.
Executable Binary Code
Translating into Machine Code
There are three types of translator program; Compiler, interpreter and assembler.
Compilers.
Different compilers required for different programming languages,
When buying software you purchase the object code not the source code.
More complex as a single instruction can result in many machine code instructions.
This protects the source code for the original programmer.
Converts high level language programs (source code) into machine code (Object code)
Interpreters
The interpreter has to be installed locally.
Interpreters useful for helping to identify errors in code as the program will run until it finds a syntax error.
Long programs can take a lot more time to execute if it is interpreted.
Translates each line of source code and the executes it - there is no object code produced.
Also used to translate high level languages into machine code.
Assemblers
This is translator for converting assembly language into Machine code.
A single assembly code instruction is translated into a single machine code instruction.
The processor will only handle machine code.
Whatever the language a program must be translated into machine code.
Translators are system software.
These are the languages that computers understand such as Binary.
Little man computer
The video shows the program that we have just created.
This is an emulator that shows the FDE cycle in action. You can write your own programs for it.
OPCODES and OPERANDS
OpCodes tell the processor what job needs to be done. Look back at the LMC to see if you can work out the OpCodes.
OpErands are the data that needs to be acted on, they can also refer to specific places in memory.
Machine code is made of instruction sets that are instructions or Data.
IDEs
Common Tools in an IDE
Python
Able to change the indent space.
Coloured words in source code.
Debugger - go through code line by line.
Select a region of code and be able to indent it.
Changing the size of source code.
You can tell it to comment out a certain region of code.
Help with key word syntax
Highlights any syntax errors in a program
Find and Replace
Tracing the value of variables
Run-time environment and output window
Visual Studio
Source code editor window
Project navigation panel
Errors produced when the compiler translates the program.
Main menu and toolbar with access to a host of features to help manage the project.
Syntax Highlighting
Project navigation Panel
Automatic indentation