0% found this document useful (0 votes)
7 views

Cs Notes

Uploaded by

sarah12082009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Cs Notes

Uploaded by

sarah12082009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Binary

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

Which then makes it 128+64+32+8+4+2=238


That makes 238 your denary value.

On the other hand, when converting denary to binary you have to


calculate what numbers in the binary system add up to the denary
values then place a 1 if that number helps add up to the denary value.

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

When converting from binary to hexadecimal you have to first divide


the binary value into 2 or 3 bits depending on whether the binary value
is 8 or 12 digits.
Then separate it into 4 bits and then solve.

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

So the final hexadecimal value is BE1

Some uses of the hexadecimal number system are:


1. Error codes
2. MAC adresses
3. IP adresses
4. HTML colour codes

Internet security
Brute force attack- a trial and error method used by cybercriminals to
crack passwords using all different combinations possible.

Data interception- an attempt to eavesdrop on a wired or wireless


network transmission often used by packet sniffing or wardriving to
intercept data.

Packet sniffing- methods used by cybercriminals to examine data


packets sent to a network and the contents.

Wardriving- using a device to intercept wi-fi signals to illegally obtain


data.

DOS attack- a cyberattack in which the cybercriminals disrupt a website


by sending spam emails.

Spam- unsolicited emails sent to a user's inbox.


Hacking- act of gaining illegal access to a computer system without the
owner's permission.

Malware- programs installed on a user's computer of altering data


illegally.

Virus- a program that duplicates itself with the intention of corrupting


data.

Trojan horse- a malware that is designed to look legit but is a malicious


software.

Phishing- legitimate emails that trick the user to give out their private
details.

Pharming- redirecting a user to a fake website in order to get them to


input their details.

Firewall- software or hardware that filters all incoming and outgoing


traffic.

Translators
There are 3 types of translators:
1. Assemblers
2. Compilers
3. Interpreters

Assemblers convert assembly language into machine code.


Compilers translate high level language codes to machine code, As a
whole.

Interpreters translate high level language codes into machine codes line
by line.

Calculation of file size


1. Size of an image- image resolution (pixels) x color depth(bit)

2. size of an audio file- sample rate (Hz) x sample resolution(bit) x


length of sample(seconds)

1 kibibyte-2˄10- 1024 bytes


1 mebibyte-2˄20- 1,048,576 bytes
1 gibibyte- 2˄30- 1,073,824 bytes
1 tebibyte-2˄40- 1,099,511,627,770 bytes
1 pebibyte-2˄50- 1,125,899,906,842,624 bytes
1 exbibyte- 2˄60- 1,152,921,504,606,846,976 bytes

1 kilobyte- 10˄3 bytes


1 megabyte-10˄6 bytes
1 gigabyte- 10^9 bytes
1 terabyte- 10^12 bytes
1 petabyte- 10^15 bytes
1 exabyte- 10^18 bytes

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

Character-a single character

Boolean- one of two values

Integer- whole number

Real- decimal number

Date/time- date and or time

String-has several characters with numbers and letters

Variable declarations
Variables- stored values that change the execution of a program

Constants- stored value that doesn’t change the execution of the


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:

1. Begin/ terminate symbols

2. Process- they are used to show actions


3. Input and output- used to show input and output of data.

4. Decision symbols- used to decide what action is to be taken next.

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.

You might also like