DC Lecture 1
DC Lecture 1
1. Digital Systems
2. Binary Numbers
3. Number-base Conversions
4. Octal and Hexadecimal Numbers
5. Complements
6. Signed Binary Numbers
7. Binary Codes
8. Binary Storage and Registers
9. Binary Logic
Outline
1. Digital Systems
2. Binary Numbers
3. Number-base Conversions
4. Octal and Hexadecimal Numbers
5. Complements
6. Signed Binary Numbers
7. Binary Codes
8. Binary Storage and Registers
9. Binary Logic
Digital Systems & Binary Numbers
Introduction
The Information Age (also known as the Computer Age, Digital Age,
Internet Age, and Information Era) is an idea that the current age will
be characterized by the ability of individuals to transfer information
freely and to have instant access to knowledge that would have been
difficult or impossible to find previously.
رة و ر ا و ت( ھو، و ر ا ر ت، وا ر ا ر،و ر را م ً ر ا و ت )ا روف أ
ن ول ا "وري ( ا ر * ا$ وا،* ر$ ز &درة ا' راد ( &ل ا و ت وف $ " دھ أن ا ر ا
. &ً , ور0 ل ا$ أن ن ن ا ب أو ا, -.
The idea is linked to the concept of a "Digital Age" or "Digital
Revolution," and carries the ramifications of a shift from traditional
industry that the Industrial Revolution brought through
industrialization, to an economy based around the manipulation of
information.
, 4 *ا & د*ا ول ن ا$ ل دا ت ا$ و،"* ورة ا ر0 وم "ا ر ا ر " أو "ا," و ر ط ا " رة
6 .و ت ب5 م ( ا9 د إ ( ا،7 ل ا56 * ن ورة ا0 ا
Digital Systems & Binary Numbers
Introduction (Cont.)
Analog System
– The physical quantities or signals may vary continuously over a specified
range.
Digital system
– The physical quantities or signals can assume only discrete values.
– Greater accuracy
8
Digital Systems & Binary Numbers
Binary Digital Signal
10
Digital Systems & Binary Numbers
Number Systems- 2. Octal Number System
Base = 8
2 1 0 -1 -2
– 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }
5 1 2 7 4
Weights
82 81 80 8-1 8-2
Position
– Weight = (Base) 64 8 1 1/8 1/64
Magnitude 5 *64 +1*8 + 2*1+ 7/8+ 4/64
11
Digital Systems & Binary Numbers
Number Systems- 3. Binary Number System
Base = 2
– 2 digits { 0, 1 }, called binary digits or “bits”
2 1 0 -1 -2
Weights
Position 1 0 1 0 1
– Weight = (Base)
22 21 20 2-1 2-2
Magnitude 4 2 1 1/2 1/4
1 *4 + 0*2 + 1*1 + 0*1/2+ 1*1/4
– Sum of “Bit x Weight”
=(5.25)10
Formal Notation
(101.01)2
Base = 16
– 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }
2 1 0 -1 -2
Weights
– Weight = (Base)
Position 1 E 5 7 A
162 161 160 16-1 16-2
Magnitude
256 16 1 1/16 1/256
– Sum of “Digit x Weight”
Formal Notation 1 *256+14 *16 + 5 *1+ 7 /16 +10 /256
=(485.4765625)10
(1E5.7A)16
13
Digital Systems & Binary Numbers
The Power of 2
n 2n n 2n
0 20=1 8 28=256
1 21=2 9 29=512
2 22=4 10 210=1024 Kilo
3 23=8 11 211=2048
4 24=16 12 212=4096
5 25=32 20 220=1M Mega
14
Digital Systems & Binary Numbers
Decimal Addition
1 1 Carry
5 5
+ 5 5
1 1 0
= Ten ≥ Base
Subtract a Base
15
Digital Systems & Binary Numbers
Binary Addition
Column Addition
1 1 1 1 1 1
1 1 1 1 0 1 = 61
+ 1 0 1 1 1 = 23
1 0 1 0 1 0 0 = 84
≥ (2)10
16
Digital Systems & Binary Numbers
Binary Subtraction
1 0 0 1 1 0 1 = 77
− 1x24 0x23 1x22 1x21 1x20
1 0 1 1 1 = 23
0 1 1 0 1 1 0 = 54
17
Digital Systems & Binary Numbers
Binary Subtraction (Cont.)
1 2 = (10)2
0 2 2 0 0 2
1 0 0 1 1 0 1 = 77
− 1 0 1 1 1 = 23
0 1 1 0 1 1 0 = 54
18
Digital Systems & Binary Numbers
Binary Multiplication
Bit by bit
1 0 1 1 1
x 1 0 1 0
0 0 0 0 0
1 0 1 1 1
0 0 0 0 0
+ 1 0 1 1 1
1 1 1 0 0 1 1 0
19
Outline
1. Digital Systems
2. Binary Numbers
3. Number-base Conversions
4. Octal and Hexadecimal Numbers
5. Complements
6. Signed Binary Numbers
7. Binary Codes
8. Binary Storage and Registers
9. Binary Logic
Digital Systems & Binary Numbers
Number Base Conversions
Evaluate
Magnitude
Octal
(Base 8)
Evaluate
Magnitude
Decimal Binary
(Base 10) (Base 2)
Hexadecimal
(Base 16)
Evaluate
Magnitude
21
Digital Systems & Binary Numbers
Decimal (Integer) To Binary Conversion
Example: (13)10
Quotient Remainder Coefficient
13/ 2 = 6 1 a0 = 1
6 /2= 3 0 a1 = 0
3 /2= 1 1 a2 = 1
1 /2= 0 1 a3 = 1
Answer: (13)10 = (a3 a2 a1 a0)2 = (1101)2
Example: (0.625)10
Integer Fraction Coefficient
0.625 * 2 = 1 . 25 a-1 = 1
0.25 * 2 = 0 . 5 a-2 = 0
0.5 *2= 1 . 0 a-3 = 1
Answer: (0.625)10 = (0.a-1 a-2 a-3)2 = (0.101)2
MSB LSB
23
Digital Systems & Binary Numbers
Decimal To Octal Conversion
Example: (175)10
Quotient Remainder Coefficient
175 / 8 = 21 7 a0 = 7
21 / 8 = 2 5 a1 = 5
2 /8= 0 2 a2 = 2
Answer: (175)10 = (a2 a1 a0)8 = (257)8
Example: (0.3125)10
Integer Fraction Coefficient
0.3125 * 8 = 2 . 5 a-1 = 2
0.5 *8= 4 . 0 a-2 = 4
Answer: (0.3125)10 = (0.a-1 a-2)8 = (0.24)8
24
Outline
1. Digital Systems
2. Binary Numbers
3. Number-base Conversions
4. Octal and Hexadecimal Numbers
5. Complements
6. Signed Binary Numbers
7. Binary Codes
8. Binary Storage and Registers
9. Binary Logic
Digital Systems & Binary Numbers
Binary To Octal Conversion
Octal Binary
8 = 23
Each group of 3 bits represents an octal digit 0 000
1 001
Example:
( 2 6 . 2 )8
( 0 1 0 1 1 0 . 0 1 0 )2
(1 6 . 4 )16