EE200 - DLD - Chapter 01
EE200 - DLD - Chapter 01
EE200 - DLD - Chapter 01
Chapter 1
Numbers System
Recap: Analog Signal vs. Digital
An1
: most significant digit (msd)
Hexadecimal
10 90134
10 9013 4
10 901 3
10 90 1
9
Digital Logic Design - Chapter 1
0 5
Generic Number Representation
90134
= 9*10 4 + 0*10 3 + 1*10 2 + 3*10 1 + 4*10 0
A 4 A 3 A 2 A 1 A 0 for base-10 (or radix-10)
= A 4* 104 + A 3* 103 + A 2* 102 + A 1* 101 + A 0* 100
(A is coefficient; b is base)
Generalize for a given number N w / base-b
N = A n-1 A n-2 … A1 A0
N = A n-1* b n - 1 + A n-2* b n - 2 + … + A 2* b 2 + A 0* b 0
**Note that A < b
1 6 2 . 3 7 5 Digits
100 10 1 1/10 1/100 1/1000 Weights
0 10 20 90 100 0 10 20 70
100
1 11 21 91 101 1 11 21 71
101
2 12 22 92 102 2 12 22 72
102
3 13 23 93 103 3 13 23 73
103
4 14 104 4 14 104
24 ….. 94 24 ….. 74
5 15 25 95 105 5 15 25 75 105
6 16 26 96 106 6 16 26 76 106
7 17 27 97 107 7 17 27 77 107
8 18 28 98 108
9 19 29 99 109
0 10 100 10 00
1 11 101 10 01
110 10 10
111 10 11
11 00
11 01
11 10
11 11
0 10 100 1000
1 11 101 1001
110 1010
111 1011
1100
1101
1110
1111
Binary = Decimal
6 39
6 6 3
1 0
(0100111)2 = (103)6
8 + 4 + 0 + 1 + 0 + 0.25 =
13.25
0.375 x 10 = 3.750
0.750 x 10 = 7.500
0.500 x 10 = 5.000
Digital Logic Design - Chapter 1 18
Octal and Hexadecimal Numbers
The octal number system: Base-8
Eight digits: 0,1,2,3,4,5,6,7
(127.4)8 18 2 28 1 78 0 48 1 (87.5)10
We use Base-16 (or Hex) a lot in computer world
Sixteen digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Ex: A 3 2 - b i t address can be written as
0xfe8a7d20 (0x is an abbreviation of Hex)
Or in binary form 1111_1110_1000_1010_0111_1101_0010_0000
(673.12)8 = 6 7 3 . 1 2
= 110 111 011 . 001
010
= (110111011.001010)2
Converting from binary to octal: Make groups of 3
bits,starting from binary point. Add 0s to ends of number if
needed. Convert each bit group to its corresponding octal
digit. 10110100.0010112 = 010 110 100 . 001 0112
= 2 6 4 . 1 38
-2 110
-1 101
-0 100
3 011 -3 101
100 010
Add 1 Add 1
-3 101 3 011
010001 (17=16+1)
001011 (11=8+2+1)
011100 (28=16+8+4)