01/10/04 www.eej.ulster.ac.uk/~ian/modules/COM347J1/COM347J1_SUMS.p pt SUMS/1/21 COM347J1 Networks and Data Communications Ian McCrum Room 5D03B Tel: 90 366364 voice mail on 6 th ring Email: [email protected]Web site: http://www.eej.ulst.ac.uk Sums Lecture (and Tuts on ohp 15, 17 & 19)
21
Embed
01/10/04 ian/modules/COM347J1/COM347J1_SUMS.ppt SUMS/1/21 COM347J1 Networks and Data Communications Ian McCrumRoom 5D03B Tel: 90.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
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
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?
)(
)()(
xLog
yLogyLog
z
zx
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
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)