• Bilangan Biner diatas terdiri dari 16 bit, bit dengan nilai terendah disebut
least significant bit (LSB), dan bit dengan nilai terbesar disebut most
significant bit (MSB).
Sistem Bilangan Biner
Sistem Bilangan Oktal
• Butuh banyak digit untuk penulisan bil Biner
dibanding desimal.
• Akan menyusahkan untuk baca tulis khusunya
bagi manusia.
• Contoh : 9110 sama dengan 10110112
• Bilangan Oktal sering digunakan untuk
mewakili bil biner dgn digit yg lbh sedikit.
Sistem Bilangan Oktal
• Sistem bilangan Oktal mempunyai basis 8 dan digit yg digunakan: 0, 1, 2, 3,
4, 5, 6, dan 7.
Sistem Bilangan Oktal
• Cara pengkonversian bil Oktal ke desimal :
Sistem Bilangan Oktal
• Karena oktal berbasis 8 (23), maka bil Biner dpt dinyatakan
dlm Oktal dengan mengelompokkan 1 bit biner dalam 1 bit
Oktal.
Sistem Bil. Heksadesimal
• Hexadecimal (hex) menggunakan basis 16.
• Terdiri dari 16 digit yaitu angka 0 hingga 9 dan
huruf A hingga F (yg mewakili 10 hingga 15).
Sistem Bilangan Hex
Sistem Bilangan Hex
• Misal mengubah bil Heksa F1A6 menjadi
desimal:
harga A adalah 10 dan F adalah 15, sehingga
sesuai posisinya 10 dikalikan 161, dan 15
dikalikan 163. sehingga desimal ekivalenya
adalah 61862.
Sistem Bil. Hex
Sistem Bilangan Hex
• Mengubah Hexa ke Biner cukup menuliskan ekivalen biner
masing masing digit ke dalam 4 digit bil biner.
• Contoh :
Konversi Antar Bilangan
• Contoh mengubah bil desimal 3510 ke biner-nya
(basis 2).
35 10 = 1000112
One’s Complement
• Digunakan oleh Peralatan Digital untuk
melakukan perhitungan internal.
• Meng-complement-kan sebuah bil. Biner berarti
mengubahnya menjadi bil negatif.
• Memungkinkan Operasi Aritmetik Pengurangan,
Perkalian, dan Pembagian dilakukan dengan
penambahan berulang.
• contoh, mengurangi 40 dengan 20 dilakukan
dengan mengkomplemenkan 20 shg menjadi -20
dan menjumlahkan dengan 40.
One’s Complement
• Misal kita memiliki sebuah bil biner 101112 - 5-bit
yang mewakili bil desimal 23 yang ingin kita ubah
menjadi bil negatif.
• Ada dua cara menyatakan bil negatif:
• Menempatkan tanda minus didepan angka
–(10111)2
• Metode ini hanya cocok utk manusia, tapi
peralatan akan sulit menafsirkanya, krn
komputer hanya menggunakan bil biner 1
dan 0, tidak mengenal - .
One’s Complement
• One’s complement menempatkan sebuah bit
ekstra (sign bit) pada posisi MSB (paling kiri)
yang menentukan bilangan adalah positif atau
negatif.
• Bilangan Positif jika sign bit adalah 0 dan
negatif jika sign bit adalah 1.
One’s Complement
• Contoh:
• +23 dinyatakan dengan one’s complement:
0 101112 (tebal adalah sign bit)
• Bil negatif dari 10111 diperoleh dengan
menempatkan sebuah 1 pada MSB dan
mengubah masing masing bit pada bilangan (
1 menjadi 0 dan 0 menjadi 1).
One’s Complement
• Shg, one’s complement dari biner 10111 adl:
1 010002
• two’s complement_nya:
–2210 = 1 010102
Two’s Complement
• Jika bil. Yang diketahui adl negatifnya ,
komplemenya (bil Positif) dicari dengan cara yang
sama:
–1410 = 1 100102
+1410 = 0 011102
Sebuah register/word16-bit
Format Word Register
• Untuk penyimpanan, data diwakili baik dengan format biner
langsung (tanpa di-kode-kan) atau menggunakan format
Binary coded decimal (BCD).
Format Binary
• Data yg tersimpan dalam format biner dpt scr langsung diubah ke ekivalen
desimalnya tanpa batasan khusus.
• Sebuah Register 16-bit dpt mewakili harga maksimum 6553510
• Gate AND gate memiliki dua sinyal input (A dan B) dan satu
sinyal output (Y). Output dapat dinyatakan dengen statement
logik:
Y adalah 1 jika A AND B adalah 1.
Ekspresi Booelan yang bersesuaian adalah is:
Y=A•B
Prinsip Aljabar Boolean dan Logik
65
A Simple Switch
• Here is a simple switch used to provide a logic
value:
Vcc Vcc
Vcc, or 1 Gnd, or 0
– AND
– OR
– NOT
67
The AND function
• The AND function:
– If all the inputs are high is the output is high
– If any input is low, the output is low
68
AND Logic Symbol
Inputs Output
69
AND Logic Symbol
0
Inputs 0 Output
0
Determine the output
Animated Slide
70
AND Logic Symbol
0
Inputs 0 Output
1
Determine the output
Animated Slide
71
AND Logic Symbol
1
Inputs 1 Output
1
Determine the output
Animated Slide
72
AND Truth Table
• To help understand the function of a digital
device, a Truth Table is used:
Input Output
Every possible input
combination 0 0 0
0 1 0
1 0 0
1 1 1
AND Function
73
AND Gates
• It is possible to have AND gates with more
than 2 inputs. The same logic rules apply – “if
any input…”
74
The OR function
• The OR function:
– if any input is high, the output is high
– if all inputs are low, the output is low
75
OR Logic Symbol
Inputs Output
76
OR Logic Symbol
0
Inputs 0 Output
0
Determine the output
Animated Slide
77
OR Logic Symbol
0
Inputs 1 Output
1
Determine the output
Animated Slide
78
OR Logic Symbol
1
Inputs 1 Output
1
Determine the output
Animated Slide
79
OR Truth Table
• Truth Table
Input Output
0 0 0
0 1 1
1 0 1
1 1 1
OR Function
80
The NOT function
• The NOT function:
– If any input is high, the output is low
– If any input is low, the output is high
81
NOT Logic Symbol
Input Output
82
NOT Logic Symbol
Output
Input 0 1
Animated Slide
83
NOT Logic Symbol
Output
Input 1 0
Animated Slide
84
NOT Truth Table
• Truth Table
Input Output
0 1
1 0
NOT Function
85
REVIEW
• Digital Electronics works in Binary:
86
REVIEW
• There are 3 basic gates:
88
Exercise 2
2. A bit challenging:
– Convert the binary numbers to their base-10
value:
– 0102= ___10
– 01102=____10
– 10012 = ____10
89
Exercise 3
3. Challenging
– A robot has a motor that:
• goes forward when it gets a logic 1
• stops when it gets a logic 0
– There is a touch sensor switch at the front of the
robot.
90
Exercise 4
4. More Challenging
– A robot has two touch sensors and one motor.
When pushed, the sensors produce a logic 1.
The motor goes forward with a logic 0 and
backward with a logic 1.
– If both sensors sense a touch, go backward. If
only one, or none of the sensors sense a touch,
go forward.
– Draw the sensors, motor and the logic needed.
(Hint: do a truth table)
91
Exercise 5
5. Expert Level
– A robot has three touch sensors (left, right, middle). When pushed,
they produce a logic 0. The robot has two motors (left and right). A
logic 1 will make them go forward and a logic 0 will make them go
backward.
– See the next slide for the desired operation. Design your circuit using
switches, logic gates and motors.
92
Exercise 5
Inputs Outputs
5. Continued L C R L R
0 0 0 0 0
0 0 1 0 1
0 1 0 1 1
0 1 1 1 1
1 0 0 1 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
93
Basic Digital Logic 2
94
Review
• Digital Electronics makes use of 2 states:
– Logic High, or “1”
– Logic Low, or “0”
95
Review
• There are 3 basic digital gates:
– AND
– OR
– NOT
96
Review
97
Review Questions
What is the outcome of the following:
1 1
0
1 1
0 1
98
Basic Digital Logic 2
Basic Combinational Logic, NAND and
NOR gates
99
Combinational Logic
• A circuit that utilizes more that 1 logic
function has Combinational Logic.
100
Combinational logic
• How would your describe the output of this
combinational logic circuit?
101
NAND Gate
• The NAND gate is the combination of an NOT
gate with an AND gate.
102
Combinational logic
• How would your describe the output of this
combinational logic circuit?
103
NOR gate
• The NOR gate is the combination of the NOT
gate with the OR gate.
104
NAND and NOR gates
• The NAND and NOR gates are very popular as
they can be connected in more ways that the
simple AND and OR gates.
105
Exercise 1 – a bit challenging
Complete the Truth Table for the NAND and NOR Gates
NAND NOR
Input Output Input Output
0 0 0 0
0 1 0 1
1 0 1 0
1 1 1 1
Hint: Think of the AND and OR truth tables. The outputs for the NAND and NOR are inverted.
106
Exercise 2 – more challenging
107
Basic Digital Logic 2
Chips and Gates
108
Basic Digital Chips
• Digital Electronics devices are usually in a chip
format.
• The chip is identified with a part number or a
model number.
• A standard series starts with numbers 74, 4, or
14.
– 7404 is an inverter
– 7408 is an AND
– 7432 is an OR
– 4011B is a NAND
109
Chips
Pin 1 Pin 7
110
Chips
Pin 1 Pin 7
111
Chips – Specification Sheet
Voltage
Ground
Vcc IN
OUT
Vcc Probe
114
Karnaugh Map (K-Map)
• Digunakan untuk Penyederhanaan Ekspresi
Boolean atau Logika Digital.
• Terutama untuk ekspresi yang mengandung 3
atau lebih variabel.
A’ A
B’
B
Karnaugh Map (K-Map)
Kita memplot cell dengan bintang * , ketika membentuk gabungan cell, don’t
care dapat diperlakukan baik sebagai 1 atau 0, atau abaikan don’t care
Karnaugh Map (K-Map)
• Don’t care sangat membantu jika kita
dimungkinkan membentuk gabungan yang
lebih besar yang mungkin daripada tanpa
don’t care.