Thursday, October 13, 2016

Chapter 5: Making Connections Efficient: Multiplexing and Compression

Introduction

Under the simplest conditions, a medium can only carry one signal at a time. However, we want a medium that can carry multiple signals at the same time. The technique of transmitting multiple signals over a single medium is multiplexing. For multiple signals to share one medium, the medium must be divided to give each signal a portion of the total bandwidth. So a medium can be divided in three basic ways: a division of frequencies, a division of time, and a division of transmission code. Another way to make a connection between two devices more efficient is to compress the data that is transferred over the connection.

Frequency Division Multiplexing


  • Frequency division multiplexing (FDM) is the assignment of non-overlapping frequency ranges to each user of a medium. 
  • To allow multiple users to share a single medium, FDM assigns each user a separate channel
  • Channel: is an assigned set of frequencies that is used to transmit the user's signal
  • Multiplexor: the device that accepts input from one or more users
  • Demultiplexor: the device attached to the receiving end of the medium that splits off each signal to deliver it to the appropriate receiver
  • Guard band: a set of unused frequencies inserted between the two signals to provide a form of insulation to keep one signal from interfering with another signal
Time Division Multiplexing
  • Time division multiplexing (TDM) allows only one user at a time to transmit and the sharing of the medium is accomplished by dividing available transmission time among users.
  • A time division multiplexor calls on one input device after another, giving each device a turn at transmitting its data over  a high-speed line
1. Synchronous time division multiplexing
  • Synchronous time division multiplexing (Sync TDM) gives each incoming source signal a turn to be transmitted, proceeding through the sources in round-robin fashion
  • the demultiplexor on the receiving end of the high speed link must disassemble the incoming byte stream and deliver each byte to the appropriate destination
  • when a device has nothing to transmit, the multiplexor must still allocate a slot for that device in the high speed output stream, but the slot still be empty.
  • to maintain synchronization between sending multiplexor and receiving demultiplexor, the data from the input sources is often packed into a simple frame and synchronization bits are added somewhere within the frame
  • T-I Multiplexing
    - T-1 multiplexed stream is a continuos repetition of frames
    - The frame of the T-1 multiplexor's output stream are divided into 24 separate digitized voice/data channels of 64 kbps each.
    - Each frame consists of 1 byte from each of the 24 channels (users) plus 1 synchronization bit
    - The input data from a maximum of 24 devices is assigned to fixed intervals. Each device can transmit only during that fixed interval. and if a device has no data to transmit, the time slot is still assigned to it and data such as blanks or zero is transmitted
  • SONET/SDH Multiplexing
    - Synchronous Optical Networks (SONET) and Synchronous Digital Hierarchy (SDH) are powerful standards for multiplexing data streams over a single medium.
    - Both are synchronous multiplexing techniques
    - A single clock controls the timing of all transmission and equipment across an entire SONET network. Using only a single clock to time all data transmissions yields a higher level of synchronization because the system does not have to deal with two or more clocks having slightly different times
    - SONET defines a hierarchy of signaling levels, or data transmission rates, called Synchronous transport signal (STS)
    - Two common users for SONET are the telephone company and companies that provide an Internet backbone services
2. Statistical time division multiplexing
  • Statistical time division multiplexing (Stat TDM) transmit data only from active users and does not transmit empty time slots
  • To transmit data only from active users, the multiplexor creates a more complex frame that contains data only from those input sources that have something to send.
  • If a workstation is not active, no space is wasted in the multiplexed stream
  • A statistical multiplexor accepts the incoming data stream and create a frame containing the data to be transmitted
  • To identify each piece of data, an address is included

Wavelength Division Multiplexing

  • Wavelength division multiplexing (WDM) multiplexes multiple data streams onto a single fiber-optic line.
  • It uses different wavelength (frequency) lasers to transmit multiple signals at the same time over single medium
  • The wavelength of each different colored laser is called Lambda
  • Each signal can be carried on the fiber-optic line at a different rate, this means that a single fiber-optic can support simultaneous transmission speeds
  • Dense wavelength division multiplexing (DWDM): when WDM can support a large umber of lambdas
  • Coarse wavelength division multiplexing (CWDM): is designed for short distance connections and has only a few lambdas, with greater space between lambdas
