Copyright 2007 Jim Martin1 Computer Communications Dr. Jim Martin
Copyright 2007 Jim Martin2 Data Communications Internet Explorer, FireFox Access Link: Dialup, DSL, Cable Modemrouters Links
Copyright 2007 Jim Martin3 Data Communications How does a computer send data to another computer? 1.They need a physical connection (called a link). 2.Data is encoded and transmitted as energy. 3.Energy is decoded at the destination back into data. 4.Each form of energy has different properties which explains why some connections are high speed and other connections are slow
Copyright 2007 Jim Martin4 Data Communications Simplest approach - use varying voltages to represent 1s and 0s One common encoding use negative voltage for 1 and positive voltage for 0 In following figure, transmitter puts positive voltage on line for 0 and negative voltage on line for 1
Copyright 2007 Jim Martin5 Back to the binary number system Let’s say one computer transmits the message ‘hello’ to another computer. Each letter is mapped to a unique number in the range of 0 to 255. The mapping is called the ascii character set: Decimal Character 97 a 98 b …. 122 z Decimal Character … Decimal Character 65 A 66 B …. 90 Z
Copyright 2007 Jim Martin6 Back to binary When ‘hello’ gets sent, the following decimal numbers are sent: We have now seen the message ‘hello’ in two formats: ascii and decimal Remember what decimal format means: A decimal number is a number (e.g., 104) that has a number of digits with the value of each digit ranging from 0 to 9. Each digit represents some number of 1’s, 10’s, 100’s, … Example: 104 in decimal: (1 * 100) + (0 * 10) + (4 * 1) = 104
Copyright 2007 Jim Martin7 Back to the binary number system Binary numbers are a number system made up of 0's and 1's. In base-10, the weight of each digit is based on 10EXP#digit Digit# The magnitude of the first 8 places in binary notation are given by 2EXPdigit# (i.e., a base-2 number system and the digits are referred to as bits): Bit# Example: The number 10 interpreted in decimal is (1 * 10) + (0 * 1) = 10 (in decimal) The number 10 interpreted in binary is (1 * 2) + (0 * 1) = 2 (in decimal) Example The number 13 in decimal is (1 * 10) + (3 * 1) = 13 (in decimal) The number 13 in binary does not exist. Digits must by 1’s and 0’s To convert the decimal number 13 to binary: (1 * 8) + (1 * 4) + (1 * 2) + (1 * 1) = 13 More examples of converting between binary and decimal systems: 0x = 2 in decimal 0x = 8 in decimal 0x = 130 in decimal 0x = 255 in decimal
Copyright 2007 Jim Martin8 Data sent ‘over the wire’ The ascii message : hello In ascii format: hello In decimal format : In binary format: Each character requires 8 bits hello hello The least significant bit of the first character of the message is the first bit that is sent and the first bit that is received The most significant bit of the last character (the ‘o’) is the last bit that is sent and the last bit that is received
Copyright 2007 Jim Martin9 Data Calculations Each ascii character is a byte. A file that contains one million characters (letters, spaces, punctuation) would be 1,000,000 bytes large. If the hard drive in your computer can hold 1 Gigabyte of data, how many files (of 1,000,000 bytes) store ?
Copyright 2007 Jim Martin10 Data Calculations Each ascii character is a byte. A file that contains one million characters (letters, spaces, punctuation) would be 1,000,000 bytes large. If the hard drive in your computer can hold 1 Gigabyte of data, how many files (of 1,000,000 bytes) store ? Answer: / = 1000 files
Copyright 2007 Jim Martin11 Data Calculations Let’s say you send a 1,000,000 byte file to another computer. Your computer connects via some access connection to the Internet. How long does it take to transmit a 1,000,000 byte file over just your access link? Will receive 1,000,000 byte file Access Link: Dialup, DSL, Cable Internet Will SEND 1,000,000 byte file
Copyright 2007 Jim Martin12 Data Calculations An access link can send 56,000 bits per second How many bits in the file: 1,000,000 * 8 = 8,000,000 bits How long does it take to send 8,000,000 bits over the link? 8,000,000 bits / 56,000 bits/second = seconds Will receive 1,000,000 byte file Access Link: Dialup, DSL, Cable Internet Will SEND 1,000,000 byte file
Copyright 2007 Jim Martin13 Data Calculations How long does it take to send a 4.4 Gbyte DVD ?
Copyright 2007 Jim Martin14 Data Calculations How long does it take to send a 4.4 Gbyte DVD ? (4,400,000,000 * 8) bits / 56,000 bits/second = 628,571.4 seconds Which is 628,571.4 / 60 = minutes Which is / 60 = hours