-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
90 lines (87 loc) · 2.57 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
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 5vh 5vw;
color: lime;
font-family: monospace;
background-color: black;
}
.copyright {
color: yellow;
text-align: center;
}
section {
margin-bottom: 4em;
margin-left: 2em;
margin-right: 2em;
}
img {
width: 100%;
}
h1 {
color: red;
text-align: center;
}
pre {
color: gray;
}
</style>
<title>bin2dec</title>
</head>
<body>
<header>
<h1>bin2dec</h1>
</header>
<main>
<article>
<section>
<p><a href="https://github.com/ArdeshirV/bin2dec/" target="_blank" alt="Download bin2dec source code">Source code on my github</a></p>
</section>
<section>
<h2>bin2dec is a binary to decimal convertor</h2>
<p>bin2dec is a CLI tool to convert binary numbers to decimal numbers. I built this CLI app to solve and handle some problems in exceptional situations about developing Bash/Batch scripts when they need to know binary format.</p>
</section>
<section>
<h3>Below there are three example of running code in action:</h3>
<section>
<h4>Run with command line argument:<h4>
<pre>
$ ./bin2dec 10000000
128
</pre>
<p>Simply it converts 10000000 from binary to '128' as a decimal number.</p>
</section>
<section>
<h4>Use output in terminal or Bash scripts:<h4>
<pre>
$ bo=$(./bin2dec 10000000)
$ expr $bo - 28
100
$ echo print $bo - 28 | python -
100
</pre>
<p>You can use output as a decimal number in expressions.</p>
</section>
<section>
<h4>Run without command line argument(Interactive mode):<h4>
<pre>
$ ./bin2dec
bin2dec - Binary to Decimal Convertor Version 4.0
Copyright (c) 2015-2019 ArdeshirV@protonmail.com, Licensed under GPLv3+
Enter a binary number(use only 0 and 1): 10000000
Binary(10000000) = Decimal(128)
$
</pre>
</section>
</section>
</article>
</main>
<footer>
<p class="copyright">
Copyright© 2015-2019 <a href="mailto:ArdeshirV@protonmail.com" alt="email">ArdeshirV(at)protonmail.com</a>, Licensed under GPL<sup>v3+</sup>
<p/>
</footer>
</body>
</html>