Code Division Multiplexing

  • Code division multiplexing (CDM) allows multiple users to share a common set of frequencies by assigning a unique digital code to each user
  • Uses direct sequence spread spectrum technology that spreads the transmission of a signal over a wide range of frequencies using mathematical value
  • Each binary 1 and 0 is replaced with a larger, unique bit sequence
  • To send a binary 1, a mobile device transmits the unique code
  • To send a binary 0, a mobile device transmits the inverse of the code
Discrete Multitone

  • Discrete multitone (DMT) is a multiplexing technique commonly used in digital subscriber line (DSL) systems 
  • DMT essentially combines hundreds of different signals or subchannels into one stream and are destined for a single user
  • Each of the subchannel is quadrature amplitude modulated-256 subchannels, each transmits 60 kbps, yields 15.36 Mbps
  • Unfortunately, because of noise, not all 256 subchannels can  transmit at full speed of 60-kbps rate

Comparison of Multiplexing Techniques

Compression - Lossless vs. Lossy

  • Compression: is the process of taking data and somehow packing more of it into the same space
  • When data is compressed for transmission, it transfers more quickly, results in a more efficient connection
  • It also allows more data to be stored in the same amount of disk space or memory
1. Lossless Compression
  • Lossless compression: compresses data and then decompresses it back to original data, no data is lost due to compression
  • Run-length encoding: replaces any repetition of the same bit or byte that occur in a sequence of data with a single occurrence of the bit/byte and run a count
  • It compresses the 0s by counting the "runs" of 0s, that is it would start by counting the 0s until a binary 1s is encountered.
  • The next step is to convert each of the decimal values into 4-bit binary values, or nibbles
  • When encounter a decimal value of 15 or greater, we must convert it into multiple 4-bit nibbles
2. Lossy Compression
  • Lossy compression: in the compression process, some of the data is lost
  • Perceptual encoding or perceptual noise shaping: the compressed version of an audio stream sounds fairly close to the uncompressed version even though some of the original data as been removed
  • MP3 is a common form of audio compression
  • MP3 encoder produces a data stream that has a much slower rate than that of conventional CD music
  • Video files can also be compressed by removing small details that the human eye will not notice
  • JPEG: a technique that is very commonly used to compress video images that involves 3 phases:
    - Discrete Cosine transformation: the image is broken into multiple 8 by 8 blocks of pixels and then produce a new 8 by 8 blocks of values
    - Quantization phase: the object of this phase is to generate more zero entries in the 8  by 8 block
    Run-length coding: take the matrix of quantized values and perform run-length encoding on the zeros by going diagonal  to achieve longer runs of zeros
  • MPEG (Motion Picture Expert Group) is a group of people that have created a set of standards that can use these small differences between frames to compress a moving video (and audio) to a fraction of its original size

Monday, October 3, 2016

Chapter 2: Fundamentals of Data and Signals

Introduction


Data and signals are two of the basic building blocks of any computer network. In order for a computer network to transmit data, the data must first be converted into appropriate signals. One thing data and signals have in common is that both can be either analog or digital form. The conversion is performed by modulation techniques and is found in systems such as telephones, AM and FM radio. Converting digital data to square-wave digital signals is relatively straightforward and involves numerous digital encoding techniques. Converting digital data to analog signals requires some form of a modem. Finally, converting analog data to digital signals is called digitalization; telephone system and music system are two common examples .


Data And Signals


  • Data is entities that convey meaning within a computer or computer system.
  • Signals are the electronic or electromagnetic impulses used to encode and transmit data
