Monday, December 31, 2018

1.2.3(d): show understanding of the concepts of internet Protocol address, Uniform Resource Locator and cookies


IP = Internet Protocol
It is a 32-bit number given to each device on the internet
An ISP assigns the device with an IP that is unique for that internet session
A MAC address is a unique number which identifies a device on the internet

1.2.3(b): show understanding of what is meant by HyperText Transfer Protocol (HTTP and HTTPS)



HTTPS is slower than using HTTP
HTTPS is usually used in the transfer of private data


1.2.1 (f): show understanding of the use of serial and parallel data transmission


USB = asynchronous and serial
Advantages-Different transmission rates exist, USB connectors can only fit in one way. (prevents incorrect connections being made)
Disadvantages-Maximum transmission rate is less than 500 megabits (around 62.5 megabytes) per second

1.2.1(e): show understanding of the reasons for choosing serial or parallel data transmission


Serial: good for long distances
       However its slower

Parallel: Faster than serial
       However bits can be out of sync over long distances

1.2.1(d): distinguish between synchronous and asynchronous data transmission


Synchronous
Data that is transmitted as a continuous stream, timing signals are used, which are generated by an internal clock. This ensured sender and receiver are in sync. The receiver counts the number of bits sent and then reassembles them into bytes of data. Timing must be very accurate in this type of transmission, as there are no control bits being sent. This is a faster method of data transmission.

Asynchronous
Data is transmitted in an agreed pattern. The Bits are grouped together and sent with control bits.This prevents data getting mixed up. Slower data transmission

1.2.1(c): distinguish between serial and parallel data transmission



Serial:
 Data is sent one bit at a time down a single wire/ channel
e.g long distance calls / usb

Parallel:
Data is sent several bits at a time down several wires/ channels (usually 8)
e.g describe what is meant by:

1.2.1(b): distinguish between simplex, half – duplex and full duplex data transmission



Simplex:
Data transmission in one direction only
e.g microphones, doorbell
Half duplex:
Data transmission in both direction non- simultaneously
e.g walkie talkies
Full duplex:
Data transmission in both directions simultaneously
e.g skype (phone call),

1.1.3(e): identify and describe methods of error detection and correction


Check digit
A check digit Is the final digit in a code, calculated using all the other digits of the code.
They are used for barcodes, product codes, International Standard Book Numbers (ISBN) and Vehicle Identifications Numbers (VIN)
Used for identifying errors in data entry (e.g typo)
They usually can identify:
·       An incorrect digit entered
·       Transposition errors
·       Omitted or extra digits
·       Phonetic errors in speech

e.g: ISBN-13

The last digit (13th) is calculated as follows:
       1. Sum all the odd digits (excluding the check digits)
       2. Sum all the even digits and multiply by 3
       3. Add the sums and mod (%) it to get the remainder
       4. If it is 0, this is the check digit. Otherwise, subtract the remainder from 10 to get the check digit

example: VALID
Calculate the check digit for this code

Finally, to validate the code:
1.  Sum all the odd digits (including the check digit)
2.  Sum all the even digits and multiply by 3
3.  Add the sums and mod (%) it to get the remainder
4.  The code is valid if the remainder is 0



Checksums:
A checksum is another method of error detection in data transmission
Data is sent in blocks and at the end of each block another value is added- this is checksum

Sunday, December 30, 2018

1.1.3(d): identify and describe methods of error detection and correction


Parity checking:
A method of error detection in data transmission from one device to another
e.g if a byte of data is transmitted, it would have a parity bit allocated to it before it was transmitted
Systems which use odd parity have an odd number of 1 bits
(adds a 1 to make amount of 1’s odd or adds 0 to keep odd)
Systems which use even parity have an even number of 1 bits
(adds a 1 to make amount of 1’s even or 0 to keep even)











Before data is transmitted, the sender and receiver both agree on what type of parity to use.
e.g: Even parity is used
Which of these bytes have been transmitted correctly?
11010000
01100110
11110101
10111001
00111111
However, the receiver doesn’t know which of the bits has been transmitted incorrectly! (odd parity is getting and odd numbers of 1's and even parity is getting an even number of 1's)
One way around this problem is sending a parity byte as well
Using this method blocks of data can be sent.
 :byte 2 is incorrect because even parity is used but the 1’s add up to and odd number
The extra parity byte checks every bit to to apply with the (even in this case) parity
What if an even number of bits have been incorrectly transmitted? Then there is no way of the receiver knowing
The limitation of parity check is that both the original and altered bytes pass the odd parity check

1.1.3(c): show understanding of the principles of data compression applied to music, video, photos and text files



(basically, previous post)
Lossless compression
Every bit of data is preserved when compressed and is restored after being uncompressed. This is usually used for text files and spreadsheets(if you don’t to lose any values)

Lossy compression

Redundant information is permanently eliminated. This can apple to photo, music and video files. (stuff we cant hear)

Text File Compression

“LIVE AS IF YOU WERE TO DIE TOMORROW, LEARN AS IF YOU WERE TO LIVE FOREVER”

This sentence consists of 74 memory units
To compress this, a compression algorithm can use a data dictionary to store repeated groups of characters
The data dictionary can store these groups and replace the ones in the text with numbers:

LIVE -> 1
AS IF YOU WERE TO -> 2
OR -> 3

1 2 DIE TOM3ROW, LEARN 2 1 F3EVER.

Now this new sentence is now 34 memory unit

This has saved 54% of the original file size
When the file is uncompressed, the groups of characters in the data dictionary are fetched and replace the numbers in the sentence.

1.1.3(b): show understanding of the concept of MIDI files, JPEG files, MP3 and MP4 files:



