Professional Documents
Culture Documents
Điện tử số
Điện tử số
Digital Electronics
- Part I: Digital Principle -
Dr. Lê Dũng
Department of Electronics and Computer Engineering (C9-406 407)
School of Electronics and Telecommunications
Hanoi University of Science and Technology
Email: dung.le@hust.edu.vn
1
9/4/2019
Chapter 1
Binary system and Binary Codes
1.1 Binary System
1.2 Binary Arithmetic
1.3 Sign Number Representation
1.4 Real Number Code
1.5 Binary Coded Decimal (BCD)
1.6 Character Code
1.7 Gray Code
1.8 Error Detection Codes and Error Correction Codes
1.9 Other (Information) Codes
2
9/4/2019
+ A number
n 1
+ Polynomial Notation
(with r- radix and i-weighted position)
N a r
i m
i
i
3
9/4/2019
For example: 00 01 02 … 09
10 11 12 … 19
20 21 22 … 29
….………………….. 099 100
+ Binary counting {0 1}
{00 01 10 11}
{000 001 ….111}
{0000 0001 … 1111}
Dr. Le Dung - School of Electronics and Telecommunications Page 8
4
9/4/2019
+ Two positions of an
electrical switch.
+ Two distinct voltage or
current levels allowed by a
circuit.
+ Two distinct levels of light
intensity
+ Two directions of
magnetization or polarization
Calculating machine (Müller 1784)
with decimal system + ….
Hexadecimal System
+ 16 symbols = {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}
+ Hexadecimal Number
2DC.1E16= 2•162 + 13•161 + 12•160 + 1•16-1 + 14•16-2
5
9/4/2019
Convert to base 2
use radix divide method for the
integer part (remainders and quotient)
use radix multiply method for the
fraction part.
1 + 1 = 0 carry 1 = 102
6
9/4/2019
difference 01110
7
9/4/2019
= 0 positive +
Sign
= 1 negative -
8
9/4/2019
1010 - 2
+
1100 - 4
Carry 10000
0110 +6 error
0011 +3
+
1011 -3
Carry 0110
1110 -6 error
9
9/4/2019
10
9/4/2019
2-complement calculation
-N = 1
0111 +7 1001 - 7
Overflow 0110 +6 1010 - 6
+ 01100 + 10000
1101 - 3 0011 +3
11
9/4/2019
Floating-point
Scientific notation
12
9/4/2019
DCBA
13
9/4/2019
Unicode
00 01 11 10
10 11 01 00
14
9/4/2019
Error ?
Parity Code
Hamming Code
15
9/4/2019
16
9/4/2019
Example:
17
9/4/2019
CRC32
CRC16
18
9/4/2019
Pixels
19
9/4/2019
Frames Frames
Frames
20