View
216
Download
0
Category
Preview:
Citation preview
CEC 220 Digital Circuit DesignNumber Systems & Conversions
Friday, January 9 CEC 220 Digital Circuit Design Slide 1 of 16
Number Systems & Conversions
Friday, January 9 CEC 220 Digital Circuit Design
• Number Systems and Conversions Digital Systems and Switching Circuits Number Systems and Conversion Binary, Hexadecimal, and Octal representations Examples
Slide 2 of 16
Number Systems & ConversionsDigital Systems and Switching Circuits
Friday, January 9 CEC 220 Digital Circuit Design
• What is the difference between analog and digital systems/signals?
• Analog – Continuous Natural Phenomena (Pressure, Temperature, Speed…)
Difficult to realize processing using electronics
• Digital – Discrete Binary Digit Signal Processing as Bit unit
Easy to realize processing using electronics
High performance due to Integrated Circuit Technology
Slide 3 of 16
Number Systems & ConversionsDigital Systems and Switching Circuits
Friday, January 9 CEC 220 Digital Circuit Design
• What is a binary signal?
• Binary = Two values (0, 1)• Each digit is referred to as a “bit”
• Number representation with only two values (0, 1)
• Can be implemented with simple electronics devices
• For Example• Voltage: High = (1) and Low = (0)• Switch: On = (1) and Off = (0)
Slide 4 of 16
Number Systems & ConversionsDigital Systems and Switching Circuits
Friday, January 9 CEC 220 Digital Circuit Design
• What is a switching circuit?
• Combinational Circuit:• Outputs depend on only present inputs, not on past inputs
• Sequential Circuit:• Outputs depend on both present inputs and past inputs
• Sequential circuits have “memory” !!!!!
Slide 5 of 16
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
4 3 2 1 0 1 2 3( . )RN a a a a a a a a
2 1 0 1 29 10 5 10 3 10 7 10 8 10
21011.11
Decimal:(base 10)
Binary:(base 2)
Base “R”
10953.78
3 2 1 0 1 21 2 0 2 1 2 1 2 1 2 1 2 1 1
8 0 2 12 4
10
311 11.75
4
4 3 2 1 04 3 2 1 0
1 2 31 2 3
a R a R a R a R a R
a R a R a R
Slide 6 of 16
9 100 5 10 3 1 7 /10 8 /100 900 50 3 7 /10 8 /100
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
• Examples Base 8 to Decimal
Base 16 to Decimal
8147.3
10103.375
2 1 0 11 8 4 8 7 8 3 8 3
64 32 78
162A F 2 1 010 16 2 16 15 16
102607
2560 32 15
Slide 7 of 16
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
• Conversion of Decimal to base R
1 2 1 01 2 1 0 1 2 1 0
n nn n n nR
N a a a a a a R a R a R a R a R
1 2 11 2 1 1
n nn n
Na R a R a R a Q
R
2 3 111 3 2 2
n nn n
Qa R a R a R a Q
R
3 421 3 3
n nn n
Qa R a R a Q
R
.
.
.
0remainder a
1remainder a
2remainder a
Quotient
Slide 8 of 16
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
• Example: Convert Decimal 53 (i.e. base 10) to base 2 (i.e., binary)
532
262
132
62
32
12
rem. = 1 = a0
rem. = 0 = a1
rem. = 1 = a2
rem. = 0 = a3
rem. = 1 = a4
0 rem. = 1 = a5
210 11010153
Slide 9 of 16
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
• Conversion of a Decimal fraction to base R
1 2 30 m RF a a a a
1112
31
21 FaRaRaRaaFR mm
2221
321 FaRaRaaRF mm
333
32 FaRaaRF mm
.
.
.
1 2 31 2 3
mma R a R a R a R
Slide 10 of 16
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
• Example: Convert Decimal 0.625 to base 2 (i.e., binary)
)1(
250.1
2
625.
1
a
F
)0(
500.0
2
250.
2
1
a
F
)1(
000.1
2
500.
3
2
a
F
10 20.625 0.101
Slide 11 of 16
10 20.625 0.???
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
• Example: Convert 231.34 to base 7 First convert to decimal
Convert the integer portion (4510 = ???7)
Convert the decimal portion ( .7510 = .???7)
104 75.454
31431623.231
457
67
0 rem. = 6
rem. = 3
.75
7
(5).25
.75
7
(5).25
.25
7
(1).75
.25
7
(1).75
4 10 7231.3 45.75 63.5151
Slide 12 of 16
…
763
70.5151
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
Binary
000
001
010
011
100
101
110
111
QUESTION:How many binary “bits” do we need to represent a single Octal digit?
Slide 13 of 16
Octal
0
1
2
3
4
5
6
7
Binary Hex Decimal
0000 0 0
0001 1 1
0010 2 2
0011 3 3
0100 4 4
0101 5 5
0110 6 6
0111 7 7
1000 8 8
1001 9 9
1010 A 10
1011 B 11
1100 C 12
1101 D 13
1110 E 14
1111 F 15
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
Binary Hex Decimal
0000 0 0
0001 1 1
0010 2 2
0011 3 3
0100 4 4
0101 5 5
0110 6 6
0111 7 7
1000 8 8
1001 9 9
1010 A 10
1011 B 11
1100 C 12
1101 D 13
1110 E 14
1111 F 15
QUESTION:How many binary “bits” do we need to represent a single Hexadecimal digit?
Slide 14 of 16
C
Number Systems & ConversionsNumber Systems and Conversion
Friday, January 9 CEC 220 Digital Circuit Design
• Converting to/from Binary, Hex, and Octal An example of converting Binary to Octal
An example of converting Binary to Hexadecimal
Slide 15 of 16
511 2 7
1001101.0101112 = 115.278
D4 5
1001101.0101112 = 4D.5C16
Next Lesson
Friday, January 9 CEC 220 Digital Circuit Design
• Binary Arithmetic• Representation of Negative Numbers
Slide 16 of 16
Recommended