-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
60 lines (50 loc) · 2.72 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Group 9 Simulation Project</title>
<link rel="stylesheet" href="public/style.css">
<script type="application/javascript" src="public/script2.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
<h1>IEEE-754 Binary-32 Floating Point Converter</h1>
<p>Converter to binary-32 floating point into binary and hexadecimal number equivalent.</p>
<p>Enter the 32-bit binary or decimal representation of a floating-point number here, then click= Convert</p>
<form method="GET" id="my_form"></form>
<div class = "inputTable">
<div class = "container" style="margin-right: 50px;">
<h2>Input</h2>
<p class="inputTitle">Number</p>
<input type="text" id="num" name="num" form="my_form" placeholder="Binary or Decimal or sNaN or qNaN"/>
<p class="inputTitle">Base</p>
<select name="base" id="base" form="my_form">
<option value="default">Select</option>
<option value="2">2</option>
<option value="10">10</option>
</select>
<!-- <input type="number" id="base" name="base" form="my_form" placeholder="2 or 10"/> -->
<p class="inputTitle">Exponent</p>
<input type="number" id="exponent" name="exponent" form="my_form" placeholder="Exponent"/>
</div>
<div class = "container">
<h2>Output</h2>
<p class="inputTitle">Binary Number</p>
<textarea readonly id="binNum"></textarea>
<p class="inputTitle">Hexadecimal Number</p>
<textarea readonly id="hexNum"></textarea>
<div class="actions">
<input type='button' id='clear' onclick = "clearAll()" class = "btn" value='Clear'/>
<input type='submit' id='convert-btn' class = "btn" onclick = "convert()" value='Convert' />
<input type='button' id='txt-file-btn' class = "btn" onclick = "saveToFile()" value='Text File Output' style="width: 150px;" />
</div>
</div>
</div>
</form>
<div id = "error">
<p id = "error_msg"></p>
</div>
</body>
</html>