Title: SUMS121
1COM347J1Networks and Data Communications
Sums Lecture (and Tuts on ohp 15, 17 19)
- Ian McCrum Room 5D03B
- Tel 90 366364 voice mail on 6th ring
- Email IJ.McCrum_at_Ulster.ac.uk
- Web site http//www.eej.ulst.ac.uk
2Binary and Hex
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
- 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 01001001 is 4 9
- E.g 101110 is oo101110 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, 82 10, one more than 9
3Basics
or
or
or
4Description
- 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.
5More
- 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)
6Mathematicians write that in the following way
7But 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
8You 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
9So 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 e2.718you can try it and you
will get the same answer look!
10When 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.
11Now 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 isnt 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). - theres more
12However 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)
13So 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
14Remember (or calculate) these
- 10dB 101
- 20dB 1001
- 30dB 10001
- 40dB 10,0001
- 3dB 21
- 6dB 41
- 26dB 4001
- NB Add dB, multiply the ratios
- 21 2 so log2(2)1
- 22 4 so log2(4)2
- 23 8 so log2(8)3
- 24 16 so log2(16)4
- 25 32 so log2(32)5
- 26 64 so log2(64)6
- 27 128 so log2(128)7
15Example 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 01000110 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) -
16Transmitted data
- Hex 0x46 is 0100 0110 , we write binary bit
zero on right
Start bit 0
Stop bit of 1
XX__01100010
XX
12 -12
0 1
17Now 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)
18The 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
19Tut 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?
20RevisionIll 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
21RevisionIll 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
- Shannons 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