Beruflich Dokumente
Kultur Dokumente
DIGITAL ELECTRONICS
CHAPTER 1:
NUMBER SYSTEMS
AD
converter
Discrete signal
DA
converter
Analog signal
0 1 0 1 0 1 0 1 0 1 0 1 0 1
Digital
waveform
The OR operation
When any input is HIGH, the
output is HIGH
When both inputs are LOW, the
output is LOW
1 2 3
.....10 10 10 10 10 10 .......
2 1 0
1 2 3
.....2 2 2 2 2 2 .......
2 1 0
.....16 16 16 16 16 16 .......
5 4 3 2 1 0
1 2 3
.....16 16 16 16 16 16 .......
2 1 0
Decimal, 0
1
0000
0001
0
1
Binary, 2 0010 2
3 0011 3
Hexadecimal 4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Octal
Has eight digit (0,1,2,3,4,5,6,7)
Has a base of eight ( N) 8
The weights for whole numbers are positive
powers of 8 that increase from right to left
beginning with 80 1
.....8 8 8 8 8 8 .......
5 4 3 2 1 0
1 2 3
.....8 8 8 8 8 8 .......
2 1 0
Solution:
110112
1 2 4 1 23 0 2 2 1 21 1 20
16 8 0 2 1
2710
Solution:
1001.012
1 23 0 2 2 0 21 1 20 0 2 1 1 2 2
8 0 0 1 0 0.25
9.2510
1011001011112 B2F16
Solution
Successive division 2 25
12
2 1 LSB
2 6 0
2 3 0
2 1 1
1 MSB
0
2510 110012
LSB=Least Significant Bit
MSB=Most Significant Bit
integer Remainder
Solution : 16 634 10==A LSB
Carry Fraction
16 39 7==7 0.328125
16 2 x 16
2==2 MSB
MSB 5 0.250000
0 x 16
LSB 4 0.000000
634.32812510 27 A.5416
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Hexadecimal to decimal
Example :
Convert AB516 to decimal number.
Solution :
AB516 A 16 2 B 161 5 160
10 256 1116 5 1
2560 176 5
274110
1
0 0 1 1
0 1 0 1
0 1 1 10
0 1 1 1 01
1 0 1 1 11 1 0 1 1 01
01 1 1 01 00 1 0 11
1 0 01 10 0 1 0 10 10 1
1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 1 1 11
01 1 1 01
0 10 0 1 0
1 0 1 1
11
1 0 11
1 0 1 1
10 0 0 01
0 0 0 1 1 0 0 1
1 0 0 1 1 0 0 1
For example
0 1 0 0 0 1 0 0
1 0 1 1 1 0 1 1
A negative number is the 1s complement of the corresponding
positive number.
1 0 1 1 1 0 1 1
1 1 1
1 0 1 1 1 1 0 0
In the 2s complement form, a negative number is the 2s
complement of the corresponding positive number.
Solution :
First, write 8-bit number for +39
00100111
0 0 1 0 0 1 1 1
1 0 1 0 0 1 1 1
0 0 1 0 0 1 1 1
1 1 0 1 1 0 0 0
0 0 1 0 0 1 1 1
1 1 0 1 1 0 0 0
1
1 1 0 1 1 0 0 1
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Hardware subtract execution
Digital circuit do not perform subtraction but actually it
is a special case of addition using 2s complement
The sign of a +ve or ve binary number is changed by
taking its 2s complement
To substract two signed numbers, take the 2s
complement of the subtrahend and add.
Solution :
Step 1 : convert the decimal number into 8 bits binary
number
72 0 1 0 0 1 0 0 0 minuend
27 0 0 0 1 1 0 1 1 subtrahend
45 ?
0 0 0 1 1 0 1 1
1 1 1 0 0 1 0 0
1 1 1 0 0 1 0 0
1
1 1 1 0 0 1 0 1
0 1 0 0 1 0 0 0
1 1 1 0 0 1 0 1
1 0 0 1 0 1 1 0 1
001011012 4510
Example:
(i) 00001000-00000011
(ii) 00001100-11110111
(iii) 11100111-00010011
(iv) 10001000-11100010
(ii) 00001100-11110111
(iv) 10001000-11100010
12 ( 9) = 12 + 9 =21
120 (30) = 120 + = 90
00001100
10001000
+ 00001001
+ 00011110
= 00010101
= 10100110