0% found this document useful (0 votes)
12 views28 pages

Chapter 10-Systems of Notation and Code

Chapter 10 discusses various systems of notation and coding, including continuous and discrete signal processing, as well as analog and digital signals. It explains different numeral systems such as decimal, binary, octal, and hexadecimal, along with their conversion methods and applications. Additionally, it covers Binary Coded Decimal (BCD) and Gray code, highlighting their significance in digital communications and error correction.

Uploaded by

vumt03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views28 pages

Chapter 10-Systems of Notation and Code

Chapter 10 discusses various systems of notation and coding, including continuous and discrete signal processing, as well as analog and digital signals. It explains different numeral systems such as decimal, binary, octal, and hexadecimal, along with their conversion methods and applications. Additionally, it covers Binary Coded Decimal (BCD) and Gray code, highlighting their significance in digital communications and error correction.

Uploaded by

vumt03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

BỘ GIÁO DỤC & ĐÀO TẠO

TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT TP. HỒ CHÍ MINH

Chapter 10:

SYSTEMS OF NOTATION AND CODE


10.1. Categories

 Continuous-time signal processing: It is for signals that vary


with the change of continuous domain (without considering some
individual interrupted points)

 Discrete-time signal processing: It is for sampled signals,


defined only at discrete points in time, and as such are quantized
in time, but not in magnitude

2
10.1. Categories
 Analog signal:
An Analog signal is any continuous signal for which the
time varying feature (variable) of the signal is a representation
of some other time varying quantity, i.e., analogous to another
time varying signal. It differs from a digital signal in terms of
small fluctuations in the signal which are meaningful.
 Digital signal:
A digital signal uses discrete (discontinuous) values. By
contrast, non-digital (or analog) systems use a continuous
range of values to represent information. Although digital
representations are discrete, the information represented can
be either discrete, such as numbers or letters, or continuous,
such as sounds, images, and other measurements of
continuous systems. 3
Comparison chart
Analog Digital
Analog signal is a continuous signal which Digital signals are discrete time signals generated by digital
Signal
represents physical measurements. modulation.
Waves Denoted by sine waves Denoted by square waves
Uses continuous range of values to Uses discrete or discontinuous values to represent
Representation
represent information information
Example Human voice in air, analog electronic devices. Computers, CDs, DVDs, and other digital electronic devices.
Analog technology records waveforms as they Samples analog waveforms into a limited set of numbers and
Technology
are. records them.
Data Subjected to deterioration by noise during Can be noise-immune without deterioration during
transmissions transmission and write/read cycle. transmission and write/read cycle.
Response to
More likely to get affected reducing accuracy Less affected since noise response are analog in nature
Noise
Flexibility Analog hardware is not flexible. Digital hardware is flexible in implementation.
Can be used in analog devices only. Best
Uses Best suited for Computing and digital electronics.
suited for audio and video transmission.
Applications Thermometer PCs, PDAs
There is no guarantee that digital signal processing can be
Analog signal processing can be done in real
Bandwidth done in real time and consumes more bandwidth to carry out
time and consumes less bandwidth.
the same information.
Memory Stored in the form of wave signal Stored in the form of binary bit
Power Analog instrument draws large power Digital instrument drawS only negligible power
Cost Low cost and portable Cost is high and not easily portable
Impedance Low High order of 100 megaohm
Analog instruments usually have a scale which
Digital instruments are free from observational errors like
Errors is cramped at lower end and give considerable
parallax and approximation errors.
observational errors. 4
10.1. Categories

Application of Digital signal for controlling 5


10.2. SYSTEMS OF NOTATION
10.2.1. Decimal System
• The ordinary system of notation is a mark-position system
based on 10 different marks (characters) (the digits – 0, 1, 2,
3, 4, 5, 6, 7, 8, 9)

• Ex: 1234 or 123410


1234 = 1.103 + 2.102 + 3.101 + 4.100
= 1000 + 200+ 30 + 4
 Strength
 Easy to understand, easy to use
 Weakness
 Require considarable space to record
