CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture...

34
CT1037N CT1037N ntroduction to Communication ntroduction to Communication Digital Signals & Binary Digital Signals & Binary Codes Codes Er. Saroj Sharan Regmi Er. Saroj Sharan Regmi Lecture 06 Lecture 06

Transcript of CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture...

Page 1: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

CT1037NCT1037NIntroduction to CommunicationsIntroduction to Communications

Digital Signals & Binary Digital Signals & Binary CodesCodes

Er. Saroj Sharan RegmiEr. Saroj Sharan Regmi

Lecture 06Lecture 06

Page 2: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Last Lecture: 05Last Lecture: 05Signal Representation & Spectral AnalysisSignal Representation & Spectral Analysis

• Signals and Systems,

• Continuous- and Discrete- Time Systems,

• Continuous- and Discrete- Time Signals,

• Fourier Series,

• One-Sided Amplitude Frequency Spectrum,

• Two- Sided Amplitude Frequency Spectrum.

Page 3: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Today’s Lecture: 06Today’s Lecture: 06Digital Signals & Binary CodesDigital Signals & Binary Codes

• Review Signals & Analogue Signals.

• Digital Signals.

• Advantages of Digital Signals.

• Binary Digital Signals.

• Binary Signal Ratios.

• Data Codes.

• Data Coding Efficiency.

• Data Coding Noise Immunity.

• Bit Error Rate.

• Encoding Schemes.

Page 4: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

SignalsSignals

• Signal: An electrical voltage or current which varies with time and is used to carry messages or information from one point to another.

• Analogue signals represent information by varying continuously with time.

Analogue SignalsAnalogue Signals

• Noise added to the analogue signal can greatly affect the accuracy of the information.

• Limiting the level of noise is not an easy or inexpensive process.

Page 5: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

• Digital signals vary abruptly and change between distinct voltage or current levels.

Digital SignalsDigital Signals

• The most widely used form of a digital signal is binary, (two states).

Usually represented as 0 Volts (0V) and 5 Volts (+5V),

Also as: 0 & 1, Low & High, OFF & ON, False & True.

• Information is represented as a train of pulses arranged in specific combinations.

• A digital waveform can decrease the effect of noise on the information to a very great effect.

Page 6: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Advantages of Digital SignalsAdvantages of Digital Signals

• A digital waveform is less sensitive to noise than an analogue signal:

Decreases the effect of noise on the information to a very great effect.

• Less cross-talk (co-channel interference).

• Lower distortion levels.

• Faded signals are more easily recreated.

• Greater transmission efficiency.

Page 7: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Binary Digital SignalsBinary Digital Signals

• Signals arising from computer type equipment designed to transmit information in coded form.

• Bits: The individual 1's and 0's.

• Bit Slot Duration, : The time required by each bit to be transmitted.

τ

0 1 0 1 0 1 0 1

τ

Page 8: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Bandwidth in Digital SignalsBandwidth in Digital Signals

• Binary Digital Systems:

Bit Rate: The number of bits transmitted per second.

Bit Rate =1τ

… (bps )

• Other (Non-Binary) Digital Systems:

Baud Rate: The number of symbols transmitted per second.

Each symbol is composed of more than 1 bit.

Page 9: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

: the 1 bit slot duration,

T : the periodic time,

T - :the 0 bit slot duration.

τ

τ

Binary Signal RatiosBinary Signal Ratios

• Ratios in Binary Signals enable us to see the relationship between a bit set at 1 and another set at 0.

0 1 0 1

τ

T

Page 10: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

• The ratio between the 1's and the periodic time of one cycle.

Expressed as a percentage of period.

Mark Space Ratio = τ : T − τ = 1 :?

Duty C ycle = τ : T = ?%

• The ratio between the 1's and the 0's.

used in Morse Code.

Mark Space RatioMark Space Ratio

Duty-Cycle RatioDuty-Cycle Ratio

Page 11: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

What is the mark-space ratio and the duty-cycle of a binary transmission with periodic time T = 1 ms when = 200 µs ?

T = 1 ms

