-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
81 lines (68 loc) · 3.2 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=240" />
<title>Karnaugh-Veitch Map</title>
<script src='./karnaughmap.js'></script>
<script src='./qmc.js'></script>
<script language="JavaScript" type="text/javascript">
var karnaugh = -1;
var qmc = -1;
function run() {
qmc = new QuineMcCluskey("fakeDivId", 2, 4, 0);
//qmc = new QuineMcCluskey("myQmcDisplay", 2, 4, 0); // enable for debugging
qmc.init();
karnaugh = new KarnaughMap("myKarnaughMap", qmc);
karnaugh.init();
}
function noOfVarsChanged() {
var d = document.getElementById("noOfVarsChanged_id").value;
karnaugh.setNoOfVars(d);
}
function dontCareChanged() {
var d = document.getElementById("select_dontCare").value;
karnaugh.allowDontCares(d);
}
function dontShowChanged() {
var d = document.getElementById("select_dontShow").value;
karnaugh.setDontShowResult(d);
}
</script>
<style type="text/css">
.qmcMathFont{font-family:"Times New Roman",Georgia,Serif;}
</style>
</head>
<body onload="run();">
<h1>Karnaugh-Veitch Map</h1>
<p>This interactive Karnaugh-Veitch map represents the function <span class="qmcMathFont"><i>y</i> = f(<i>x</i><sub><small>n</small></sub>,...,<i>x</i><sub><small>1</small></sub>, <i>x</i><sub><small>0</small></sub>)</span>.
You can manually edit this function by clicking on the cells of the map. Alternatively, you can generate a random function by pressing the "Random example" button.</p>
<p>
<button type="button" onclick="karnaugh.genRandom();">Random example</button> <button type="button" onclick="karnaugh.clear();">Reset</button><br>
Number of input variables:
<select onchange="noOfVarsChanged();" id="noOfVarsChanged_id">
<!-- <option value="1">1</option>
<option value="2">2</option> -->
<!-- <option value="3">3</option> -->
<option value="4" selected>4</option>
<!-- <option value="5" >5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option> -->
</select> Allow Don’t-Care:
<select onchange="dontCareChanged();" id="select_dontCare">
<option value="0" >no</option>
<option value="1" selected>Yes</option>
</select> Hide result:
<select onchange="dontShowChanged();" id="select_dontShow">
<option value="0" selected>no</option>
<option value="1">Yes</option>
</select> <br>
</p>
<div id="myKarnaughMap"> </div>
<div id="myQmcDisplay"></div>
<p> The JavaScript source code can be found here: <a href="./karnaughmap.js">karnaughmap.js</a>, <a href="./qmc.js">qmc.js</a>.</p>
<p> This website is part of the lecture <a href="http://www.uni-marburg.de/fb12/grafikmultimedia/lehre/ti1">Technical Computer Science I</a>. </p>
<p> Keywords: Karnaugh map simulator, Karnaugh map simulation, virtual Karnaugh map, online Karnaugh maps, interactive Karnaugh map, Karnaugh-Veitch map, KV map, html5, javascript, </p>
</body>
</html>