 Today we want to start by answering this question. So what we looked at or finalised yesterday was the speed at which we can send our data and the characteristic of the signals, the bandwidth, the number of components. And we come up with a trend that we observed yesterday that the greater the bandwidth, the greater the data rate. And the other one we got to but we didn't really explain, the more components we use more bandwidth, but we made the point that the more components the more accuracy our signal has and the less errors we'll have. So we want less errors, more components in the sine equation, but we want a small bandwidth because of cost. Because we have a limited range of frequencies, the larger the bandwidth we actually use the higher the cost of our system. So there's a trade-off there. We'll try and illustrate again and give you a chance to calculate similar to yesterday but just a different example. Assume you have a transmission system between two devices, A sending data to B. We have a link directly between them. And typically with wired or guided mediums, the characteristics of the medium defines what bandwidth we have available. If we're using a copper wire and sending a signal across that, then there's only a range of frequencies that it will transmit correctly across that wire. We don't have an infinite range of frequencies. We don't have an infinite bandwidth available. The impact of what bandwidth our signal can be. So in unguided mediums like Wi-Fi, mobile phones or wireless communications, the bandwidth available is usually due to licensing or regulations. With Wi-Fi there are some regulations and there's a standard that says when you transmit, your signal should be no larger than 20 megahertz. That occupies one channel. If you use a larger, maybe you create a piece of hardware that uses a larger bandwidth, A it's against the standard, that is it doesn't meet the standard, and B the problem with using a larger bandwidth is that you'll interfere with more people. So usually there's a restriction on the bandwidth available in our transmission system. So in this case, let's say we have a restriction of 4 megahertz. That's the question on the slide. We have a bandwidth of 4 megahertz available. We can't go more at this stage. So then the question is if we know that's the characteristic of our transmission system, then we want to ask how fast can we send data across this link? So what we do is we construct a signal at the source, construct a signal so mathematically we can look at it from, we construct an equation that is made up of sine waves added together, we transmit that, must occupy a bandwidth of 4 megahertz, and it will be received. The question is how fast can we send bits from A to B given a particular signal? Let's say we construct a signal which has two sine components. And to keep things simple, we're going to use this structure of the equation, sine 2 pi ft plus 1 third sine 2 pi 3 ft. If we had three components, it's plus 1 fifth sine 2 pi 5 ft and so on, always reducing the amplitude and increasing the frequency of each component. That's what we've seen in all our examples. Our signals don't have to follow that structure, but in our examples they are. It's an easy one to deal with. So given that, given that you can create a signal with two components, you add two sine waves together, you have a bandwidth of 4 megahertz, the question is what's the data rate that you can achieve? Find the data rate. Spend five minutes answering that question. If we have a bandwidth of 4 megahertz, what is the maximum data rate? What data rate can we achieve? And the hint is, think of the signal equation. Maybe even write the signal equation with two components, but think about what the parameters of that signal equation are going to be, and you want to arrive at the final data rate, the bits per second that we can send if we have a bandwidth of 4 megahertz. I'll give you five minutes to try that. If you can answer that, then that's maybe a typical exam question that you can expect. This just as a reminder, this was the equation from one of our previous examples where we had a, if we look at the two components, sine 4 pi t plus 1 third sine 4 pi t. And we created this equation to follow some pattern. Each component that we add on, we divide by, the amplitude is one, in this case one third of the first one, and the frequency is three times the first one. Remember this was 4 pi t, the general equation is 2 pi f t, so f of this component, the frequency is 2 hertz, and the next component, three times the frequency of the first component. That was the way that we structured the equation, that is one third of the amplitude, three times the frequency. The next component, if we added the amplitude, five times the frequency. If we added a fourth one, we won seventh of the amplitude, seven times the frequency. Again, all signals do not have to follow this equation. But in our examples, we are, okay, it's easy, and B, it leads to this square wave. So given that approach, this equation doesn't give you the right answer. Think of the equation, in particular, what are the frequency values of each component going to be, to give you the bandwidth that you want of four megahertz. Just write that equation in a general form. I'm going to emit this 4 over pi amplitude at the front. The amplitude of the signal has no impact upon the bandwidth. It's just a multiplier of the, it changes the height. Whether it's 4 on pi, whether it's 100, it doesn't change the other characteristics. So I'll just emit that to keep it simple. So we have sine 2 pi f t. What is f? It's going to be the question. Plus one third, sine 2 pi 3 f t. That are our two components. What's the peak amplitude of the first component? I'm going to note that as A1. One, the multiplier at the front of the sine is one. And in the second component, what's the peak amplitude, A2? The multiplier in the front is one third, so that the height is one third of the second component. If we treat them separately, what is the frequency of the first component in this equation? I say it's f. Think of f as a variable. We don't know the value yet. So it's a little bit confusing, but the frequency of the first component, let's say, is f. And of the second component, 3 times f. So we don't know the value of f yet. Plot this signal in the frequency domain. Try and, if we go the long way to solve this, try and plot this signal in the frequency domain. Remember the frequency domain? Impulses for each component. The height of the impulse is the peak amplitude, and the frequency of that impulse is the frequency of that component. In the frequency domain, we have the frequency on this axis, and here the peak amplitude. I'll just write the amplitude, A and P. And to plot, in the frequency domain, we have two components, so we'll have two impulses. One, what is the frequency? The f. The height, one. The second component, 3f. Height is one third. So don't get confused with these values of f. Think that it's just a variable. We'll find the value in a moment. What's the bandwidth of this signal? Remember, it's the width of the spectrum. The spectrum goes from 1f up to 3f, so the bandwidth will be 2f. 3f minus 1f. So with this signal, whatever value f is, when we have two components using this equation, the bandwidth will be 2f. Now you can solve your problem, because in your case, you know the bandwidth. We gave you a bandwidth of 4 MHz. You know the bandwidth is two times the frequency of the signal. 2f equals 4 MHz. What does f equal? I think people are seeing now. Remember from the start, we said the bandwidth was 4 MHz, which is equal to 2f, which means f equals 2 MHz. If f is 2 MHz, then in our plot, if this is 2 MHz, this would be 6 MHz, and the bandwidth would be 6 minus 2 4 MHz. Well, that's what we want. So f1 would be 2 MHz, f2 would be 6 MHz. What's next? Once you know the frequency, we want to find the data rate. Remember the assumptions we made yesterday? Within one cycle, within one period, we have a high and a low. Two bits can be transmitted. So within one period, we can send two bits. How many bits per second? We don't have a plot in the time domain, but if you remember, or if you look on your handouts, that's the top left one, or the shape is that goes up, and some humps at the top then comes back down, and then that's one cycle. And in that one cycle, we're saying represents a bit one and a bit zero. Remember the signal is high for some period of time and then low. We're saying that that could be used to transmit two bits, just to remind people, let's bring up that plot. I think you have this one in front of you, this time domain plot. Although it's a different time scale here, we're saying in one period, one cycle, the signal has a high duration and a low duration. We're saying that this can be used to represent the transmission of one bit, and this is a second bit, for example, bit one, bit zero. So two bits in one period. We can send two bits in one period. What's the period of our signal? Well, the inverse of the frequency. One divided by two megahertz. One divided by two is a half mega, becomes micro. Half a microsecond. Or we can think four bits in one microsecond. In half a microsecond, two bits, therefore in one microsecond we can send four bits. What about one second? Four megabits, a million microseconds in one second, therefore four million bits in one second. That's our data rate, four megabits per second. So this was the same calculation we did yesterday with that simpler two-hertz signal, except we've sort of gone backwards. Yesterday I gave you the frequency. We determined the bandwidth and then the data rate. This time I gave you the bandwidth. You work backwards to give the frequency and then work out the data rate. But the same approach. Any questions on the steps used here? So if there's no questions, set the bandwidth to eight megahertz. See what data rate you'll get. What if the bandwidth was increased to eight megahertz? Instead of four, what if we had eight megahertz available? What data rate could you achieve across our link from A to B? So try quickly to calculate the data rate in that case. And if you've done that, if you've done eight megahertz, try it with three components and eight megahertz. Currently we're using just two components in our signal equation. Any questions? Try it with a bandwidth of eight megahertz. Same approach. With two components, the same general signal equation. So you can use the signal equation from before. I'll write it again though. The spectrum is still the same as before. It goes from F or it includes F and 3F. So rather than plotting in the frequency domain, we know there will be two impulses of F and 3F. So same as before. And the bandwidth is the width of that spectrum, 3F minus F, 2F. So nothing's changed from the general equation perspective. But remember, we know the bandwidth. It is eight megahertz, which implies F is what? Question? Mm-hmm, no one. So the general equation we have is one and one-third. Yes, the third. If you've done with eight megahertz and trying with three components and eight megahertz, then the third component is one-fifth and 5F. This is just a pattern that we're using to create that signal equation. Divide by an odd number. One-third, one-fifth, one-seventh. 3F, 5F, 7F. But in this case, two components is the same general signal equation. It implies F, the frequency of our signal is two megahertz, four megahertz. The period, T, is the inverse of the frequency. One divided by four by 10 to the power of six is a quarter of a microsecond. One divided by four is 0.25. One divided by 10 to the power of six is 10 to the power of minus six. Micro. Same as before. Assume two bits per period. Then find the data rate. Okay, good. Two bits in one period. Two bits per 0.25 microseconds. Therefore, in one microsecond, eight bits in one second, eight million bits. If you want to use your calculator, I'm just going through the steps slowly, but two divided by 0.25 micro. Two divided by 0.2 by 10 to the power of minus six is eight by 10 to the power of six. Once again, it's showing this trend. Increase the bandwidth, increase the data rate. Given all other conditions the same, given that we've still got the two components, our doubling of the bandwidth doubled our data rate. Okay, any questions? If I told you before that the bandwidth doesn't change the data rate, I was wrong, okay? Or I misspoke, that is, yes, the bandwidth and the data rate are related. So with all the conditions the same, so in this case, the other conditions are the number of components, for example. If we have two components for our signal, and we did in both of these cases, and we increased the bandwidth, everything else is the same, then the data rate will increase. So yes, there is a relationship between the bandwidth and data rate, generally. Increasing the bandwidth increases the data rate. But if you change some other conditions, it may not increase. So what other condition? Try the third one with three components in the signal equation and a bandwidth of eight megahertz. So still eight megahertz, but use three components in your signal equation. Three components, so the first two are the same as before, plus one-fifth sine two pi five FT. These two components are identical to before, nothing's changed, but let's add a third one. One-fifth sine two pi five FT running out of space. Given a bandwidth of eight megahertz, find the data rate. You can either draw the spectrum or just look at what are the frequencies of each of those three components and then determine the bandwidth. Now go look at the data rates, the components, and the bandwidth, and look at the trend that you observe. What's the frequency of the first component? F, second one, three F, third one, five F, bandwidth goes from one F up to five F, so the bandwidth is four F, but we know the bandwidth is eight megahertz. Four F equals eight megahertz, therefore the frequency of this signal is two megahertz. Then you can determine the data rate and you've done the calculation already. We must set F to two megahertz, the period is one divided by two megahertz is half a second, half a microsecond, all right? And as before, two bits per period. Frequency of two megahertz would give us components at two megahertz, six megahertz, 10 megahertz, two up until 10 megahertz, give us a bandwidth of eight megahertz, okay? That's what we started with, that's correct. The so frequency of two megahertz, the period is the inverse, one divided by two is half, one divided by a mega is micro, half a microsecond. We're under this assumption always, in all cases, two bits per period. We may change that later next week, but that's the normal assumption, two bits per period. So two bits per half a microsecond, four bits per microsecond, four million bits per second. Our data rate is four megabits per second. Compared to the previous one, we had two components, eight megahertz bandwidth. We got a data rate of eight megabits per second, same bandwidth, but three components now, our data rates dropped down to four megabits per second. And we saw the trends yesterday, but we'll summarize it once more. I'll just summarize the values that we have. The first one, we had two components, four megahertz, and achieved four megabits per second. Then with two components, eight megahertz bandwidth, we got eight megabits per second. This is on the lecture notes, but from this data, increasing bandwidth increases data rate. So if we want a high data rate, we need a higher bandwidth, given all other factors the same. So that's important. Given we don't change the number of components, if we just increase the bandwidth, it's our data rate. But we had a, I'll just repeat that one, where we had two components, eight megahertz, and eight megabits per second. Then we did one with three components, same bandwidth, we got a lower data rate. What's the trend we observed there? Well, maybe look upside down or backwards, going up, decreasing the number of components can increase the data rate. That's the good thing there. If we go from three down to two, we increase the data rate when the bandwidth is the same. Or using more components in our signal gives us a lower data rate. What are the components? We said yesterday, components are what? How are they, why do we care about them? Accuracy, that is, the more components we have in our signal, if you remember our plots in the time domain, the more we add together, the closer we get to our square wave. And we'll see, we won't get chance to see today much, but next week we'll see more examples of how different signals with different accuracy, how they lead to errors. The less accurate the signal, the more chance of errors, which we want to avoid. We don't want errors. So more components, more accuracy, but lower data rate. What can we say? I'll say increasing signal accuracy, the number of components decreases data rate. So there's a trade-off there. We want it to be accurate, but we also want a high data rate. Accurate means less chance of errors. So if we have a high data rate, but we may get many bits sent, but many errors. And errors means, actually, we don't receive the data correctly. So there's a trade-off there. And here there's a trade-off. Increasing the data rate, good. We'll just increase the bandwidth. But in fact, we have hard limits, so we have limits on the bandwidth. If we want to use more bandwidth, it usually requires more cost. So you need to, for example, if you're a mobile phone company and you apply for a license, then that license covers a particular bandwidth of frequency. So you pay your one billion baht to use that bandwidth for some period of time. If you want to send faster, maybe you pay for another license for another bandwidth to increase the bandwidth. But of course, it costs money. So again, a trade-off. We want high data rate, but we want low bandwidth because of the cost involved. So the calculations we went through were for some simplistic cases, a simple signal with two or three components. We made some assumptions that two bits per period, but just to show these trends, that was the main purpose there. And those trade-offs or trends are summarized on this slide. Bandwidth, bandwidth is a limited resource. And as a result, the more bandwidth we use, the greater the cost involved. Therefore, we want to keep the bandwidth usage low. So in most transmission systems, it may be fixed. That is, here you have this much bandwidth, send as much data as possible. So we can't just have an infinite bandwidth. Data rate, this point is saying that we can approximate digital data, our square wave form, by some signal. That's what we've been doing. A perfect square wave, we've approximated with either two components, three components or more. Generally, the greater the bandwidth, the greater the data rate. We want high bandwidth to give us a high data rate, but we want a low bandwidth to give us a low cost. It's a trade-off. Accuracy, and we're missing a statement down here, my slide, I typed it in, but when I produced the PDF, it cut off the most important part there. The last part is, what did it say? Accuracy, the less errors, with a larger bandwidth, we get less errors. The larger bandwidth we use, the less errors we get. So write that one in. Larger bandwidth or greater bandwidth, less errors. Errors is a measure of accuracy. So we want to use a large bandwidth to get less errors. And we want to use a large bandwidth to get a high data rate. But we want to use a low bandwidth to get a low cost. This aspect about the receiver we'll see in the next section about the transmission impairments. So we'll talk more about accuracy errors in a moment, but on the other aspects, any questions before we move on? You want your Wi-Fi network to be fast. You want to have an increased data rate. Then usually the access points have an option to double the bandwidth, to use two channels at once. What's it called? Sometimes it has a marketing name, but you can set up in your Wi-Fi access point an option to use instead of one channel at 20 MHz, use two neighbouring channels at 40 MHz. Effectively, doubles your data rate. So you can, instead of standing at 54 Mbps, you can go 108 Mbps. That's the concept that we're seeing here. With Wi-Fi, it's free to use. But what's the problem of using double the bandwidth with Wi-Fi? Well, the problem is it interferes with other people. When someone else has, and then your neighbour uses their access point, if you're both using the same frequencies, you can interfere with each other, producing errors. So there's some other problems to increasing the bandwidth with Wi-Fi. We're not going to cover this at the moment, analog and digital data. We'll see some examples of that next week. Let's go direct to the transmission impairments. And that's what we'll talk about today for the rest of the lecture. Noise and attenuation. So transmission impairments are about what can go wrong. We've got our communication system, A sends data to B by transmitting a signal. Unfortunately, our transmission system is not perfect. What we transmit out from A, and what is received at B may be different. So we transmit a signal, B receives a different signal, because for some reason, the transmission is impaired. What is the reason? There are multiple reasons. We're going to focus on just two. So the problem is that the signal received may be different from what was transmitted. The result of that depends upon what we're transmitting. If we're sending bits, so if our data that is being transmitted is digital, we're sending bits, then it means we may have bit errors at the receiver. I send a sequence 10101. And they send a signal, the received signal means the receiver interprets that, is 11111. The bits received are different from what is transmitted, so we get bit errors. We'll see why, or we'll see some examples of why. If we've got analog data, like audio, for example, then it may mean that the signal that is received is degraded. So when I talk on the lecture system, my voice travels to the microphone through some cables wirelessly to a box here, through an amplifier up to the speakers, and then down to your ears. The exact signal that I produce is not the same as what you hear, because there may be impairments in this transmission system. Maybe there is some electrical interference in the amplifier, such that you hear some hissing noise as well. So we'll look at some of those impairments. There are different impairments, different things that can go wrong. Some of them are listed here. We will look at just two. The two may be the most significant and the easiest to understand, attenuation and noise. These other ones, and they're on the slides, attenuation distortion is related to attenuation, delay distortion, we will not discuss, even though it's on the slides, we'll skip them. Just attenuation and noise. Attenuation is the fact that when we transmit a signal, that signal gets weaker across distance. It attenuates. Any questions about attenuation? Okay, that's very simple. So when I'm talking to you, comes out of my voice is at this level, if I turned off the microphone, the signal strength, so if we look at our plot of our signal, the amplitude of the signal reduces as a function of distance. By how much, that is how much weaker is the signal across one meter or two meters. In the next topic, we'll see some equations or models that allow us to calculate. If we transmit some signal at this strength and the signal travels 100 meters, how much weaker is it at the receiver? But today, we're just saying that it reduces in strength. How can we make it larger? So attenuation means the signal gets weaker across distance, but in some systems, we can make the signal larger than the source, how? In this audio system, what do we use such that you can hear a larger sound, the amplifier? An amplifier takes a signal as an input and increases the amplitude. It amplifies to try and overcome the degradation of attenuation. So we can't avoid that. The signal strength reduces as a function of distance due to the physical properties. When we design a transmission system, the receiver has some electronics that receives a signal and tries to convert it back to bits if it's digital data. The signal received by the receiver must be strong enough such that that receiver can interpret it as a signal and not just think it's some noise from some other sources. And that leads to the fact that the received signal should be much higher than other signals, and in particular, noise. An example is that, so we have some people at the back. Can you hear me at the back? Put your hand up. Can you hear me? More than one person. The back row, the best in the lecture room, can you hear the amplifier, the microphone? And I want you to let, hold your hand up if you can still hear me. Can you hear me? As I talk quieter, the signal coming out of my mouth was weaker and weaker. The signal, as it travels the distance to the back of the room, gets weaker, it attenuates. Okay, it gets weaker. So that was the problem. They couldn't hear me. I transmitted a signal at this strength. As it traveled the distance, he got weaker and weaker. They received a signal, but it was so weak, it was so small that their ears could not interpret the information, okay? So there still was an audio signal received by your ears at the back, but the receiver could not make any sense of it. Most likely because there's other sound coming. Another example, people at the back, can you hear me? Put your hand, microphone off. The idea is that even if I, so when there's no noise, I'm talking at a strength such that they can hear me, but as there's other transmissions, other noise from other sources, even though I'm talking at the same strength, they are receiving my signal plus they're receiving noise from other transmissions. And it gets to a point if the noise is very large compared to my signal that you receive, you will not be able to understand my signal. So for the receiver to successfully receive, the signal from the transmitter that they receive must be much higher than the noise. The larger the noise, the other transmissions, the more chance of errors. So that's all we want to say at this stage about attenuation. A signal gets weaker across distance and for a receiver it must, it would be designed in a way such that there's usually a minimum signal strength that it is capable of understanding. Distortion will avoid. Same with delay distortion. What about noise? In this room, I tried to get everyone to talk to create some noise. Well, they were creating with respect to the receiver's noise. They were transmitting other information at the same time. There are different types of noise. These two slides lists thermal noise, intermodulation noise, crosstalk and impulse noise. We will not say too much about them. Thermal noise is just, well, electrons move as they agitate, it creates some noise. And it's a noise that's present in every system. It's something we cannot avoid. There's ways to calculate it. We don't care how to calculate this, just for reference if you want to look. It's regarding the temperature and some other constants and the bandwidth of the signal. But it's a noise that's present in every transmission system. So no matter about the other aspects of noise, there's always thermal noise. But luckily it's usually quite low. So think of, if everyone stopped talking in the lecture, we turned off the air conditioners. There would still be a small amount of noise that you'd hear. Maybe your ears cannot detect that noise, but there's always that small amount of thermal noise present. So that's one aspect of noise, but usually so small that it's not an issue. Let's skip, we'll come back to intermodulation. Impulse noise is some short peak or spike in noise. Usually due to some unexpected of some error. There's a lightning strike. If there's a large increase in the amount of energy in the electrical system, we can think of that as an impulse or a spike of noise. And that can disrupt communications. Some electrical disturbances. So with the amplifier, there may be some other electrical devices that create some disturbance which cause problems. Some errors in the design of the system may cause what we call impulse noise. We'll see a plot or some pictures of it in a moment. The other two I will not explain, but just use a general example. Cross talk when we have multiple signals which effectively interfere with each other. And intermodulation noise when we have a signal with each of the frequencies interfering with each other over time. Think of them as other transmitters interfering. If I'm a transmitter sending to a receiver, there's one signal transmitted, but if at the same time someone else transmits to the same receiver or to another receiver, then those two transmissions can interfere with each other. From the perspective of my transmission, the receiver receives my transmission, but they also receive a signal from someone else. And that other signal is thought of as noise. So that was that example. The more people talking, that was creating more noise from other transmitters. Just be aware that noise, there are different causes of noise in communication systems. There's always some noise present. And the major things that we need to deal with is the fact that, well, if there's other transmissions, especially in wireless systems, we can have interference or larger noise. And if we have some error or some occurrence of a lightning strike or some disturbance that causes a sharp increase in noise. So that are the common ones that we'll come across. Let's look at noise from a and see the impact of noise on a sequence of bits being transmitted. Here's an example where we have some data to send from source to destination. This is the sequence of bits that we want to send. So some random sequence of bits we want to get from A to B. We convert that digital data into a signal. In this case, we're using a perfect square wave form to represent data. Note the signalling scheme. How do we convert bits to a signal in this case? What's the definition? In this example, how do we convert bits to a signal? What would you describe it? If you look at the bit sequence of bit ones and zeros and you look at that square wave, what's the rules that we use? Look at one, zero, one. Can you see the pattern? Bit one, a low signal, bit zero, a high signal. The opposite of what we were using in the previous examples, but a common approach. But for one bit, one level of the signal and for the other bit, a different level. So two levels of the signal, each level represents a bit. In this particular case, think of it as minus five volts for bit one, plus five volts for bit zero. So what we do when my transmitter has a bit one to transmit, it transmit a signal at minus five volts for some short period of time for this duration. And then, all right, next bit is a bit zero, so I switch to plus five volts and transmit a signal at that level and keep changing the signal amplitude based upon the bit that I need to transmit. So this is one example of converting bits to a signal. This signal, I think, is transmitted across our transmission system. But our transmission system also has noise present. So I transmit my signal to the receiver. What the receiver receives is my signal plus all the noise from the system. So in this case, well, what's noise look like? Well, often we think of noise as some random variations in a signal. Thermal noise is some small variations that we can, if we measure, it's just some small random up and down in terms of a signal. But sometimes we may have some large disturbance, maybe some electrical fault, which causes a large increase in the noise or maybe someone else transmitted at this time. So in this example, the noise is some random variations with two points, some large increases in noise. This is a positive value. This is a large negative value here. Usually we do not know in advance what the noise will look like in a communication system, but we can have models of what it would, we expect it to be like, how high it would be. So what's received? The receiver receives, think of the transmitted signal plus the noise. And if you add them together, you get this. You see the shape that it's, all right, this if this was minus five, plus, and in the middle is zero, plus some small variations, so it's varying around minus five here. And then at this point, if it's plus five, then plus some variations, so it's going, I don't know, up to plus 5.5, down to maybe plus two here. So it's just a summation of these values. And you see the pattern. You can almost see the shape of the original waveform, the original digital signal. So think of this is what the receiver receives. Their task now is to convert that to bits. That's what we want to do, get these bits to the receiver. So one approach is the transmitted signal, we transmitted minus five or plus five volts for some period of time. Let's say for one millisecond, this is. We don't have it on this plot. This is one millisecond, one millisecond, and so on. So what the receiver can do is every one millisecond, maybe in the middle of the one millisecond, so after half a millisecond, record the value of the received signal. So this sample time indicates at this time, record the value and says, if it's negative, if it's below zero, then assume the bit we received is a one. Remember our scheme was for bit one, transmit negative or low value, say minus five volts for bit zero plus five volts. So if we receive a negative value, assume a bit one was transmitted and say that data received, this is negative, data received one. One millisecond later, record again. The signal here is plus 4.7, it's positive there, and keep doing that. Keep taking samples of the received signal. If it's negative, assume bit zero is received. If it's positive, assume bit one is received. I've got that back to front. If it's, let's write it down, then we'll finish this lecture. Just to be clear for this example, the transmitter, TX, the short for transmitter, is sending for bit one, it sends, let's say, minus five volts. That's the level, and a bit zero plus five volts. And we'll try and draw what happened there. The transmitter transmits a signal, but there's also noise, and we think the noise is added. And what's received by the receiver is the transmitted signal plus the noise. So you can think mathematically, we add the transmitted signal plus the noise and that becomes the received signal. And what the receiver does, if the signal is negative, then assume it's a bit one. If it's positive, assume it's a bit zero. But it does it at a particular sample time. So this is, the receiver says, okay, measure the signal strength received. If it's negative, let's assume we've received a bit one. If it's positive, bit zero. That's the steps that are being applied here. And we're assuming, let's say, just to give numbers to it, each bit is transmitted for, let's say, one millisecond. That is, the signal is maintained at that level for one millisecond, minus five volts for one millisecond. Then switch to the other value for one millisecond. So back to the received signal. We take a sample, it's negative. According to the receiver rules, that means a one is received. It's positive, zero is received, negative one. And we keep doing that. As we receive the signal, we convert it to bits. Now we see that there are two bit errors. At this point here, all right, at this, what do we got? One, zero, one, zero, zero, one. The next bit we measure, and we get a positive value of the received signal. We take a sample. The signal strength is above zero volts. Therefore, according to our rules, if it's above zero volts, a bit, I got this, a bit zero is received. If it's positive, bit zero. So the receiver thinks it got a bit zero. But we know the original data was actually a one. So this is a bit error occurring because of the noise. Because you see at this time, the noise is large. And you think that the transmitted signal was minus five volts. But the noise was large enough, let's say up to plus six volts. So you go from minus five volts, plus six volts, and it brings up to plus one. So the noise was large enough such that it swapped the level of the received signal. And as a result, we get a bit error. And in this case, it happens in the second to last bit as well. We sample it's minus something, minus 4.5 volts, minus value, a negative value means a bit one, bit one received. The receiver doesn't know that there's an error, but we know because the transmitted data was a zero. And it's because of this large amount of noise here. Noise causes bit errors with digital data. The more noise, the more chance of errors. If you can imagine that there's noise, there's a large impulse here. There's a chance that there would have been a bit error at this time. Any questions on this slide? Usually we cannot predict what the noise will be. So in this example, let's say we measured it, but, and usually the noise is random. So today it may affect this bit, some random variation, but sometime later, we may be lucky and it doesn't affect the bit, okay? So we need to look over a long period of time as to see what's the impact of noise. So in this case of a sequence of what, 16 or 20 bits, two bits were in error. But if we send another sequence of bits the same length, we may be lucky and the noise will be small and we'll get no errors. But if we send another sequence, we may be unlucky and the noise is large because it's some unpredictable variations and we may get more bit errors. Usually we look at average noise levels. And we should stop there for this lecture. What we'll do to finish this topic, the next few slides we'll see that there are some easier ways to relate bandwidth to data rate. We've gone through the manual steps to calculate, but they don't always apply. But some people have come up with some equations that we can use that apply in more general cases that relate bandwidth and data rate and some other factors together. So we'll see them in the next lecture.