Chapter 10-Systems of Notation and Code
Chapter 10-Systems of Notation and Code
Chapter 10:
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
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
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.
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 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.
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 }
S16 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }
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).
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.
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).
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
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
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