= 200 µs = 0.2 ms Mark Space Ratio = τ : T − τ= 200×10−6 : (1×10−3−200×10−6 )=¿ 200×10−6 : 8×10−4 = 1 : 4Mark Space Ratio = 1 : 4

Duty Cycle = τ : T= 200×10−6 : 1×10−3 = 1 : 5Duty Cycle = 1 : 5 = 20

τ

τ

Binary Signal Ratios: ExampleBinary Signal Ratios: Example

Page 12: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Data CodesData Codes

• Data codes have always been in widespread use even since mankind’s early history:

From the use of hand signals to mirror flashing signals across the land, to smoke signals of the American Indians, information has been coded and sent by a variety of means.

• Data codes are the way in which bits are grouped together to represent different symbols.

• The sender and receiver must use the same code in order to communicate properly.

• ASCII is the most widespread data code in use today:

7-bit code that can represent a total of 128 symbols(27 = 128).

Limited by the number of symbols it can represent.

Page 13: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Number of bits in a Data CodeNumber of bits in a Data Code

• The number of bits in a code will dictate the maximum number of symbols which can be represented.

• Alternatively, the maximum number of symbols required will dictate the number of bits that must be included in a code.

2n = M … or … n= log2Mn = number of bits in a code

M = number of symbols represented

Page 14: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Number of bits in a Data Code (…2)Number of bits in a Data Code (…2)

CodeCode bits in Codebits in Code Maximum Number of SymbolsMaximum Number of Symbols

BCD 4 24 = 16

BAUDOT 5 25 = 32

? 6 26 = 64

ASCII 7 27 = 128

EBCDIC 8 28 = 256

? 10 210 = 1024

UNICODE 16 216 = 65536

Page 15: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Data Coding EfficiencyData Coding Efficiency

• The efficiency with which a code can be used to represent a group of symbols.

• Based on:

the number of symbols requiring representation, and

the number of bits that a code must have to enable the representation of all symbols.

coding efficiency (μ )=bits neededbits used

×100

Page 16: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

• How many bits would be required to distinguish the 88 keys of a piano and what would the coding efficiency be?

n=log 2M=log10M

log102=log1088

log102=1 .9440 .301

=6 .46 bits … (7 bits )

coding efficiency (μ )=6 .46 bits7 bits

×100 =92.3

Data Coding Efficiency: Example 1Data Coding Efficiency: Example 1

Page 17: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Data Coding Efficiency: Example 2Data Coding Efficiency: Example 2

• Compare the efficiency of the binary versus the decimal coding systems when representing the 26 letters of the alphabet:

n=log 2M=log10M

log102=log1026

log102=1 .4140 .301

=4 .7 bits …(5 bits )

coding efficiency (μ )=4 .7 bits5 bits

×100 =94

n= log 10M = log 10 26= 1 . 415 d its … ( 2 d its )

coding efficiency (μ )=1 .415 dits2 dits

×100 =71

• The binary code:

• The decimal code:

Page 18: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Data Coding Noise ImmunityData Coding Noise Immunity

• Binary coding is more immune to noise than any other form of coding.

The Binary Code: The Decimal Code:

0V

10V

Threshold = 0.5V

Threshold = 5V

• Consider the example below:

Page 19: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Bit Error Rate (BER)Bit Error Rate (BER)

• BER relates to the number of possible erroneous bits received.

• Shows the quality of a particular communications link.

BER=Number of Erroneous Bits ReceivedTotal Number of Bits Transmitted

• BER values for a digital transmission system are normally specified and depend on the Signal-to-Noise Ratio (SNR) of the detection system.

• A typical BER requirements is in the region of 10-9.

• BER is an error probability defined as:

Page 20: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Bit Error Rate (BER): ExampleBit Error Rate (BER): Example

• Example: What is the BER of a transmission consisting of 5Gb if the erroneous bits received are 3?

BER =3

5×109= 0 . 0000000006 = 6×10−10

Page 21: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Morse CodeMorse Code

• One of the first character codes developed.

• A crude but effective way of transmitting characters over a telegraph circuit.

• Developed with a telegraph operator in mind who:

sent combinations of dots (short beep) and dashes (long beep),

paused for a short time between letters.

• Unsuitable for computer communications:

due to the extra time required between the transmission of each character,

limiting number of characters that could be represented.

Page 22: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Morse Code (…2)Morse Code (…2)

Page 23: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Baudot CodeBaudot Code

• One of the first character codes developed with machines in mind.

• Uses 1s and 0s to represent characters.

• Uses 5 bits of information per character.

• Case sensitive:

lower case characters represent letters,

upper case characters represent figures.

• Results in 32 different characters per case.

• Used for many years on telex equipment and is still used on some teletype machines.

• Unsuitable for high speed data communications due to the time required to switch between cases.

Page 24: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Baudot Baudot Code (…Code (…

2)2)

Page 25: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

BCDBCD(Binary Coded Decimal)(Binary Coded Decimal)

• 4-bit code which allows for up to 16 characters / symbols (24 = 16).

• Often used to represent digits 0 to 9 but insufficient number of characters for anything else.

• 6-bit version allows for up to 64 characters.

EBCDICEBCDIC(Extended Binary Coded Decimal Interchange (Extended Binary Coded Decimal Interchange

Code)Code)• 8-bit standard which allows for up to 256 characters (28 =

256).

• Not all codes are used hence gaps exist.

• Common on IBM mainframes and related products.

Page 26: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

ASCIIASCII(American Standard Code for Information Interchange)(American Standard Code for Information Interchange)

• The ASCII code is the most popular code for serial data communications today.

• It is a 7-bit code allowing up to 128 combinations (27 = 128), and thus supports upper and lowercase characters, numeric digits, punctuation symbols, and special codes.

• ASCII is also used as the data code for keyboards in computers.

• Control codes are used and are represented as symbols.

Used in binary synchronous communication, and device control codes in communicating with devices such as printers or terminals.

Page 27: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

The 7-bit ASCII CodeThe 7-bit ASCII Code

©

C i s

c o

S

y s

t e

m s

,

I n

c .

Page 28: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Data (Line) EncodingData (Line) Encoding

• Data encoding puts the coded information into a form which will enable its transfer through a certain medium.

The simplest data encodings have undesirable timing and electrical (dc) characteristics.

• Line codes have been designed to have desirable transmission properties.

Bi-phase encoding transition, such as the Manchester encoding, has no dc component whatever the word transmitted thus offering desirable electrical characteristics.

• Both digital and analogue data can be encoded into various forms.

Page 29: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

• Data encoding describes how the bits are actually signalled on the wire.

Different signal elements are used to represent binary 1 and binary 0.

• Encoding scheme is the mapping from binary digits to signal elements.

minimizes errors in determining the start and end of each bit,

minimizes errors in determining whether each bit is 1 or 0.

Data (Line) Encoding (…2)Data (Line) Encoding (…2)

Page 30: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

• There are various techniques for data encoding:

TTL: Transistor-Transistor Logic,

NRZ-L: Non-Return to Zero-Level,

NRZI: Non-Return to Zero-Inverted,

Manchester Tx (+),

Manchester Tx (-),

Differential Manchester,

MLT3: Multi-Level Threshold-3,

etc.

Data Encoding SchemesData Encoding Schemes

Page 31: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Data Encoding Schemes (…2)Data Encoding Schemes (…2)

Page 32: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Data Encoding Schemes (…3)Data Encoding Schemes (…3)

Page 33: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

Data Encoding Schemes (…4)Data Encoding Schemes (…4)

Page 34: CT1037N Introduction to Communications Digital Signals & Binary Codes Er. Saroj Sharan Regmi Lecture 06.

SummarySummary

• Defined Digital Signals.

• Characteristics of Binary Digital Signals.

• Reviewed the Mark Space Ratio and the Duty Cycle mechanisms.

• Data encoding efficiency.

• Data codes are the way in which bits are grouped together to represent different symbols. Examples are Morse, Baudot, BCD, EBCDIC, ASCII, etc.

• Binary coding is more immune to noise than any other form of coding.

• Data Encoding puts the coded information into a form which will enable its transfer through a certain medium.

• Examples of Encoding Schemes are TTL, NRZ-L, NRZI, Manchester Tx (+), Manchester Tx (-), Differential Manchester, MLT3, etc.