You are on page 1of 15

Pertemuan 16

SUBSTRAKTOR
SUBSTRACTOR

1. Pengurangan Langsung
2. Penjumlahan dengan bilangan Negatif
Pengurangan Langsung
• Half Substractor
• Full Substractor
Penjumlahan dengan bilangan Negatif
• K-1
• K-2
• K-9
Representation of Negative Numbers
• Signed-Magnitude System/Representation:
– sign bit :
• 0: plus
• 1: minus
– Contoh :
• +8510 ………….. 010101012
• -8510 ............. 110101012
• + 12710 ………. 011111112
• -12710 …………111111112

KU College of Engineering
5
Elec 204: Digital Systems Design
One’s Complement Representation
• One’s complement (K1)
Contoh :
TMF 1710 = 000100012
K-1 -1710 = 111011102

KU College of Engineering
6
Elec 204: Digital Systems Design
Two’s Complement (K2)
Contoh :

1710 000100012 00002


11101110 1111
+_______1 +___1
111011112 = -1710 100002

KU College of Engineering
7
Elec 204: Digital Systems Design
Two’s complement addition
-3 1101 -2 1110 -1 1111
+1 0001 +1 0001 +1 0001
-2 1110 -1 1111 0 10000

• Subtract n (add –n) 0000


0001
– Add 16-n 1111
subt -1 0 1
– Surprisingly (?) 16-n is 4-bit -2 2 add
3
two’s complement of n,
that is (-n).
-7 -8 7 0111
1001 1000

KU College of Engineering
8
Elec 204: Digital Systems Design
BCD: Binary-Coded Decimal
• 0-9 encoded with their 4-bit unsigned binary
representation (0000 – 1001). The codewords (1010 –
1111) are not used.
• 8-bit byte represent values from 0 to 99.
• BCD Addition:
Carry 1 1
448 0100
0100 1000
+ 489 0100
1000 1001
937 Sum 1001
1101 10001
Add 6 + 0110 + 0110
BCD sum 1 0011 1 0111
BCD result 1001 0011 0111

KU College of Engineering
9
Elec 204: Digital Systems Design
Operasi Pengurangan
Misal :

9 + (-5) = 4 11 01
0110
• Dalam BCD :
0011
1001 1
0101 0100
1001
0100
1101
Latihan
• Lakukan operasi penjumlahan bilangan BCD
dengan bilangan negatif menggunakan Sistem
Komplemen 9
1. 9 + (-7) = ….. 4. 12 + (-7)
2. 13 + (-5) = …… 5. 6 + (-9)
3. 8 + (-6) = …. 6. 6 + (-6)
Konversi BCD ke K-9
B3 B2 B1 B0 K3 K2 K1 K0
K3 = B3’ B2’B1’
0 0 0 0 1 0 0 1
K2 = B2 XOR B1
0 0 0 1 1 0 0 0 K1 = B1
0 0 1 0 0 1 1 1 K0 = B0’
0 0 1 1 0 1 1 0
0 1 0 0 0 1 0 1
0 1 0 1 0 1 0 0
0 1 1 0 0 0 1 1
0 1 1 1 0 0 1 0
1 0 0 0 0 0 0 1
1 0 0 1 0 0 0 0
Rangkaiannya
Rangkaian BCD Substractor
EXCESS 3
• 7 + (- 3) = 4
0111
BCD
0011
1010
EX-3
0110
1010 K- 1
1001
0011
1
0100

You might also like