1. Analog Vs Digital
  • Data and signals can exist in either analog or digital form
  • Analog Data and Analog signals : are continuos waveforms that can be at an infinite number of points between some given minimum and maximum. The most common example is human voice or music and video in their natural states.

  • It is difficult to remove noise from original waveform
  • Noise: is unwanted electrical or electromagnetic energy that degrades the quality of signals and data

  • Digital data and Digital signals: are composed of a discrete or fixed number of values, rather than a continuous or infinite number of values
  • First type of digital signal is a "square wave" with simple patterns of high and low voltages
  • It is fairly easy to separate original digital waveform from the Noise if the amount of noise is small enough
  • If noise becomes so great that it is no longer possible to distinguish a high from low, then the noise has taken over the signals and can no longer understand the original waveform

2. Fundamentals of signals

There are three basic components: Amplitude, frequency, and phase
  • Amplitude: is the height of the wave above or below a given reference point
  • the height often denotes the voltage level of signal (measured in volts), but it also denote the current level of the signal (measured in amps) or the power level of the signal (measured in watts)


  • Frequency: is the number of times a signal makes a complete cycle within a given time fram
    - Period: is the length, or time interval of one cycle
    -  Frequency is measured in hertz (Hz), or cycles per second (period = 1/frequency)
    - Spectrum: the range of frequencies that a signal spans from minimum to maximum
    - Bandwidth: the absolute value of the difference between the lowest and the highest frequencies
    - Extra noise degrades original signals, an electronic device usually has an effective bandwidth that is less than its bandwidth.
  • Phase: is the position of the waveform relative to a given moment of time, or relative time to 0
    - The wave never makes an abrupt change but is a continuos sine wave
    - A phase change (or shift) involves jumping forward (or backward) in the waveform at a given moment of time.
  • Attenuation is the loss of power of signal strength when signal travels through any type of medium.
  • Decibel (dB) is a relative measure of signal loss or gain and is used to measure the logarithmic loss or gain of a signal
  • Amplification: is the opposite of attenuation, the signal gains in decibels when a signal is amplified by an amplifier
  • The formula to measure signal loss or gain is dB = 10 x log10(P2/P1) where P2 and P1 are the ending and beginning power levels, respectively and is expressed in watts. 

Converting Data into Signals

There are four main combinations of data and signals:
- Analog data transmitted using analog signals
- Digital data transmitted using square-wave digital signals
- Digital data transmitted using discrete analog signals
- Analog data transmitted using digital signals

1. Transmitting analog data with analog signals
  • Data is analog waveform is simply being transformed to another analog waveform, the signal. The basic operation performed is modulation
  • Modulation: is the process of sending data over a signal by varying its amplitude, frequency or phase 
  • Landline telephones, AM radio, FM radio and older broadcast television are the common examples

2. Transmitting digital data with square-wave digital signals: digital encoding schemes
  • Nonreturn to zero digital encoding schemes:
    - Nonreturn to zero-level (NRZ-L) transmits 1s as zero voltage and 0s as positive voltages
    - Nonreturn to zero inverted (NRZI) has a voltage change at the beginning of a 1 and no voltage change at the beginning of a 0
    - The difference between these two schemes is that with NRZ-L, the receiver has to check the voltage level for each bit to determine whether the bit is a 0 or 1 and with NRZI, the receiver has to check whether there is a change at the beginning of the bit to determine if it is a 0 or a 1
  • Manchester digital encoding schemes
    - The manchester class of digital encoding schemes ensures that each bit has some type of signal change.
    - To transmit a 1, the signal changes from low to high in the middle of the interval
    - To transmit a 0, the signal changes from high to low in the middle of the interval
    - The manchester schemes have an advantage over the NRZ schemes is that there is always a transition in the middle of a bit. So, the receiver can expect a signal change at regular intervals and can synchronize itself with the incoming bit stream
    - One big disadvantage of Manchester schemes is that roughly haft of the time there will be 2 transitions during each bit.
    - Baud Rate: is the number of times a signal changes value per second.
    - Data rate is measured in bits per second (bps)
  • Bipolar-AMI encoding scheme
    - Bipolar-AMI is unique because it uses three voltage levels
    - When a device transmits a binary 0, a zero voltage is transmitted
    - when the device transmits a binary 1, either a positive voltage or a negative voltage is transmitted
  • 4B/5B digital encoding scheme
    - 4B/5B: convert the 4 bits into a unique 5-bit sequence and encode the 5-bits using NRZI