6
10.2. SYSTEMS OF NOTATION
10.2.2. Binary System
• This system of notation has only 2 admissible marks (2 digits:
0 and 1).

• Ex: 11011.012 or 1101.011B

 Strength
 Having 2 distinct states  Easy to control
 Weakness
 Not familiar with human beings

7
10.2.2. Binary System
Converting Decimal notation into Binary notation

To convert a decimal number into a binary number, divide the


decimal number by two.

8
10.2.2. Binary System
Converting Binary notation into Decimal notation
To convert a binary number into a decimal number, calculate
the value of each bit in the binary number.

All the values of the binary positions are added together.

N = 1010,12 = 1x23 + 0x22+ 1x21 + 0x20 + 1x2-1 = 10,510

9
Binary number
Decimal number
23 = 8 22 = 4 21 = 2 20 = 1
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1 10
10.2.2. Binary System
Arithmetic in binary is much like arithmetic in other numeral
systems.

Addition, subtraction, multiplication, and division can be


performed on binary numerals

Addition Carry
35 0100011
0+0= 0 0 + +
86 1010110
0+1= 1 0 11
1
1+0= 1 0 121 1111001
1+1= 0 1

11
10.2.2. Binary System
Arithmetic in binary is much like arithmetic in other numeral
systems.

Subtraction Borrow 121 1111001


- -
0–0= 0 0 1010110
86
1 11
0–1= 1 1
1–0= 1 0 35 0100011
1–1= 0 0

12
10.2.2. Binary System
Arithmetic in binary is much like arithmetic in other numeral
systems.

14 1110
Multiplication * *
12 1100
X Y X*Y
0 0 0 168 0000
0 1 0 0000
1 0 0 1110
1110
1 1 1
10101000

13
10.2.2. Binary System
Arithmetic in binary is much like arithmetic in other numeral
systems.
Division 10
15
-
10 1,5
1111 1010 050
- -
1010 1
1,1 50
01010 00
-
1010
0000

14
10.2.3. Octal System
The octal system is the base-8 number system and uses the
digits 0 to 7. S8 = {0,1, 2, 3, 4, 5, 6, 7}
Forming numbers in the octal system:
0 1 2 3 4 5 6 7
10 11 12 13 14 15 16 17
20 21 22 23 24 25 26 27
........................
N = 1307,18 = 1x83 + 3x82 + 0x81 + 7x80+ 1x8-1
= 512 + 192 + 7 + 0,125 = 711,12510
To convert a decimal number into a octal number, divide the
decimal number by 8.
Ex: 6410 = 1008 15
10.2.3. Octal System
N = 1307,18 = 1x83 + 3x82 + 0x81 + 7x80+ 1x8-1
= 512 + 192 + 7 + 0,125 = 711,12510
To convert a decimal number into an octal number, divide the
decimal number by 8.
Ex: 6410 = 1008
To convert octal to binary, replace each octal digit by its binary
representation.
Ex: 518 = 1010012
To convert binary to octal, the binary digits are grouped by
threes, starting from the right to the left for the integer and from
the left to the right for the fraction. Add leading zeroes to fill out
the last group of three if necessary. Then replace each trio with
the equivalent octal digit.
Ex: 11100,010012 = 011100,0100102 = 34,228
16
10.2.4. Hexadecimal System

S16 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }

(A is equivalent to 1010 , B = 1110 , C = 1210 ,. . . . . . , F = 1510)

To convert a hexadecimal number into its binary equivalent,


simply substitute the corresponding binary digits:

Ex: 3A16 = 001110102


To convert a binary number into its hexadecimal equivalent,
divide it into groups of four bits. If the number of bits isn't a
multiple of four, simply insert extra 0 bits at the left for the integer
and the right for the fraction :
Ex: 10100102 = 010100102 = 5216
17
10.2.4. Hexadecimal System

S16 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }

