-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
190 lines (156 loc) · 10.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
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
<!-- CSARCH2 SIMULATION PROJECT
>>> S12 GROUP 5 <<<
> BALANON, Rovic E.
> CUSTER, Mark John T.
> DE RAMOS, Ghrazielle Rei A.
> GUTIERREZ, Carlos Kristoffer P.
> ONG, Barron Brandon Conroy L.
PROJECT SPECIFICATIONS:
* IEEE-754 Binary-16 floating point converter (including all special cases)
• Input: (1) binary mantissa and base-2 (i.e., 101.01x25) (2) Decimal and base-10 (i.e.
65.0x103) Also should support special cases (i.e., NaN).
• Output: (1) binary output with space between section (2) its hexadecimal equivalent (3)
with option to output in text file.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="javascript/script.js"></script>
<link rel="stylesheet" href="stylesheets/globals.css" />
<link rel="stylesheet" href="stylesheets/style.css" />
</head>
<body>
<div class="desktop-interface">
<div class="simulation-interface">
<div class="information">
<div class="project-title">BINARY-16 FLOATING POINT CONVERTER</div>
<p class="project-description">
This simple online converter allows users to easily get the Binary-16 and Hexadecimal equivalent of any
Floating-Point number representation—all special cases (NaN, Denormalize, Infinite, and Zero) included.
<br /><br />
This is an open source project available for viewing on GitHub using the following link:
</p>
<div class="github-link">
<a href="https://github.com/ghrayshell/CSARCH2-Binary16-Floating-Point-Converter" target="_blank">
<div class="overlap-group">
<div class="text-wrapper-5">https://github.com/ghrayshell/CSARCH2-Binary16-Floating-Point-Converter</div>
</div>
</a>
</div>
</div>
<div class="instructions">
<div class="overlap">
<div class="text-wrapper-7">HOW TO USE</div>
<p class="steps">
<b>1.</b> Choose your desired input format from the dropdown<br />
<b>2.</b> Type-in your desired number (Binary or Decimal)<br />
<b>3.</b> Enter your desired exponent<br />
<b>4.</b> Click the “Convert Now” button<br />
<b>5.</b> View the result on the output box at the bottom<br />
<b>6.</b> Need the results? Save the results on your computer!<br />
<b>7.</b> Reset the input values to make another conversion!
</p>
</div>
</div>
<div class="credits">
<div class="text-wrapper-4">CREATED BY</div>
<div class="barron">ONG, Barron Brandon Conroy L.</div>
<div class="carlos">GUTIERREZ, Carlos Kristoffer P.</div>
<div class="ghray">DE RAMOS, Ghrazielle Rei A.</div>
<div class="custer">CUSTER, Mark John T.</div>
<div class="rovic">BALANON, Rovic E.</div>
</div>
<div class="input-section">
<div class="overlap-6">
<div class="input-frame">
<div class="input-display">
<!-- Binary/Decimal & Exponent Input -->
<div class="actual-input">
<input id="inputBox" class="input-prompt-wrapper" type="text" placeholder="Enter Binary Mantissa..." required></input>
<div id="inputPrompt" class="text-wrapper-21">Binary Mantissa</div>
<div id="baseNumber" class="base-number">× 2</div>
<input id="expBox" class="exponent-prompt-wrapper" type="text" placeholder="Exponent..." required></input>
</div>
<div class="input-format">
<div class="text-wrapper-21">Input Format</div>
<!-- Input Format Selector -->
<select id="formatSelect" onchange="getInputFormat()" class="format-dropdown pointer">
<option value="binary">Binary (base-2)</option>
<option value="decimal">Decimal (base-10)</option>
</select>
<!-- TODO: Use for printing the type of special case -->
<div class="text-wrapper-22">Special Case Detector</div>
<div id="specialBox" class="special-case-box not-allowed"></div>
<div id="specialCase" class="special-case"></div>
<!-- END OF TODO: SPECIAL CASE -->
</div>
<!-- Buttons for Convert & Reset -->
<button id="convertBtn" class="convert-button pointer" onclick="handleConvert()">
<div class="text-wrapper-23">CONVERT NOW</div>
</button>
<button onclick="resetValues()" class="reset-button pointer">
<div class="text-wrapper-24">RESET VALUES</div>
</button>
</div>
</div>
<img class="img" src="https://c.animaapp.com/2zqGcCpL/img/[email protected]" />
</div>
</div>
<div class="output-section">
<div class="overlap-2">
<div class="output-frame">
<div class="overlap-3">
<div class="output-display">
<div class="overlap-4">
<div class="binary-output">
<div class="text-wrapper-13">BINARY-16</div>
<div class="text-wrapper-8">Fractional Part</div>
<div class="text-wrapper-11">Exponent Bits</div>
<div class="text-wrapper-12">Sign Bit</div>
<div id="SIGNBOX" class="sign-box not-allowed"></div>
<div class="overlap-group-2">
<div id="FRACBOX" Class="fractional-box not-allowed"></div>
<div id="EXPBOX" class="exponent-box not-allowed"></div>
<!-- TODO: USE THIS PART PARA SA BINARY-16 OUTPUT -->
<div class="BINARY-VALUES">
<div id="signBit" class="sign-bit">X</div> <!-- One Digit -->
<div id ="expBit" class="exponent-bit">XXX XX</div> <!-- 5 Digits (Follow 3-2 spacing) -->
<div id="fracPart" class="fractional-part">XX XXXX XXXX</div> <!-- 10 Digits (Follow 2-4-4 spacing) -->
</div>
<!-- BINARY-16 UNTIL DITO -->
</div>
</div>
<div class="hexadecimal-output">
<div class="overlap-5">
<div class="text-wrapper-19">HEXADECIMAL</div>
<div id="HEXBOX" class="HEX-BOX not-allowed"></div>
<div id="HEXBOX-2" class="HEX-BOX-2 not-allowed"></div>
<div id="HEXBOX-3" class="HEX-BOX-3 not-allowed"></div>
<div id="HEXBOX-4" class="HEX-BOX-4 not-allowed"></div>
<!-- TODO: USE THIS PART PARA SA HEXADECIMAL OUTPUT -->
<div class="HEX-VALUES">
<div id="HEX1" class="HEX-1">X</div>
<div id="HEX2" class="HEX-2">X</div>
<div id="HEX3" class="HEX-3">X</div>
<div id="HEX4" class="HEX-4">X</div>
</div>
<!-- HEXADECIMAL UNTIL DITO -->
</div>
</div>
</div>
</div>
<!-- TODO: USE THIS BUTTON TO SAVE IN TEXT FILE -->
<button id="saveBtn" class="disabled not-allowed" onclick="saveResult()" disabled>
<div class="text-wrapper-20">SAVE RESULT</div>
</button>
<!-- UNTIL HERE LANG SAVE BUTTON -->
</div>
</div>
<img class="img" src="https://c.animaapp.com/2zqGcCpL/img/[email protected]" />
</div>
</div>
</div>
</div>
</body>
</html>