Please enable JavaScript.
Coggle requires JavaScript to display documents.
Computer Science Revision - Coggle Diagram
Computer Science Revision
Assembly
Low level languages
Programming in a low level programming language such as an assembly code, requires knowledge of the internal structure of the CPU therefore it is very specialised
Program statements are written for certain types of CPU and make direct reference to specific registers
Assembly code is close to but not machine code. it uses mnemonics instead of the 1's and 0's that are used in machine code meaning it is easier to understand and use for programmers
Each computer has its own assembly language and machine code so therefore any code written for one type of CPU will not work on any other type of CPU
Originally all computer programs were written in low level languages but over time high level languages have been developed which are closer to written english and are easier to learn and use for most programmers
Most programmers these days use high level languages to code their programs as they are easier to learn, use and edit if you make a mistake
principles of programming
A high level programming language allows code to be written in a natural human language which is very close to English.
Some programmers prefer to use high level programming languages because:
They are easier to understand, learn and program, as their commands are similar to natural languages like English
The names of variables/identifiers can be long and meaningful, making programs easier to understand
They closely resemble pseudo-code algorithms
Machine code
machine code is written in bit patterns (instructio0ns and data) that can be executed directly by the CPU
High level language must be converted into machine code before they can be executed by the CPU, whereas machine code does not
Low level languages
programming in a low level language such as assembly code requires knowledge of the internal structure of the CPU and is therefore very specialised
Assembly code uses mnemonic (an abbreviation for an operation) and is converted to machine code for execution using an assembler
Networks
Disadvantages
Requirements and Connectivity
Connectivity
is the process of connecting parts of a network together to allow data transfer.
Without connectivity, data could not be easily exchanged between computers without the use of removable storage
Wired Connections use a wired connection protocol e.g.
CAT6
cabling using
Ethernet
A network manager may need to be employed
Hackers can gain access to more data easliy
If the server is down all workstations on the network are affected
The initial cost of setting up a network (servers, communications devices, etc.) can be expensive
A network is a number of computer systems connected together
Advantages include;
Sharing peripherals, Sharing software and Sharing data
Centralised backup, centralised maintenance and the ability to access data from any computer are also all advantages
Program Construction
Translators
Computers can only execute binary machine code instructions. A program written in another language must be converted into machine code before the program can be run
we use the term 'translators' to cover all the types of software that convert code from one form to another. Compliers, interpreters and assemblers are all types of translators
Compliers
A complier translates a source code program into machine code and creates an executable file that can be run in the future without the need for recompilation. There are four compilation stages:
Lexical Analysis
Comments and unnecessary spaces are removed
Keywords, constants and identifiers are replaced by 'tokens' (strings to identify each part)
Some
simple error-checking
is performed; is an identifier name too long?, attempts to assign an illegal value to a constant, such as a value of the wrong type
A symbol table is created of all the parts of the code:
For example:
Syntax analysis
Tokens are checked to see if they match the spelling and grammar expected, using standard language definitions.
This is done by analysing each token to determine if it uses the correct syntax for the programming language.
If syntax errors are found, error messages are produced
Semantic Analysis
Variables are checked to ensure that they have been properly declared and used.
Variables are checked to ensure that they are of the correct data type, e.g. strings are not assigned to intergers.
Operations are checked to ensure that they are legal for the type of variable being used, e.g. don't store division in an integer
Code Generation
Machine code is generated.
Code optimisation may be employed to make it more efficient, faster and allow it to be less intense on your computers resources
1 more item...
security and data management
Network security
Risk to data become greater as it is shared across a network
Unauthorised access to a network can allow the hacker to see all of the stored data
To secure a network requires appropriate level of access (restricting people to the data/software they need to do their jobs), secure passwords and encryption (coding the contents of emails. etc)
User access levels
it is not sensible or safe for every network user to have access to all the data on a computer system
User access levels define which users can change and view, view but not change, not view stored data
It will also specify what software they can or cant access
Suitable passwords
passwords add an additional layer of security when accessing a computer system
Strong passwords may require the user to use a combination of upper and lower case letters, numbers and symbols such as
!~-/\%
Other users can guess short simple passwords, or a hacker may have access to programs that brute force attack - trying multiple guesses or in quick succession until the correct password is found
Operating Systems
An operating system is the software that manages a computer system. The operating system is loaded by the bootstrap loader (stored on ROM)
Operating systems can be split into 2 types; GUI and Command Line Interface
Command Line Interface
They are quicker to input commands as you can use shortcut keys
Little memory and processing power is needed as they do not have to process graphics
You dont need much storage space (there are no graphical images to store)
If you have memorised the commands it is very fast to use
Instructions cannot be guessed and therefore it is very difficult to use for beginners
Commands have to be typed precisely, and there are a large amount of commands that you have to learn to be able to use it accurately and quickly
GUI (WIMP)
They are user friendly and colourful
There are no complicated commands that you need to learn as you select options by pointing/clicking
Data can be easily exchanged between different software applications
You can easily customise a GUI to your liking and make it fit your personality
Takes up a lot of hard disk space, RAM and processor time
Can be slow for an experienced programmer to use
WIMP
stands for;
W
indows - the screen is made up of areas called windows
I
cons - small pictures used to represent commands or files
M
enus - menus allow a user to make selections from a list
P
ointers - the arrow that appears when using Windows
Truth Tables
NOT gate
The NOT gate is the simplest as the there is only one input and output. The output is always opposite of the input in a NOT gate. for example if the input is 1 the output will be 0 and vice versa