-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
27 lines (26 loc) · 1.01 KB
/
Copy pathindex.html
File metadata and controls
27 lines (26 loc) · 1.01 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/png" href="./img/calculator.png" />
<link rel="stylesheet" href="binary_calculator.css">
<title>Binary Calculator</title>
</head>
<body>
<div class="container">
<div class="calculator">
<input id="user_input" placeholder="Enter binary number (0 or 1)" pattern="[01]*" title="Please enter only binary digits (0 or 1)">
<br>
<button class="btn" onclick="press('1')">1</button>
<button class="btn" onclick="press('0')">0</button>
<button style="background:#ffb84d;" class="btn" onclick="press('+')">+</button>
<button style="background: #ffcc80;" class="btn" onclick="press('-')">-</button>
<br>
<button class="btnEqual" onclick="calculate()">=</button>
<button class="btn" onclick="erase()">C</button>
</div>
</div>
<script src="./javascript/binary_calculator.js"></script>
</body>
</html>