Rabu, 23 Maret 2016

Tabel Kebenaran Half-Substractor


Private Sub Command1_Click()
If x.Text = "0" And y.Text = "0" Then out.Caption = "Borrow = 0, Diff = 0"
If x.Text = "0" And y.Text = "1" Then out.Caption = "Borrow = 1, Diff = 1"
If x.Text = "1" And y.Text = "0" Then out.Caption = "Borrow = 0, Diff = 1"
If x.Text = "1" And y.Text = "1" Then out.Caption = "Borrow = 0, Diff = 0"
If Not (x.Text = "0" Or x.Text = "1") And (y.Text = "0" Or y.Text = "1") Then MsgBox "Plese input 0 and 1", vbCritical
End Sub

Private Sub Command2_Click()
x.Text = ""
y.Text = ""
out.Caption = ""
End Sub

Private Sub Command3_Click()
End
End Sub


Tidak ada komentar:

Posting Komentar