DATA TRANSMISSION

For a computer to be able to perform any calculations, massive amounts of data have to be transmitted from one place to another within the computer, as well as transmitted to and from external devices. Remember, all data in computers is transmitted in binary code at the lowest level. This means that millions of 0s and 1s have to be transmitted every second that a computer is 'doing something'.

In this section we will look at two different methods of data transmission, their strengths and their weaknesses

SERIAL TRANSMISSION

In serial transmission, data is transmitted along a bus (a communciation system that transfers data), one bit at a time. Each bit is sent to the receiver in order. This is shown in the diagram below

This doesn't seem like a very quick way of doing things. And in many ways it's not. Let's compare it to parallel data transmission.

PARALLEL TRANSMISSION

Whereas serial can only take one bit at a time, in parallel, a whole byte is sent at once. Each bit is lined up individually and sent across at the same time. They are then put back in to order when they arrive at the receiving end. The diagram below explains this.

SO WHICH IS FASTER

You would instinctitely think that parallel data transmission is faster, and when run at the same frequency as serial it is. Parallel is, in theory, 8 times faster than serial since all 8 bits are transferred at the same time rather than having to go one after the other. However, when we increase the rate that we send the data, serial manages much better. At higher speeds, parallel data transmission has problems. For instance, because all of the bits may not arrive at the same time, the receiver has to wait until all are present before using the data. This often happens at higher speeds, and so there is a delay while all the bits are received. Also, at high speeds something called 'crosstalk' can happen, where bits from one signal line accidentally jump on to the other causing data corruption. This does not happen when using serial transmission as there is only one line. Therefore, in practice it is much safer to increase the speed of serial than parallel and it can therefore often be pushed to run at a higher speed. Also, the cost of parallel lines, over long distances can be high, which is another reason serial is often used instead.

SIMPLEX, HALF-DUPLEX AND DUPLEX

As well serial and parallel, connections are also broken down in to simplex, half-duplex and duplex (or full duplex). Simplex means that data can only be transferred in one direction. Half-duplex means it can be transferred in both firections, but only one way at a time, and full-duplex means the data can be simultaneously transferred in both directions. Take a look at the diagrams below to understand how these work.

simplex

halfduplex

duplex

 

DETECTING ERRORS

With all of the millions of pieces of data being transferred every second, a computer has to have some way of makign sure errors don't occur. one way of doing this is is called PARITY CHECKING.

When being transmitted, an errror can easily occur where one or more bits changes and becomes the opposite of what was intended. for example, 0101 could become 0100. It might not seem like much of a change, but it can have big implications.

Parity checking is a way of making sure that a byte of information has not been changed while being transmitted in a computer. A parity bit is added to the end of a group of bits. There are two types of parity check. Odd Parity and Even Parity. If we are using even parity and the parity bit is a 0, then it means that the number of 1s in the sequence should be even. If it is a 1, then the number of 1s in the sequence should be odd. If we are using odd parity and the parity bit is a 0, then it means that the number of 1s in the sequence should be odd. If it is a 1, then the number of 1s in the sequence should be even.

For example, consider the sequence of bits below:

1011011(1)

Here we are using even parity. This sequence has an odd number of 1s (5). The computer would therefore add a 1 parity bit to the end to tell whatever was receiving it that it shoud expect an odd number of 1s. The 1 has been added and is in red. Now look at the one below:

1010011(1)

Here we are using odd parity. This sequence has an even number of 1s. Therefore the computer would add a 1 parity bit to the end to show that there should be an even number of 1s. The parity bit has been added in red.

The receiver would check the parity bit at the end and compare it with the number of 1s in the sequence. If it was incorrect it would ask for the information to be resent.

Remember that the parity bit isn't included in the original count of the number of 1s to check for odd or even.

Remember, odd parity has a 0 if there are an odd number of 1s. Even parity has a zero if there are an even number of 1s

THE PROBLEM WITH PARITY CHECKING

Parity checking, whilst useful, is not perfect. Consider what would happen if the sequence 101101 was changed in error to 100001. Because there has been more than one error and there are still an even number of 1s, the parity bit would still be correct and the error should not be spotted.

CHECKSUMS

Another method of checking data is to use a checksum. Checksums are generally used with denary numbers rather than binary. They are used in a range of different scenarios which we will look at later.

A check digit is a number which is added to the end of a sequence of numbers. The number is a specific number which can be used by the computer to check whether all of the other numbers in the sequence are correct. The computer will perform a calculation (the CHECKSUM) on the numbers, and if the answer it gets is the same as the CHECKDIGIT on the end, then the number is valid.

For example, libraries use checkdigits on the end of a book's ISBN number. The ISBN number is an interntatiornal number used to identify each book. Below is an example of an ISBN number. The check digit is the 7 on the end.

Each time a book in a library is scanned, the computer will perform a calculation (checksum) to make sure the number is correct. The checksum for ISBN numbers is as follows: the computer multiplies each number in turn by either 1 or 3 like this. Remember to not include the check digit in your calculations:

(9x1)(7x3)(8x1)(1x3)(2x1)(3x3)(4x1)(5x3)(6x1)(7x3)(8x1)(9x3)

The computer then adds together the resuls of the sums

(9)+(21)+(8)+(3)+(2)+(9)+(4)+(15)+(6)+(21)+(8)+(27) = 133

Finally, the computer divides the number by 10 to get 13.3 and minuses the remainder from 10. The answer should be the same as the checkdigit. In our example it is as 10-3 = 7.

While this may seem complicated, remember that it only has to be programmed by a human once, before it can be calculated by millions of computers around the world in a fraction of a second.

There are many other types of checksums, such as the Luhn Algorithm used to detect incorrect credit card numbers. All the principles are the same though - the last digit is always used to check whether the others in the sequence are correct.

1) Explain the difference between parallel and serial data transmission

2) Using the ISBN Checksum, check whether the following number is valid: 9781-3525-4345-4