-
Notifications
You must be signed in to change notification settings - Fork 0
/
binarne-karte.html
99 lines (88 loc) · 2.62 KB
/
binarne-karte.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
---
layout: default
---
<h2>Бинарне карте</h2>
<b>Карта може бити затворена или отворена. Затворену обележавамо са 0, а отворену са 1.</b>
<p>Вредност сваке карте зависи од положаја. Последња вреди 1, а свака лева двоструко више.</p>
<p>Испод карти је бинарни број у нулама и јединицама. Преводимо га у обичан тако што саберемо отворене карте.</p>
<karte>
<label>
<input type="checkbox">16
<karta class="sesnaestica">
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
</karta>
<jedan>1</jedan>
<nula>0</nula>
</label>
<label>8
<input type="checkbox">
<karta>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
</karta>
<jedan>1</jedan>
<nula>0</nula>
</label>
<label>4
<input type="checkbox">
<karta>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
<kruzic></kruzic>
</karta>
<jedan>1</jedan>
<nula>0</nula>
</label>
<label>2
<input type="checkbox" checked="true">
<karta>
<kruzic></kruzic>
<kruzic></kruzic>
</karta>
<jedan>1</jedan>
<nula>0</nula>
</label>
<label>1
<input type="checkbox">
<karta>
<kruzic></kruzic>
</karta>
<jedan>1</jedan>
<nula>0</nula>
</label>
</karte>
<!-- <p>Овде користимо само пет карата, али можемо наставити да додајемо карте са леве стране.</p> -->
<h2>Задатак</h2>
<p>Преведи бинарни број <span id="binarni">00010</span> у обичан:</p>
<input type="text" id="unos">
<button type="button" id="provera">Провери</button> <span id="poruka"></span>
<button type="button" id="sledeci">Још</button>
<br>
<sub class="pomoc">Помоћ? <span>Преброј кружиће отворених карата :)</span></sub>
<div class="drzac-drva">
<canvas id="drvo"></canvas>
</div>
<script src="js/karte.js"></script>
<script src="js/drvo.js" async></script>