1 / 21

COM342 Networks and Data Communications

COM342 Networks and Data Communications. Sums Lecture (and Tuts on ohp 15, 17 & 19). Ian McCrum Room 5B18 Tel: 90 366364 voice mail on 6 th ring Email: IJ.McCrum@Ulster.ac.uk Web site: http://www.eej.ulst.ac.uk. [0000] = ‘0’ [0001] = ‘1’ [0010] = ‘2’ [0011] = ‘3’ [0100] = ‘4’

osanna
Télécharger la présentation

COM342 Networks and Data Communications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COM342Networks and Data Communications Sums Lecture (and Tuts on ohp 15, 17 & 19) Ian McCrum Room 5B18 Tel: 90 366364 voice mail on 6th ring Email: IJ.McCrum@Ulster.ac.uk Web site: http://www.eej.ulst.ac.uk www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  2. [0000] = ‘0’ [0001] = ‘1’ [0010] = ‘2’ [0011] = ‘3’ [0100] = ‘4’ [0101] = ‘5’ [0110] = ‘6’ [0111] = ‘7’ [1000] = ‘8’ [1001] = ‘9’ [1010] = ‘A’ [1011] = ‘B’ [1100] = ‘C’ [1101] = ‘D’ [1110] = ‘E’ [1111] = ‘F’ Binary and Hex • Hex is just a shorthand way of writing binary • Binary is always written with b0 on the right • Hex always considers the binary is split into groups of 4, starting at the right • For each group of 4 binary bits, use the table to look up what single character to write down in place of the 4 bits • E.g 01001001 is [0100][1001] is ‘4’ ‘9’ • E.g 101110 is [oo10][1110] is ‘2’ ‘E’ • Unfortunately data is transmitted bit zero first, usually drawn with bit zero on left if drawing square waves, also RS232 uses –12V for ‘1’, +12v for ‘0’ • We could use “base-2” or “base-16” arithmetic, let the 4 bits have weights 8421 So ‘A’ = 1010, 8+2 =10, one more than 9… www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  3. Basics or or or www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  4. Description • In English we would say 2 to the power of 3 is 8. In other words 2 must be multiplied by itself 3 times in order that the answer 8 is achieved. • What is 210 equal to? • come on do it • The answer is 1024 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  5. More • Whenever you wish to work in reverse you use a different way of describing the problem. • One might say “to what power must I raise 2 to in order to produce the number 32?” • And of course the answer is 5 • Another way of expressing that is by saying “what is the log of 32?” (really should say log to the base 2, or mathematically log2) www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  6. Mathematicians write that in the following way www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  7. But what if you are asked the following questionWhat is Log2 1000? - you know that it is less than 10 because Log2 1024 is equal to 10 but what is the exact value? Here is a useful formula which shows you how to do it - What that means in practice is - consider the log button on your calculator, it works to some base usually 10 but it could have other values www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  8. You just take the log of the number you want the log2 (log to the base two) of, and divide it by the log of the number 2. Look at the formula again The x is the value 2 and the z is the base to which your calculator works (normally 10) so www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  9. So we were right, the answer is just less than 10 If your calculator has a ln button that is log to the base e where e=2.718you can try it and you will get the same answer look! www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  10. When ever people have very big numbers or very small numbers, they might choose a different way to present them. This is also true if they have some property they wish to highlight One such case is power ratios in electronic circuits. A person might wish to describe the ratio as1 : 100 or 1 : 1000000 or 1 : 100000000, you like me, might find it difficult to decide what the actual ratio was when it is so written. www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  11. Now that you know about logs you might describe the ratios on the previous slide in terms of log to the base 10. 1 : 100 as 2and 1 : 1000000 as 6 and 1 : 100000000 as 8 Now isn’t that more tidy and it also make you concentrate upon the important thing about the number, its magnitude, not its precise value(these are Bells). - there’s more www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  12. However this can go too far and because of the nature of the value that we use the range would be limited from 1.0 to 9.0 and we would need to include the decimal point to give the required accuracy to our calculations.So we go one step further. We multiply the log of the ratio by 10 and leave out the decimal point. And we call them deciBells ie 1/10th part of a Bell. (dB) www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  13. So if you wish to find out the precise value of a ratio which is expressed in dB for example 40 dB Take the 40 divide it by 10 so it is now in Bells thus 4 B and raise 10 to the power of the number Ie 104 = 10 x 10 x 10 x 10 or 10,000 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  14. 2^1 = 2 so log2(2)=1 2^2 = 4 so log2(4)=2 2^3 = 8 so log2(8)=3 2^4 = 16 so log2(16)=4 2^5 = 32 so log2(32)=5 2^6 = 64 so log2(64)=6 2^7 = 128 so log2(128)=7 10dB = 10:1 20dB = 100:1 30dB = 1000:1 40dB = 10,000:1 3dB = 2:1 6dB = 4:1 26dB = 400:1 NB Add dB, multiply the ratios Remember (or calculate) these www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  15. Example Tut Questions • Q1: Given the ASCII code for the letter ‘F’ is 0x46 draw the binary pattern transmitted if the following data format is used • (a) One start bit, 8 data bits and one stop bit 8N1 • (b) One start bit, 8 data bits, even parity and one stop bit 8E1 • (c) One start bit, 7 data bits, odd parity and two stop bits 7O2 • Ans1: [0100][0110] so b0, bit zero, the least significant bit is on right. Remember unfortunately data is transmitted bit zero first, usually drawn with bit zero on left if drawing square waves, also RS232 uses –12V for ‘1’, +12v for ‘0’ • Note parity includes all data bits and the parity bit itself, so a data word of 0100 0110 would need a 1 added to give even parity, parity bits are added after bit 7 ( or bit 6) www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  16. Transmitted data • Hex 0x46 is 0100 0110 , we write binary bit zero on right Start bit ‘0’ Stop bit of ‘1’ XX__[0][1][1][0][0][0][1][0] XX +12 -12 0 1 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  17. Now you can go and try Q1b and Q1c Be able to writing down the binary, calculating parity, adding stop and start bits and drawing the waveforms. • Related Questions: • Q2: Calculate how long in milliseconds it takes to send a 8N1 character at 1200 baud • Q3: How long to send “HELLO_WORLD” at 9600 baud assuming 8E2 • Q4: What is the overhead in sending a character in the format of 8N1? • Q5, Book (ed 3) Q22, Q23, Pages 75 (see .pdf) www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  18. The formulae! Nyquist: When there is no noise… a perfect channel carrying ‘V’ levels Shannon: When we have noise… a signal to noise level of s/n www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  19. Tut questions (3rd edition, p170-) • Q2-3 Analogue TV channels are 6MHz wide, how many bits/sec can be sent if 4 level signals are used, ignoring noise • Q2-4 A binary signal is sent over a 3kHz channel whose signal to noise ratio is 20dB, what is the maximum data rate possible • Q6 If a modem uses 4 amplitude levels and 4 phase values how many different bits of information can be sent in a single data change. • Q7 (a) If the signal to noise ratio in Q2-4 changes to 30dB what is the new maximum data rate? (b) for 36db? www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  20. Revision…I’ll repeat this • Address the following areas in the recommended textbook • general issues pp1-7 • network hardware ring v bus pp7-10 • wide area networks pp11-16 • network software - layers pp16-22 • connection oriented / connectionless pp22-27 • services, protocols peers pp27-28 • OSI reference model and layers pp28-34 • TCP/IP pp35-39 • Internet pp52-54 • Standards who and why? pp67-72 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

  21. Revision…I’ll repeat this • Syn/asych transfer • Physical layer - bandwidth limited pp86-87 • baud v bits per second pp88-89 • Nyquist max data rate pp 89-90 • Shannon’s max data rate pp 90 • Media: (tape), UTP, Coaxial cable, • FOC, Tx light, Light sources, Wireless, • Radio,microwave,IR, pp 90-99 • Modems baud v bps pp125-127 • modulation methods pp127-130 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_SUMS.ppt

More Related