3. Transmitting digital data with discrete analog signals
  • Amplitude shift keying
    - A data value of 1 and data value of 0 are represented by two different amplitudes of a signal
    - During each bit period, the amplitude of the signal is constant
    - Can have two or more possible amplitude levels
    - Weakness:  it is susceptible to sudden noise impulses such as the static charges by lighting storm
    - The least efficient encoding techniques
  • Frequency Shift keying
    - Uses two different frequency ranges to represent data values of 0 and 1
    - Frequency shift keying doesnt have problem with sudden noise spikes that can cause data loss
    - However, it is subject to Intermodulation distortion- a phenomenon that occurs when the frequencies of two or more signals mix together and create new frequencies
  • Phase Sift Keying
    - One phase change encodes a 0 while another phase change encodes a 1
    - Less susceptible to noise and can be used at higher frequencies
    - It is so accurate that the signal transmitter can increase efficiency by introducing multiple phase shift angles
    - Quadrature phase shift keying: incorporates four different phase angles, each of which represent 2 bits
    - Quadrature amplitude modulation: a signaling method in which a combination of 12 different phase shift angles with two different amplitudes
4. Transmitting analog data with digital signals
  • Pulse Mode Modulation (PCM)
    - Hardware, specially a codec converts the analog data to a digital by tracking the analog waveform and taking "snapshots" of the analog data at fixed intervals
    - An analog value is converted ti ab equivalent fixed-sized binary value
    - Binary value can then be transmitted by means' of a digital encoding format
    - The closer the snapshots are taken to one another, the more accurate the reconstructed waveform will be
    - Sampling rate: the frequency at which the snapshots are taken
  • Delta Modulation
    - A codec tracks the incoming analog data by assessing up and down "steps"
    - Uses a binary 1 to represent a rise in voltage and a 0 to represent a drop
    - Two problems with delta modulation are (1) if the analog waveform rises or drops too quickly, the codec may not be able to keep up with the change and slop overload noise results (2) when analog waveform doesnt change at all, the waveform generates a pattern of 1010101010... because the codec outputs a 1 or 0 only for a rise or fall, thus generating quantizing noise.
Data Code
  • Data Code: is the set of all textual characters or symbols and their correspoding binary patterns 
  • Three important data codes are
    1. EBCDIC
    2. ASCII
    3. Unicode
1. EBCDIC or the extended binary coded decimal interchange code
  • An 8 bit code allowing 256 possible combinations of textual symbols

2. ASCII - the American Standard Code ode Information Interchange
  • Is government standard in the US and one of the most widely used codes in the world.
  • Character set exists in a few different forms including a 7-bit version that allows for 128 possible combinations of textual symbols
3. Unicode
  • Is an encoding technique that provides a unique coding value for every character in every language, no matter what platform
  • Currently supports more than 110 different code charts

Chapter 1: Introduction to Computer Networks and Data Communications

The language of computer networks

  •       Computer network – an interconnection of computers and computing equipment using either wires or radio waves over small or large geographic areas
  •       Local area network – networks that are small in geographic size spanning a room, floor, building, or campus
  •        Metropolitan area network – networks that serve an area of 1 to 30 miles, approximately the size of a typical city
  •       Wide area network – a large network that encompasses parts of states, multiple states, countries, and the world
  •       Personal area network – a network of a few meters, between wireless devices such as PDAs, laptops, and similar devices
  •       Campus area network – a network that spans multiple buildings on a business or school campus
  •        Network cloud – a network (local or remote) that contains software, applications, and/or data
  •       Data communications – the transfer of digital or analog data using digital or analog signals
  •       Telecommunications – the study of telephones and the systems that transmit telephone signals (becoming simply data communications)
  •       Voice network – a network that transmits only telephone signals (essentially xtinct)
  •       Data network – a network that transmits voice and computer data (replacing voice networks)
  •       Network management – the design, installation, and support of a network, including its hardware and software


