2.5.1 Flashcards
what are the types of languages?
-machine code
-low level language (assembly code)
-high level language (source code)
describe machine code
-consists of strings of 1s and 0s
-instruction run inside the CPU for a particular processor that will understand and be able to process
describe low level language (assembly code)
-made up of a predetermined set of commands that can be read by a person (ADD), each commands translates directly to a machine code number
-these commands are mnemonics used by people to easily understand computer instructions
mnemonics
english words to represent binary oppcodes
what are the pros of low level language?
-executes faster
-occupies less memory
what are the cons of low level language?
-programmer needs to know a lot about hardware details inside CPU
what are the two parts of the instructions for a microprocessor?
-oppcode: specifies the operation that has to be performed
-opperand: the data that has to be used or memory location
describe high level language (source code)
-developed to make programming easier for people
-two main features: syntax and keywords
what are the pros of high level language?
-faster program development
-machine independent (can be run on different computers)
what are the cons of high level language?
-source code needs to be converted into machine code to be run in the CPU
what does a translator do?
translates high level languages into machine code
what are the types of translators?
-assembler
-compiler
-interpreter
assembler
converts assembly language into machine code
interpreter
doesn’t translate entire source code in one go (line by line translation)
pros of interpreter
-errors show immediately
-takes up less memory