-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
230 lines (223 loc) · 6.47 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!DOCTYPE html>
<html lang="en">
<head>
<title>Karnaugh Maps</title>
<link rel="stylesheet" href="stylesheet.css">
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=" crossorigin="anonymous"></script>
<script src="app.js"></script>
</head>
<body>
<div class="contain">
<div style="text-align:center" class="e0">
<table class="kmap">
<tr>
<td class="lines">
<input id="ab1" type="text" size="2" value="AB">
<br>
<input id="cd1" type="text" size="2" value="CD">
</td>
<td class="label top zero">00</td>
<td class="label top one">01</td>
<td class="label top three">11</td>
<td class="label top two">10</td>
</tr>
<tr class="row zero">
<td class="label left zero">00</td>
<td id="mt0" class="col zero">
<strong class="value" >0</strong>
<small class="minterm">0</small>
</td>
<td id="mt4" class="col one">
<strong class="value">0</strong>
<small class="minterm">4</small>
</td>
<td id="mt12" class="col three">
<strong class="value">0</strong>
<small class="minterm">12</small>
</td>
<td id="mt8" class="col two">
<strong class="value">0</strong>
<small class="minterm">8</small>
</td>
</tr>
<tr class="row one">
<td class="label left one">01</td>
<td id="mt1" class="col zero">
<strong class="value">0</strong>
<small class="minterm">1</small>
</td>
<td id="mt5" class="col one">
<strong class="value">0</strong>
<small class="minterm">5</small>
</td>
<td id="mt13" class="col three">
<strong class="value">0</strong>
<small class="minterm">13</small>
</td>
<td id="mt9" class="col two">
<strong class="value">0</strong>
<small class="minterm">9</small>
</td>
</tr>
<tr class="row three">
<td class="label left three">11</td>
<td id="mt3" class="col zero">
<strong class="value">0</strong>
<small class="minterm">3</small>
</td>
<td id="mt7" class="col one">
<strong class="value">0</strong>
<small class="minterm">7</small>
</td>
<td id="mt15" class="col three">
<strong class="value">0</strong>
<small class="minterm">15</small>
</td>
<td id="mt11" class="col two">
<strong class="value">0</strong>
<small class="minterm">11</small>
</td>
</tr>
<tr class="row two">
<td class="label left two">10</td>
<td id="mt2" class="col zero">
<strong class="value">0</strong>
<small class="minterm">2</small>
</td>
<td id="mt6" class="col one">
<strong class="value">0</strong>
<small class="minterm">6</small>
</td>
<td id="mt14" class="col three">
<strong class="value">0</strong>
<small class="minterm">14</small>
</td>
<td id="mt10" class="col two">
<strong class="value">0</strong>
<small class="minterm">10</small>
</td>
</tr>
</table>
<br>
<p class="elabel">E=0</p>
</div>
<div style="text-align:center" class="e1">
<table class="kmap">
<tr>
<td class="lines">
<input id="ab2" type="text" size="2" value="AB">
<br>
<input id="cd2" type="text" size="2" value="CD">
</td>
<td class="label top">00</td>
<td class="label top">01</td>
<td class="label top">11</td>
<td class="label top">10</td>
</tr>
<tr>
<td class="label left">00</td>
<td id="mt16">
<strong class="value" >0</strong>
<small class="minterm">16</small>
</td>
<td id="mt20">
<strong class="value">0</strong>
<small class="minterm">20</small>
</td>
<td id="mt28">
<strong class="value">0</strong>
<small class="minterm">28</small>
</td>
<td id="mt24">
<strong class="value">0</strong>
<small class="minterm">24</small>
</td>
</tr>
<tr>
<td class="label left">01</td>
<td id="mt17">
<strong class="value">0</strong>
<small class="minterm">17</small>
</td>
<td id="mt21">
<strong class="value">0</strong>
<small class="minterm">21</small>
</td>
<td id="mt29">
<strong class="value">0</strong>
<small class="minterm">29</small>
</td>
<td id="mt25">
<strong class="value">0</strong>
<small class="minterm">25</small>
</td>
</tr>
<tr>
<td class="label left">11</td>
<td id="mt19">
<strong class="value">0</strong>
<small class="minterm">19</small>
</td>
<td id="mt23">
<strong class="value">0</strong>
<small class="minterm">23</small>
</td>
<td id="mt31">
<strong class="value">0</strong>
<small class="minterm">31</small>
</td>
<td id="mt27">
<strong class="value">0</strong>
<small class="minterm">27</small>
</td>
</tr>
<tr>
<td class="label left">10</td>
<td id="mt18">
<strong class="value">0</strong>
<small class="minterm">18</small>
</td>
<td id="mt22">
<strong class="value">0</strong>
<small class="minterm">22</small>
</td>
<td id="mt30">
<strong class="value">0</strong>
<small class="minterm">30</small>
</td>
<td id="mt26">
<strong class="value">0</strong>
<small class="minterm">26</small>
</td>
</tr>
</table>
<br>
<p class="elabel">E=1</p>
</div>
</div>
<br>
<div class="console">
<input type="text" name="color" placeholder="Color">
<input type="text" name="start" placeholder="Top left minterm">
<input type="text" name="end" placeholder="Bottom right minterm">
<input type="submit" value="Draw!" onclick="draw()">
<br>
<div>
<div>
<label for="mintermToggle">Show minterm numbers:</label>
<input type="checkbox" class='mintermToggle' id="mintermToggle" checked onclick="checkMintermToggle(this)">
</div>
<div>
<label for="varNumSel">Number of variables:</label>
<select id="varNumSel" onchange="checkNumVars(this)">
<option>2</option>
<option>3</option>
<option>4</option>
<option selected>5</option>
</select>
</div>
</div>
<input type="submit" value="Clear implicants" onclick="clearImplicants()">
</div>
</body>
</html>