The Big Picture of Networks

Networks are composed of many devices including:
  •       Workstations (computers, tablets, wireless phones, etc)
  •        Servers: the computers that store network software and shared or private user files
  •        Network switches: the collection points for the wires that interconnect the workstations
  •        Routers (LAN to WAN and WAN to WAN): the connecting devices between local area networks and wide area networks such as the Internet
  •        Network nodes: the computing devices that allow workstations to connect to the network and that make the decisions about where to route a piece of data
  •        Subnetwork: the nodes and transmission lines, collected into a cohesive unit


Common Examples of Communications Networks


1.     The desktop computer and the internet
o   At work or at school – connection is typically some form of Ethernet
o   At home, for some, a dial-up modem is used to connect user’s microcomputer to an Internet service provider
o   Technologies such as DSL and cable modems are replacing dial-up modems










2.     A laptop computer and a wireless connection
o   Connection is typically some form of wireless Ethernet
o   Laptop wirelessly communicates with a wireless router or wireless access point
o   Wireless router is typically connected to a wired-network



3.     Cell phone networks
o   One of the most explosive area of growth in recent years
o   Large number of cell phone towers are tied to some form of networks, allowing us to send text messages or call around the world
o   When a user talks into their cell phone or send text message, the data is transmitted across the network to a telephone company building, the telephone company then transfer the cell phone’s date over the public network or through a connection onto the internet.



4.     Other common network system
o   Industrial sensor-based systems
            - Not all local area networks deal with microcomputer workstations
            - Often found in industrial and laboratory environments
- Assembly lines and robotic controls depend heavily on sensor-based local area networks


o   Mainframe systems
            - Predominant form in the 1960s and 1970s
            - Still used in many types of businesses for data entry and data retrieval
- Few dumb terminals left today – most are microcomputers with terminal emulation card, a web browser and web interface, Telnet software, or a thin client



o   Satellite and microwave networks
- Typically long distance wireless connections
- Many types of applications including long distance telephone, television, radio, long-haul data transfers, and wireless data services




Network Architectures


o   A network architecture or communications model, places the appropriate layers and pieces.
o   Each layer in the model defines what services either the hardware or software provides
o   There are two network architectures or models: TCP/IP protocol suite and OSI model
1.     The TCP/IP protocol suite



a.     Application layer
                                                                 i.     Where the application using the network resides
                                                               ii.     Common network applications include web browsing, e-mail, file transfers, and remote logins
b.     Transport layer: Performs a series of miscellaneous functions (at the end-points of the connection) necessary for presenting the data package properly to the sender or receiver
c.     Network (Internet or internetwork or IP) layer: Responsible for creating, maintaining and ending network connections
                                                                 i.     Transfers data packet from node to node (e.g. router to router) within network
d.     Network access (data link) layer: Responsible for taking the data and transforming it into a frame with header, control and address information, and error detection code, then transmitting it between the workstation and the network
e.     Physical layer:
                                                                 i.     Handles the transmission of bits over a communications channel
                                                               ii.     Includes voltage levels, connectors, media choice, modulation techniques





2.     The OSI Model


a.     Application layer: Equivalent to TCP/IP’s application layer
b.     Presentation layer: Responsible for “final presentation” of data (code conversions, compression, encryption)
c.     Session layer: Responsible for establishing “sessions” between users
d.     Transport layer: Equivalent to TCP/IP’s transport layer
e.     Network layer: Equivalent to TCP/IP’s network layer
f.      Data link layer: Responsible for taking the data and transforming it into a frame with header, control and address information, and error detection code
g.     Physical layer: Handles the transmission of bits over a communications channel
                                                                 i.     Includes voltage levels, connectors, media choice, modulation techniques
3.     Logical and physical connections
a.     A logical connection is one that exists only in the software, while a physical connection is one that exists in the hardware
b.     In a network architecture, only the lowest layer contains the physical connection, while all higher layers contain logical connections