Unit 2 - Computer Systems Flashcards
Advantages of using binary numbers
- Few rules for addition - making calculations simpler
- Degraded signal can still be detected (as representing 1)
Each character on the keyboard has a unique binary code which is called…
ASCII
What does ASCII include
- non printable chars (e.g <return>, <tab>, <delete>)</delete></tab></return>
- printable chars
What are control characters
e.g RETURN, TAB, DELETE
(non printable characters)
Unicode
Represents more chars with 16-bit character code (2^16) this can represent foreign languages like Arabic and Chinese
ASCII advantage
1 char = 1 byte (less memory)
ASCII disadvantage
only 255 possible chars
Unicode advantage
2^16 possible chars (represents foreign langs.)
Unicode disadvantage
1 char = 2 bytes (more memory)
What is machine code
binary
name the 2 translators
interpreter
compiler
What is an interpreter
Converts and executes each line of code one line at a time
Interpreter advantages
Immediately tells programmer when syntax error is made
Good for humans learning to program ^
Don’t need to leave programming env (e.g., vscode or livecode)
Interpreter disadvantages
Needs to be translated every time the program is run
Compiler
Will not run until entire code is turned into machine code
Compiler advantages
Once translated, it doesn’t need to be translated again ∴ runs faster
Compiled code requires less memory to execute
Compiler disadvantage
Compiled code cannot be edited
What are the 3 parts of a CPU (processor)
- The control unit
- The arithmetic & logic unit (ALU)
- Registers
What is the control unit for
- responsible for running programs that are loaded into main memory
- sends signals to fetch instructions from main memory
- understands these instructions
- carries out the instructions that are fetched from main memory
What does the ALU do
Carries out computer’s arithmetical functions like addition, division etc
Also does logical functions like IF, AND, WHILE etc
What are registers
Small temp memory locations locate. They store the data for the current instruction being processed.
Main memory
either ram or rom
Backing storage
outside the main processor, e.g SSDs, HDDs
ROM - read only memory
- Data is stored permanently on rom
- not volatile, data not lost when the power goes off
- data in rom cannot be changed