Gerbang XOR adalah suatu
rangkaian logika dasar dimana mempunyai 2 input atau lebih. Prinsif kerja
gerbang logika adalah outputnya akan bernilai 1 apabila inputnya berbeda, dan
outputnya akan bernilai 0 apabila inputnya sama.
Simbol Gerbang XOR
Tabel kebenaran gerbang logika XOR
A
|
B
|
Q
|
0
0
1
1
|
0
1
0
1
|
0
1
1
0
|
Tanel kebenaran
Gerbang Logika XOR 3 , 4 dan 5 input
1. Tabel kebenaran 3 input
Input A
|
Input B
|
Input C
|
Output Q
|
0
|
0
|
0
|
0
|
0
|
0
|
1
|
1
|
0
|
1
|
0
|
1
|
0
|
1
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
0
|
1
|
0
|
1
|
1
|
0
|
0
|
1
|
1
|
1
|
1
|
2. Tabel kebenaran 4 input
Input A
|
Input B
|
Input C
|
Input D
|
Output Q
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
0
|
0
|
1
|
0
|
0
|
1
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
0
|
0
|
0
|
1
|
1
|
1
|
1
|
1
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
1
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
0
|
1
|
1
|
1
|
1
|
1
|
0
|
0
|
0
|
1
|
1
|
0
|
1
|
1
|
1
|
1
|
1
|
0
|
1
|
1
|
1
|
1
|
1
|
0
|
3. Table kebenaran 5 input
Input A
|
Input B
|
Input C
|
Input D
|
Input E
|
Output Q
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
0
|
1
|
0
|
0
|
1
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
0
|
0
|
1
|
1
|
1
|
1
|
0
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
0
|
0
|
0
|
0
|
1
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
1
|
0
|
1
|
0
|
1
|
1
|
1
|
1
|
0
|
1
|
0
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
0
|
0
|
1
|
0
|
0
|
1
|
1
|
1
|
1
|
0
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
0
|
1
|
1
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
0
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
1
|
1
|
1
|
1
|
0
|
1
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
0
|
1
|
1
|
1
|
0
|
0
|
1
|
1
|
1
|
1
|
0
|
1
|
0
|
1
|
1
|
1
|
1
|
0
|
0
|
1
|
1
|
1
|
1
|
1
|
1
|
Kesimpulan : Gerbang XOR, output akan 1, apabila
masukan atau inputnya berbeda, sesuai dengan table kebenaran di atas.
2. Lampu Jalan Akan Menyala Jika Setiap Kali
Switch On Atau Setiap Kali Timer On Dan Hari Gelap Dengan Gambar Sebagai Berikut
A
|
B
|
C
|
C not
|
D = Cnot Ã… B
|
Q/E = (
Cnot Ã… B ) . A
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
0
|
1
|
0
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
0
|
1
|
1
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
1
|
1
|
0
|
1
|
0
|
0
|
0
|
1
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|