MIDI:
Musical Instrument Digital Interface is a widely-used standard for interconnecting electronic musical instruments and computers. Its associated with the storage of music files. However, the MIDI files don’t contain any sound. This makes them much smaller than other music file types. MIDI uses 8 bit, asynchronous serial transmission, which means that there is a start bit and stop bit. A MIDI file consists of a list of commands instructing which note to play and how loud. MIDI has 16 channels.

JPEG:
When a photographic file is compressed, the size of the file is reduced. However, the quality of the image is sacrificed for this reduction of size. Once an image is compressed, a new file is created which replaces the original file.
Joint Photographic Experts Group will reduce raw bitmap image by a factor of 5 – 15 (depending on the quality of the image)

The file size of an image is determined by the number of pixels as well as the number of primary colours the image uses. Most images use three primary colours: red, green and blue.
The number of pixels of an image is calculated by the length x width.
e.g.: an image which is 1000 px by 2000px:
so, 1000 x 2000 = 2,000,000 px

so the file size of that image would be : 2,000,000 x 3 (3 because 3 primary colours)
= 6,000,000 bytes
=5859.38 kilobytes
=5.72 megabytes
e.g an image is 128 by 364 pixels:
= 128 x 364 = 46,592 px

è Calculate the size of the file:
=46,592 x 3(primary colours)
=139,776 bytes
= 139,776 / 1024 = 136.5 kilobytes

Calculate the size of the JPEG file when its reduced by a factor of 7:
136.5 / 7
= 19.5 kilobytes
MP3
Moving Pictures Experts Group-3
Uses audio compression technology to convert sound into a MP3 format. This reduces the size of a normal sound file by around 90% (so a factor of 10)
For example, an 80-megabyte sound file could be reduced to an 8 megabyte MP3 file.
This is done by removing sounds that humans can’t hear
(perceptual music shaping)
e.g: Music is to be stored on a CD. Each minute of music is worth 12 megabytes.
Calculate how much space the CD would need to store 3 tracks which are 3, 6 and 7 minutes long
=3+6+7 = 16 minutes
=16 * 12 = 192 megabytes

e.g: Calculate how much space the CD would now need (you may assume the file size is reduced by 90%)
192 x 0.1 = 19.2 megabytes

e.g: The CD has 800 megabytes of space. Calculate how many minutes can be stored on the CD
=800 / 12
=66.67 minutes

MP4
MP4 instead of just storing music, it can also store multimedia

1.1.3(a): show understanding that sound(music), pictures, video, text and numbers are stored in different formats:


Sound:
MP3, WAV, AIFF, M4A
Pictures:
JPEG, GIF, TIFF, BMP
Video:
MP4, AVI, WebM, WMV
Text:
ASCII, TXT, RTF, DOC
Numbers:
Real, Integer(whole number), Currency, Date

Certain software uses different file formats
Certain file formats are better are different tasks

1.1.2(f): identify current uses of hexadecimal numbers in computing


Memory dumps: process where contents of memory are displayed and stored if an application of system crashes

HTML: HyperTextMarkupLanguage used in development of web pages ( markup language)
HTML is also used to represent colours on the computer screen (RGB) the intensity of each of these colours is determined by a hexadecimal value (#RRGGBB)

MAC: Media Access Control address is a unique hexadecimal number which identifies a device on the internet (usually made up of 48 bits: NN-NN-NN-DD-DD-DD
NN= (organisationally unique identifier) OUI (vendor number)
DD= (Universally Administered Address) UAA (unique serial number)

So why change a UAA into a LAA?
·       Certain software needs all MAC addresses of devices to be a certain format.
·       It may be required to bypass a MAC address filter on a router of firewall.
Web addresses:
ASCII-American Standard Code for Information Interchange – these codes can be represented using decimal or hexadecimal

Assembly and machine code:
Computer memory can be referred to directly using machine code or an assembly language

1.1.2(e):represent numbers stored in registers and main memory as hexadecimal



(representing binary into hexadecimal)

1.1.2(d): convert positive hexadecimal integers to and from binary:


e.g: convert 3F to binary.
3 = 3 F = 15   3 = 0011 F = 1111 3F=00111111


convert 01010011 to hexadecimal
0101 = 5 0011 = 3    ==53

1.1.2 (c): convert positive hexadecimal integers to and from decimal:


e.g: convert DE3 to decimal
D = 13 E = 14 so DE3 = 110111100011
=3555
e.g: convert 200 hexadecimal
200 = 11001000
= C8 (1100=12=C) (1000=8=8)

1.1.2 (b): show understanding of the reasons for choosing hexadecimal to represent numbers


hexadecimal is a lot shorter because every 4 bits of binary represents one hexadecimal digit. ( easier to read )

Takes up less storage


1.1.2 (a): represent integers as hexadecimal numbers


Hexadecimal system is base 16 (16 different values are used to represent each digit)
0-9 à 10 different values
A-F à 6 different values
Put them together to get 0-F à 16 different values

1.1.1(d): use binary in computer registers for a given application



When computer/ microprocessors are used to control devices, they use registers. These are a small amount of available storage used for a specific purpose and with quick access time. (basically, a group of bits)
e.g: An 8 bit register is used to control a washing machine,
1 = on 0 = off (Boolean)

1.1.1(C): Show understanding of the concept of a byte and how the byte is used to measure the memory size




1 byte = 8 bits
1 kilobyte = 8 kilobits
1 megabyte = 8 megabits
e.g: The upload speed on the internet is 32 megabits per second. How long would it take a 40 megabyte file to upload?
First, convert the megabits into megabytes:
8 megabits = 1 megabyte    32 megabits = 4 megabytes
4 megabytes per second. 40 megabyte file. 40 / 4 = 10 seconds to transfer