Cs Notes
Cs Notes
Binary is a base 2 number system which uses only 2 values which are 1
and 0.
When converting binary to denary you enter the binary number starting
from the highest bit.
E.g
Make 11101110 a denary number
128 64 32 16 8 4 2 1
1 1 1 0 1 1 1 0
E.g
Make 142 a binary number
128 64 32 16 8 4 2 1
1 0 0 0 1 1 1 0
So you use a trial and error method and you get the answer because
128+8+4+2=142
And that makes your binary value 10001110
Hexadecimal
The hexadecimal number system is a base 16 system.
It uses the numbers 0 to 15 and 0 to 9 are written as the numbers but:
10=A
11=B
12=C
13=D
14=E
15=F
E.g
Convert 101111100001 to hexadecimal
1 0 1 1 1 1 1 0 0 0 0 1
So it then becomes
8 4 2 1
1 0 1 1
8+2+1=11 so it becomes B
8 4 2 1
1 1 1 0
8+4+2=14 so it becomes E
8 4 2 1
0 0 0 1
1=1 so it is 1
Internet security
Brute force attack- a trial and error method used by cybercriminals to
crack passwords using all different combinations possible.
Phishing- legitimate emails that trick the user to give out their private
details.
Translators
There are 3 types of translators:
1. Assemblers
2. Compilers
3. Interpreters
Interpreters translate high level language codes into machine codes line
by line.
Test data
Normal test data is used with test data that the program will be
expected to work with together with the results expected from that
data.
Abnormal test data is used with test data that the program would not
be suitable with and if the program was working well it would reject the
test data.
Extreme test data is the largest and smallest values a normal data can
take in and if you enter them they should be accepted.
Data types
Alphanumeric/text- uses characters
Variable declarations
Variables- stored values that change the execution of a program
DECLARE<identifier>:<data type>
E.g
DECLARE Age: INTEGER
Flowcharts
Flowcharts diagramatically show the steps required to complete a task
and the order in which they are to be performed.
Flowchart symbols:
Identifying errors
When identifying errors in pseudocode you need to first know that
there is no = sign in pseudocode and that you only use <--- when doing
instructions.
Then also note that you don’t use print you use OUTPUT.