VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H0080C0FF&
   Caption         =   "Cумматор"
   ClientHeight    =   6048
   ClientLeft      =   2568
   ClientTop       =   1428
   ClientWidth     =   7032
   LinkTopic       =   "Form1"
   ScaleHeight     =   6048
   ScaleWidth      =   7032
   Begin VB.TextBox txtP 
      Height          =   375
      Index           =   7
      Left            =   5640
      TabIndex        =   45
      Top             =   4560
      Width           =   1095
   End
   Begin VB.TextBox txtP 
      Height          =   375
      Index           =   6
      Left            =   5640
      TabIndex        =   44
      Top             =   3960
      Width           =   1095
   End
   Begin VB.TextBox txtP 
      Height          =   375
      Index           =   5
      Left            =   5640
      TabIndex        =   43
      Top             =   3360
      Width           =   1095
   End
   Begin VB.TextBox txtP 
      Height          =   375
      Index           =   4
      Left            =   5640
      TabIndex        =   42
      Top             =   2760
      Width           =   1095
   End
   Begin VB.TextBox txtS 
      Height          =   375
      Index           =   7
      Left            =   4320
      TabIndex        =   41
      Top             =   4560
      Width           =   1095
   End
   Begin VB.TextBox txtS 
      Height          =   375
      Index           =   6
      Left            =   4320
      TabIndex        =   40
      Top             =   3960
      Width           =   1095
   End
   Begin VB.TextBox txtS 
      Height          =   375
      Index           =   5
      Left            =   4320
      TabIndex        =   39
      Top             =   3360
      Width           =   1095
   End
   Begin VB.TextBox txtS 
      Height          =   375
      Index           =   4
      Left            =   4320
      TabIndex        =   38
      Top             =   2760
      Width           =   1095
   End
   Begin VB.TextBox txtP0 
      Height          =   375
      Index           =   7
      Left            =   2880
      TabIndex        =   37
      Text            =   "True"
      Top             =   4560
      Width           =   1095
   End
   Begin VB.TextBox txtP0 
      Height          =   375
      Index           =   6
      Left            =   2880
      TabIndex        =   36
      Text            =   "False"
      Top             =   3960
      Width           =   1095
   End
   Begin VB.TextBox txtP0 
      Height          =   375
      Index           =   5
      Left            =   2880
      TabIndex        =   35
      Text            =   "True"
      Top             =   3360
      Width           =   1095
   End
   Begin VB.TextBox txtP0 
      Height          =   375
      Index           =   4
      Left            =   2880
      TabIndex        =   34
      Text            =   "False"
      Top             =   2760
      Width           =   1095
   End
   Begin VB.TextBox txtP0 
      Height          =   375
      Index           =   3
      Left            =   2880
      TabIndex        =   33
      Text            =   "True"
      Top             =   2160
      Width           =   1095
   End
   Begin VB.TextBox txtP0 
      Height          =   375
      Index           =   2
      Left            =   2880
      TabIndex        =   32
      Text            =   "False"
      Top             =   1560
      Width           =   1095
   End
   Begin VB.TextBox txtP0 
      Height          =   375
      Index           =   1
      Left            =   2880
      TabIndex        =   31
      Text            =   "True"
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox txtP0 
      Height          =   375
      Index           =   0
      Left            =   2880
      TabIndex        =   30
      Text            =   "False"
      Top             =   360
      Width           =   1095
   End
   Begin VB.TextBox txtB 
      Height          =   375
      Index           =   7
      Left            =   1560
      TabIndex        =   29
      Text            =   "True"
      Top             =   4560
      Width           =   1095
   End
   Begin VB.TextBox txtB 
      Height          =   375
      Index           =   6
      Left            =   1560
      TabIndex        =   28
      Text            =   "True"
      Top             =   3960
      Width           =   1095
   End
   Begin VB.TextBox txtB 
      Height          =   375
      Index           =   5
      Left            =   1560
      TabIndex        =   27
      Text            =   "False"
      Top             =   3360
      Width           =   1095
   End
   Begin VB.TextBox txtB 
      Height          =   375
      Index           =   4
      Left            =   1560
      TabIndex        =   26
      Text            =   "False"
      Top             =   2760
      Width           =   1095
   End
   Begin VB.TextBox txtA 
      Height          =   375
      Index           =   7
      Left            =   240
      TabIndex        =   25
      Text            =   "True"
      Top             =   4560
      Width           =   1095
   End
   Begin VB.TextBox txtA 
      Height          =   375
      Index           =   6
      Left            =   240
      TabIndex        =   24
      Text            =   "True"
      Top             =   3960
      Width           =   1095
   End
   Begin VB.TextBox txtA 
      Height          =   375
      Index           =   5
      Left            =   240
      TabIndex        =   23
      Text            =   "True"
      Top             =   3360
      Width           =   1095
   End
   Begin VB.TextBox txtA 
      Height          =   375
      Index           =   4
      Left            =   240
      TabIndex        =   22
      Text            =   "True"
      Top             =   2760
      Width           =   1095
   End
   Begin VB.CommandButton cmdP 
      Caption         =   "Перенос P"
      Height          =   375
      Left            =   3960
      TabIndex        =   21
      Top             =   5280
      Width           =   1575
   End
   Begin VB.CommandButton cmdS 
      Caption         =   "Сумма S"
      Height          =   375
      Left            =   1680
      TabIndex        =   20
      Top             =   5280
      Width           =   1575
   End
   Begin VB.TextBox txtP 
      Height          =   375
      Index           =   3
      Left            =   5640
      TabIndex        =   15
      Top             =   2160
      Width           =   1095
   End
   Begin VB.TextBox txtP 
      Height          =   375
      Index           =   2
      Left            =   5640
      TabIndex        =   14
      Top             =   1560
      Width           =   1095
   End
   Begin VB.TextBox txtP 
      Height          =   375
      Index           =   1
      Left            =   5640
      TabIndex        =   13
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox txtP 
      Height          =   375
      Index           =   0
      Left            =   5640
      TabIndex        =   12
      Top             =   360
      Width           =   1095
   End
   Begin VB.TextBox txtS 
      Height          =   375
      Index           =   3
      Left            =   4320
      TabIndex        =   11
      Top             =   2160
      Width           =   1095
   End
   Begin VB.TextBox txtS 
      Height          =   375
      Index           =   2
      Left            =   4320
      TabIndex        =   10
      Top             =   1560
      Width           =   1095
   End
   Begin VB.TextBox txtS 
      Height          =   375
      Index           =   1
      Left            =   4320
      TabIndex        =   9
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox txtS 
      Height          =   375
      Index           =   0
      Left            =   4320
      TabIndex        =   8
      Top             =   360
      Width           =   1095
   End
   Begin VB.TextBox txtB 
      Height          =   375
      Index           =   3
      Left            =   1560
      TabIndex        =   7
      Text            =   "True"
      Top             =   2160
      Width           =   1095
   End
   Begin VB.TextBox txtB 
      Height          =   375
      Index           =   2
      Left            =   1560
      TabIndex        =   6
      Text            =   "True"
      Top             =   1560
      Width           =   1095
   End
   Begin VB.TextBox txtB 
      Height          =   375
      Index           =   1
      Left            =   1560
      TabIndex        =   5
      Text            =   "False"
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox txtB 
      Height          =   375
      Index           =   0
      Left            =   1560
      TabIndex        =   4
      Text            =   "False"
      Top             =   360
      Width           =   1095
   End
   Begin VB.TextBox txtA 
      Height          =   375
      Index           =   3
      Left            =   240
      TabIndex        =   3
      Text            =   "False"
      Top             =   2160
      Width           =   1095
   End
   Begin VB.TextBox txtA 
      Height          =   375
      Index           =   2
      Left            =   240
      TabIndex        =   2
      Text            =   "False"
      Top             =   1560
      Width           =   1095
   End
   Begin VB.TextBox txtA 
      Height          =   375
      Index           =   1
      Left            =   240
      TabIndex        =   1
      Text            =   "False"
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox txtA 
      Height          =   375
      Index           =   0
      Left            =   240
      TabIndex        =   0
      Text            =   "False"
      Top             =   360
      Width           =   1095
   End
   Begin VB.Label lblP0 
      Alignment       =   2  'Center
      BackColor       =   &H00C0E0FF&
      Caption         =   "P0"
      Height          =   255
      Left            =   3120
      TabIndex        =   46
      Top             =   0
      Width           =   495
   End
   Begin VB.Label lblP 
      Alignment       =   2  'Center
      BackColor       =   &H00C0E0FF&
      Caption         =   "P"
      Height          =   255
      Left            =   5880
      TabIndex        =   19
      Top             =   0
      Width           =   495
   End
   Begin VB.Label дидЫ 
      Alignment       =   2  'Center
      BackColor       =   &H00C0E0FF&
      Caption         =   "S"
      Height          =   255
      Left            =   4560
      TabIndex        =   18
      Top             =   0
      Width           =   495
   End
   Begin VB.Label lblB 
      Alignment       =   2  'Center
      BackColor       =   &H00C0E0FF&
      Caption         =   "B"
      Height          =   255
      Left            =   1800
      TabIndex        =   17
      Top             =   0
      Width           =   495
   End
   Begin VB.Label lblA 
      Alignment       =   2  'Center
      BackColor       =   &H00C0E0FF&
      Caption         =   "A"
      Height          =   255
      Left            =   480
      TabIndex        =   16
      Top             =   0
      Width           =   495
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim blnA, blbB, blnP0, blnS, blnP As Boolean, bytI As Byte
Private Sub cmdP_Click()
For bytI = 0 To 7
blnA = txtA(bytI)
blnB = txtB(bytI)
blnP0 = txtP0(bytI)
blnP = (blnA And blnB) Or (blnA And blnP0) Or (blnB And blnP0)
txtP(bytI) = blnP
Next bytI
End Sub
Private Sub cmdS_Click()
For bytI = 0 To 7
blnA = txtA(bytI)
blnB = txtB(bytI)
blnP0 = txtP0(bytI)
blnP = (blnA And blnB) Or (blnA And blnP0) Or (blnB And blnP0)
blnS = (blnA Or blnB Or blnP0) And Not blnP Or (blnA And blnB And blnP0)
txtS(bytI) = blnS
Next bytI
End Sub
