Programming languages Flashcards
Machine code
- hard for humans to understand
- binary representation of instructions that the CPU can decode and execute
High-level language
- written in python/C++/Java
- 1 instruction = many in machine code
- can run on multiple processors
- easier and quicker to use
- less memory efficient
- can be slow to execute if not optimised
low-level laguage
-written in assembly language
-used in embedded systems (where instructing hardware
directly is important)
- 1 instruction in LLL = 1 in machine code
-only works on the processer it was coded for
-harder to understand
-fast to execute
-memory efficient
translater
converts programming languages into machine code in order to make the instructions readable/executable for the processor. (includes assembler, interpreter, compiler)
compiler
- converts high-level into machine code
- translates all the instructions at once
- harder to find errors
- processing time is long but is very quick for replication
interpreter
- converts high-level into machine code
- executes line by line, immediately
- finds errors as it goes along
- runs slowly
3 reasons why high level is used over low level languages
- easier to read and write
- easier to debug
- easier to learn/understand
2 reasons why people use low level languages
- can work directly with the hardware
- takes up less storage/memory
problems using low levels for open-source software
- open source is used so other programmers can contribute and edit it for their own uses
- low-level is not commonly known so its harder for other programmers to use
how is sound stored in a computer
- sound recorded by a microphone
- converted into electrical signals
- analogue wave sampled at regular intervals
- samples converted into binary and stored
why sound is not always sampled to give the highest audio quality (4)
-higher quality means a larger file size
- lower quality is useful for low storage capacity
- useful for sending files to other devices
- useful for streaming across the internet
how are bitmap images stored on a computer
- bitmap is a rectangular grid of pixels
- each pixels is represented as binary
- each binary number represents a different colour
1 adv and 1 disadv of storing an image in high resolution
- better quality
- larger file size/more storage