-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
253 lines (232 loc) · 7.59 KB
/
Copy pathindex.html
File metadata and controls
253 lines (232 loc) · 7.59 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
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge" />
<title>Data Bus and Address Bus Simulator</title>
<style>
html {
height:100%;
}
body {
background-color:#FFFFFF;
margin:0;
height:100%;
}
table {
margin: 0 auto;
}
ol {
padding: 12px;
}
li {
font-size: 16px;
margin: 0;
padding: 0;
list-style: none;
}
p {
padding: 12px;
}
button {
width: 40%;
}
#status {
padding: 0;
}
</style>
<!-- copy these lines to your document head: -->
<meta name="viewport" content="user-scalable=yes, width=800" />
<link rel="stylesheet" type="text/css" href="index.hyperesources/bootstrap.min.css" />
<script type="text/javascript" src="index.hyperesources/jquery-3.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="index.hyperesources/bootstrap-theme.min.css" />
<script type="text/javascript" src="index.hyperesources/buses-2x.js"></script>
<script type="text/javascript">
var hintBtn = null;
var statusLine = null;
var buzzerSnd = null;
var dingSnd = null;
var items = null;
var currentQn = 0;
var currentItem = null;
var answers = [0, 1, 1, 1, 0, 0];
function submitQn() {
if ($(currentItem.find('input')[answers[currentQn]]).prop('checked')) {
statusLine.innerHTML = 'That\'s right!';
statusLine.style.color = 'green';
dingSnd.currentTime = 0;
dingSnd.play();
currentQn = (currentQn + 1) % items.length;
currentItem = $(items[currentQn]);
displayQn();
if (currentQn == items.length - 1) {
$(statusLine).hide();
$('button').hide();
}
} else {
statusLine.innerHTML = 'That\'s incorrect! Please read the hint.';
statusLine.style.color = 'red';
buzzerSnd.currentTime = 0;
buzzerSnd.play();
hintQn();
}
}
function displayQn() {
items.hide();
currentItem.show();
currentItem.find('.bg-info').hide();
currentItem.find('input').prop('checked', false);
hintBtn.prop('disabled', false);
}
function hintQn() {
currentItem.find('.bg-info').show();
hintBtn.prop('disabled', true);
}
$(document).ready(function() {
hintBtn = $('#hint');
statusLine = $('#status')[0];
buzzerSnd = $('#buzzer')[0];
dingSnd = $('#ding')[0];
items = $('li');
currentQn = 0;
currentItem = $(items[currentQn]);
displayQn();
});
</script>
<!-- end copy -->
</head>
<body>
<!-- copy these lines to your document: -->
<table><tr><td>
<div id="index_hype_container" style="margin:auto;position:relative;width:800px;height:533px;overflow:hidden;">
<script type="text/javascript" charset="utf-8" src="index.hyperesources/index_hype_generated_script.js?66936"></script>
</div>
</td><td style="vertical-align: top;">
<div style="height: 420px; width: 320px;"><form>
<ol>
<li><h1>Question 1</h1>
Use the simulator to read the data stored in address 10 of memory. In what direction is data sent on the <span style="color: red;">data bus</span> during this process?
<div class="radio">
<label>
<input type="radio" name="answer">
From memory to the processor
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="answer">
From the processor to memory
</label>
</div>
<p class="bg-info">Hint: Memory uses the <span style="color: red;">data bus</span> to transport the data that was read to the processor.</p>
</li>
<li><h1>Question 2</h1>
Use the simulator to read the data stored in address 8 of memory. In what direction is data sent on the <span style="color: green;">address bus</span> during this process?
<div class="radio">
<label>
<input type="radio" name="answer">
From memory to the processor
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="answer">
From the processor to memory
</label>
</div>
<p class="bg-info">Hint: Address information always comes from the processor as it is the part responsible for following instructions.</p>
</li>
<li><h1>Question 3</h1>
Use the simulator to write “11110000” into address 10 of memory. In what direction is data sent on the <span style="color: red;">data bus</span> during this process?
<div class="radio">
<label>
<input type="radio" name="answer">
From memory to the processor
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="answer">
From the processor to memory
</label>
</div>
<p class="bg-info">Hint: The processor uses the <span style="color: red;">data bus</span> to transport the data meant for storage to memory.</p>
</li>
<li><h1>Question 4</h1>
Use the simulator to write “00001111” into address 8 of memory. In what direction is data sent on the <span style="color: green;">address bus</span> during this process?
<div class="radio">
<label>
<input type="radio" name="answer">
From memory to the processor
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="answer">
From the processor to memory
</label>
</div>
<p class="bg-info">Hint: Address information always comes from the processor as it is the part responsible for following instructions.</p>
</li>
<li><h1>Question 5</h1>
The data bus is bi-directional because data can be sent in both directions between the processor and memory on the <span style="color: red;">data bus</span>. True or false?
<div class="radio">
<label>
<input type="radio" name="answer">
True
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="answer">
False
</label>
</div>
<p class="bg-info">Hint: The same <span style="color: red;">data bus</span> is used for both writing data to memory and reading data from memory.</p>
</li>
<li><h1>Question 6</h1>
The <span style="color: green;">address bus</span> is uni-directional because address information is always sent in one direction only from the processor to memory. True or false?
<div class="radio">
<label>
<input type="radio" name="answer">
True
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="answer">
False
</label>
</div>
<p class="bg-info">Hint: Data on the <span style="color: green;">address bus</span> is never sent from memory to the processor.</p>
</li>
<li><h1>Congratulations, you may proceed to the next part of the lesson!</h1></li>
</ol>
</form></div>
<p style="text-align: center;"><button id="hint" type="button" class="btn btn-info" onclick="hintQn();">Hint</button> <button type="button" class="btn btn-primary" onclick="submitQn();">Submit</button></p>
<p style="text-align: center; font-size: 16px;" id="status"></p>
</td></tr></table>
<audio preload="auto" id="ding">
<source src="ding.mp3" type="audio/mpeg">
</audio>
<audio preload="auto" id="buzzer">
<source src="buzzer.mp3" type="audio/mpeg">
</audio>
<!-- end copy -->
<!-- text content for search engines: -->
<div style="display:none" aria-hidden=true>
<div>16</div>
<div>0 0 0 0 0 0 0 0</div>
<div>READWRITEdata from the following memory address:
0123456789101112131415the following data:
0101010101010101into the following memory address:
0123456789101112131415</div>
<div>Show/Hide Help</div>
<div>
</div>
<div>15</div>
<div>0 0 0 0 0 0 0 0</div>
</div>
<!-- end text content: -->
</body>
</html>