(A is equivalent to 1010 , B = 1110 , C = 1210 ,. . . . . . , F = 1510)

To convert a hexadecimal number into its decimal equivalent,


multiply the decimal equivalent of each hexadecimal digit by the
corresponding power of 16 and add the resulting values :

Ex: C0E716 = (12 × 163) + (0 × 162) + (14 × 161) + (7 × 160)


= (12 × 4096) + (0 × 256) + (14 × 16) + (7 × 1) = 49.38310

18
Converting Decimal notation into Hexadecimal notation

19
Converting Decimal system into other numeral ones
Converting the integer part of a decimal number
To convert a decimal number into number, divide the decimal
number by the base of the system (2, 8, 16).

Converting the odd part of a decimal number


- To convert a decimal fraction to other numeral system,
multiply it by base of the system (2, 8, 16).
- The integer part of the result is the first digit of the number.
- Repeat the process with the fractional part of the result until it
is null or within acceptable error bounds.

A10 = 0,75 2A10 = 1,5 2x0,5 = 1,0


0,7510 = 0,112
A2 1 1
Converting Decimal system into other numeral ones
Converting the interger part of a decimal number
To convert a decimal number into number, divide the decimal
number by the base of the system (2, 8, 16).
Converting the odd part of a decimal number
- To convert a decimal fraction to other numeral system,
multiply it by base of the system (2, 8, 16).
- The integer part of the result is the first digit of the number.
- Repeat the process with the fractional part of the result, until it
is null or within acceptable error bounds. 0,27510 = 0,……2

A10=0,275 2A10=0,55 2x0,55=1,1 2x0,1=0,2 2x0,2=0,4 2x0,4=0,8 2x0,8=1,6

A2 0 1 0 0 0 1

0,27510 = 0,0100012
Converting another numeral system into Decimal system
To convert a number of any system into a decimal number,
calculate the value of each bit in the number.

All the values of the positions are added together.

Ex: 20EA,8H = 2x163+ 0x162 + 14x161+ 10x160+ 8x16-1


= 4330,510

22
10.2.5. Binary Coded Decimal (BCD code)
BCD is a class of binary encodings of decimal numbers where
each decimal digit is represented by a fixed number of bits
(usually four).
Four bits are enough to represent the range 0 to 9.
Ex: 194110 = 0001100101000001BCD
Decimal digit Binary number
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1 23
10.2.6. Gray Code
Gray code after Frank Gray, is a binary numeral system where
two successive values differ in only one bit (binary digit).

Today, Gray codes are widely used to facilitate error


correction in digital communications such as digital terrestrial
television and some cable TV systems..

Gray codes are used in position encoders (linear


encoders and rotary encoders), in preference to straightforward
binary encoding. This avoids the possibility that, when several
bits change in the binary representation of an angle, a misread
will result from some of the bits changing before others.

24
Constructing an n-bit Gray code
The binary-reflected Gray code list for n bits can be
generated recursively from the list for n − 1 bits by reflecting the list (i.e.
listing the entries in reverse order), concatenating the original list with
the reversed list, prefixing the entries in the original list with a binary 0,
and then prefixing the entries in the reflected list with a binary 1
n – 1 bit n bit

From the first number 0 From the first number


. .
.
. .
. . .
. . .
To the last one 0 To the last one
From the last number
1
Reflected mirror .
. .
. .
. .
1 To the first one
25
10.2.6. Gray Code
1-bit Gray code 2-bit Gray code

0 0 0 00
1 0 1 01 3-bit Gray code
1 1 11
0 00 000
1 0 10
0 01 001
0 11 011
0 10 010
1 10 110
1 11 111
1 01 101
1 00 100
26
1 bit 2 bit 3 bit 4 bit Gray code Decimal number

Constructing an n-bit Gray code

27
10.2.6. Gray Code
Decimal number Binary number Gray code
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1000
9 1001 1001
10 1010 1011
11 1011 1010
12 1100 1110
13 1101 1111
14 1110 1101
15 1111 1100 28

You might also like