-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
99 lines (92 loc) · 3.97 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Binary Addition & Subtraction<!DOCTYPE html>
</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Binary Calculator</h1>
<fieldset class="input-fieldset">
<legend id="input-legend">Input</legend>
<form>
<table>
<tr>
<td class="table-d-1">
<label class="input-title">Bits Count</label>
</td>
<td class="table-d-2">
<label class="dash">:</label>
</td>
<td class="table-d-3">
<select id="bits_count" onchange="set_bit_count()" class="user-input">
<option class="options">4-Bits</option>
<option class="options">8-Bits</option>
<option class="options">12-Bits</option>
<option class="options">16-Bits</option>
<option class="options">24-Bits</option>
<option class="options">32-Bits</option>
</select>
</td>
</tr>
<tr>
<td class="table-d-1">
<label class="input-title" >First Number</label>
</td>
<td class="table-d-2">
<label class="dash">:</label>
</td>
<td class="table-d-3">
<input type="number" id="first_num" name="first_num" onchange="check_first_second_num()" onkeyup="check_first_second_num()" class="user-input">
</td>
</tr>
<tr>
<td class="table-d-1">
<label class="input-title">Operator</label>
</td>
<td class="table-d-2">
<label class="dash">:</label>
</td>
<td class="table-d-3">
<select id="operator_selector" onchange="set_operator()" class="user-input">
<option class="options">+</option>
<option class="options">-</option>
</select>
</td>
</tr>
<tr>
<td class="table-d-1">
<label class="input-title">Second Number</label>
</td>
<td class="table-d-2">
<label class="dash">:</label>
</td>
<td class="table-d-3">
<input type="number" id="second_num" name="second_num" onchange="check_first_second_num()" onkeyup="check_first_second_num()" class="user-input">
</td>
</tr>
</table>
</form>
</fieldset>
<div id="output-div">
<fieldset class="output-fieldset" id="output-fieldset-1" >
<legend id="output-fieldset-1-legend" class="output-legend"></legend>
<table id="first_number_output">
</table>
</fieldset>
<fieldset class="output-fieldset" id="output-fieldset-2" >
<legend id="output-fieldset-2-legend" class="output-legend"></legend>
<table id="second_number_output">
</table>
</fieldset>
<fieldset class="output-fieldset" id="output-fieldset-3" >
<legend id="output-fieldset-3-legend" class="output-legend"></legend>
<table id="total-output">
</table>
</fieldset>
</div>
<script src="script.js" language="JavaScript" type="text/javaScript"></script>
</body>
</html>