EE-105 Computer Logic Design: Chapter 1 (Lecture 1-5)
EE-105 Computer Logic Design: Chapter 1 (Lecture 1-5)
About Me:
Education:
Areas of Interest:
(PhD in progress)
MSc Computer Engineering from UET Taxila.
BSc Computer Engineering form UET Taxila.
Digital Communication.
Wireless Communication.
Cognitive Radios.
Location:
semester
Discipline: I expect you to remain disciplined in the
Important Notes-contd..
Grading Policy
:
:
:
:
:
15%
15%
15%
50%
5%
Reading
Text book:
Micheal D.Ciletti
Information Processing
Numbers
Text
Formula and Equations
Drawings and Pictures
Sound and Music
10
GND
11
12
13
Vcc
7400
10
Combinational Circuit
11
Sequential Circuit
12
Configurable Hardware
Combinational Circuits
Sequential Circuits
Lower Cost
Short development time
Memory
Storage
RAM (Random Access Memory)
Read-Write
Volatile
Read-Only
Non-Volatile
Base or Radix 10
Weight 1, 10, 100, 1000 .
Representing Fractions
Sum of Weights
Combination of Bits
100112 = 1910
= (1 x 24) + (0 x 23) + (0 x 22) + (1 x 21)
+ (1 x 20)
= (1 x 16) + (0 x 8) + (0 x 4) + (1 x 2)
+ (1 x 1)
= 16 + 0 + 0 + 2 + 1
= 19
Binary Number
Decimal Number
Binary Number
10
1010
11
1011
10
12
1100
11
13
1101
100
14
1110
101
15
1111
110
16
10000
111
17
10001
1000
18
10010
1001
19
10011
Fractions in Binary
Fractions in Binary
1011.1012 = 11.625
= (1 x 23) + (0 x 22) + (1 x 21) + (1 x 20)
+ (1 x 2-1) + (0 x 2-2) + (1 x 2-3)
= (1 x 8) + (0 x 4) + (1 x 2) + (1 x 1)
+ (1 x 1/2) + (0 x 1/4) + (1 x 1/8)
= 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125
= 11.625
= 11 + 5/8
= 11.625
Decimal-Binary Conversion
Sum-of-Weights
Adding weights of non-zero terms
Repeated Division by 2
392
196
(b 0)
196
98
(b 1)
98
49
(b 2)
49
24
(b 3)
24
12
(b 4)
12
(b 5)
(b 6)
(b 7)
(b 8)
Repeated multiplication by 2
Number
Mult. By 2
Integer
0.8125
1.625
(b-1)
0.625
1.250
(b-2)
0.250
0.500
(b-3)
0.500
1.000
(b-4)
26
Binary Arithmetic
Binary Addition
Binary Subtraction
Binary Multiplication
Binary Division
Binary Addition
1st digit
0
0
1
1
Carry
0
0
0
1
Binary Addition
Carry
10
1st Number
2nd Number
3rd Number
4th Number
Result
Binary Subtraction
1st digit
0
0
1
1
Borrow
0
1
0
0
Binary Subtraction
Borrow
1st Number
1
1
2nd Number
Result
Representations of Binary
Number
1.
2.
3.
32
Unsigned Representation
33
Signed Representation
34
2s Complement
Representation
35
2s Complement form
1s complement form
2s complement form
(13)
1
(-13)
0000
0001
0010
0011
0100
0101
0110
0111
0000
0001
0010
0011
0100
0101
0110
0111
000
001
010
011
100
101
110
111
1111
1110
1101
1100
1011
1010
1001
1000
1001
1010
1011
1100
1101
1110
1111
Exercise
39
-5
-2
-7
Signed Binary
0101
0010
0111
1101
1010
10111
+5
+2
+7
-5
-2
-7
+5
-2
+3
0101
1010
1111
+5
-2
+3
1011
0010
1101
-5
+2
-3
1101
0010
1111
-5
+2
-3
-5
-3
-8
1011
1100
10111
-5
-4
-9
0101
0100
1001 +9
+5
+4
Base 16
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Representing Binary in compact form
11011000001102 = 1B06 H
Counting in Hexadecimal
Decimal Binary
Hexadecimal
Decimal Binary
Hexadecimal
0000
1000
0001
1001
0010
10
1010
0011
11
1011
0100
12
1100
0101
13
1101
0110
14
1110
0111
15
1111
Counting in Hexadecimal
Decimal HexaDecimal
Decimal HexaDecimal
Decimal HexaDecimal
16
10
24
18
32
20
17
11
25
19
33
21
18
12
26
1A
34
22
19
13
27
1B
35
23
20
14
28
1C
36
24
21
15
29
1D
37
25
22
16
30
1E
38
26
23
17
31
1F
39
27
Binary-Hexadecimal Conversion
11010110101110010110
1101 0110 1011 1001 0110
D
6
B
9
6
Decimal-Hexadecimal Conversion
Repeated Division by 16
Number
Quotient
Remainder
2096
131
131
Hexadecimal-Decimal Conversion
Sum-of-Weights
CA02
(C x 163) + (A x 162) + (0 x 161) + (2 x 160)
(12 x 163) + (10 x 162) + (0 x 161) + (2 x 160)
(12 x 4096) + (10 x 256) + (0 x 16) + (2 x 1)
49152 + 2560 + 0 + 2
51714
Base 8
0, 1, 2, 3, 4, 5, 6, 7
Representing Binary in compact form
11011000001102 = 154068
Counting in Octal
Counting in Octal
Decimal
0
1
2
3
4
5
6
7
Binary
000
001
010
011
100
101
110
111
Octal
0
1
2
3
4
5
6
7
Counting in Octal
Decimal Octal Decimal Octal
8
10
16
20
9
11
17
21
Decimal Octal
24
30
25
31
10
11
12
13
14
15
26
27
28
29
30
31
12
13
14
15
16
17
18
19
20
21
22
23
22
23
24
25
26
27
32
33
34
35
36
37
011010110101110010110
011 010 110 101 110 010 110
3 2 6 5 6 2 6
1011011101001
1 011 011 101 001
001 011 011 101 001
1 3 3
5 1
1726
001 111 010 110
Decimal-Octal Conversion
Repeated Division by 8
Number
Quotient
Remainder
2079
259
(a0)
259
32
(a1)
32
(a2)
(a3)
Octal-Decimal Conversion
Sum-of-Weights
4037
(4 x 83) + (0 x 82) + (3 x 81) + (7 x 80)
(4 x 512) + (0 x 64) + (3 x 8) + (7 x 1)
2048 + 0 + 24 + 7
2079
Alternate Representations
BCD Code
Gray Code
BCD
0000
0001
0010
0011
0100
Decimal
5
6
7
8
9
BCD
0101
0110
0111
1000
1001
BCD Addition
23
45
68
0010 0011
0100 0101
0110 1000
23
0010 0011
49
0100 1001
72
0110 1100
1100 is illegal BCD number
BCD Addition
0010 0011
0100 1001
0110 1100
0110
0111 0010
Gray Code
Decimal
0
1
2
3
4
5
6
7
Gray
000
001
011
010
110
111
101
100
Binary
000
001
010
011
100
101
110
111
Boolean Logic
Logic Gates
AND Gate
1 output
2 inputs
3 inputs
4 inputs
Multiple inputs
B
0
1
0
1
Output
F
0
0
0
1
F A B
F A B C .... N
OR Gate
1 output
2 inputs
3 inputs
4 inputs
Multiple inputs
OR Gate function
B
0
1
0
1
Output
F
0
1
1
1
F A B
F A B C .. N
NOT Gate
1 input
1 output
Invert function
Input
Output
FA
Questions?
79